I am looking to create an app where some categories that the user can choose from will be shown. The best UI I could find is shown in this image:
https://lh3.ggpht.com/swzmwICOMNjKmLH_HyAWh0VQ49BN7vU6PG3qEpsSnF1HWcG1CmpQi1BTBxdVczZx8pY
The screenshot is of the "Parenting Ages & Stages" android app. The best part of the above shown home page is that there is no scroll bar at the bottom and the user can use swipe gestures to see various categories.
Any idea how I can achieve the same effect?
It would be better to use ViewPager in your case
http://developer.android.com/reference/android/support/v4/view/ViewPager.html
It may Help you!
Related
As shown in Image, When user click on list a bottom sheet comes up
and when user scroll up that bottom sheet cover full page just like an activity with toolbar.
How to achieve this ??
What is logic behind the scene ??
First question:
How to achieve this ??
Using a custom Behavior (it extends from CoordinatorLayout.Behavior) for a Persistent BottomSheet or modal one.
Second question:
What is logic behind the scene ??
The logic is:
It has some states (like google maps app) hidden, collapsed, dragging, anchor_point, expanded.
When its reaching expanded state it use another modified Behavior to show you an android.support.v7.widget.Toolbar.
By default BottomSheetBehavior has only 3 states, you have to add a 4 state (anchor_point) that is the one that will makes it to stop in half way of Y axis.
Probably now you want to see some code. Look at this simple example project in where you can see how to get 4 states.
pd: this link is the most useless that I have found in all answers about this topic :(
The google team recently released the Android Support Library 23.2, that adds this feature.
This is the link's post ,I hope that it's help you.
http://android-developers.blogspot.com/2016/02/android-support-library-232.html
I'm right now working on a launcher app and I have three Activities. User is on 2nd Activity by default and when user swipes left it should take him to 3rd Activity and when user swipes right it should take user to 1st Activity. Just like Swipable Tabs but the Tabs should not appear. Is it possible? Best example is of Home Screen, I want it exactly as Home Screen. I've tried a lot! But I'm not getting what ACTUALLY I want, any help would be gladly appreciated, thanks!
I hope I can get you well.
First personally I don't suggest achieving this goal by using multiple activity. A better way might be one activity containing multiple fragment.
Then if you do so, several tools can make help, ViewPager for example.
If you want to add some view page indicator, as what the homescreen looks like, then ViewPagerIndicator might be a good choice.
Hope it helps.
In my application, I want to have behavior like facebook app wherein on click of icon I'd like to shift the whole screen towards right and display some menus on the left as shown below:
Before Clicking Menu Button
After Clicking Menu Button
One way is to have a layout with those menu in black color and set its visibility to gone
But in that case, the shifting animation won't be there like it is there in facebook. So is there any way we can do this?
This UI Pattern is currently being referred to as Side Navigation and discussed in some detail here:
http://www.androiduipatterns.com/2012/06/emerging-ui-pattern-side-navigation.html
The article also links to several projects that have implemented this navigation:
https://github.com/korovyansk/android-fb-like-slideout-navigation
https://github.com/darvds/RibbonMenu
https://bitbucket.org/jfeinstein10/slidingmenu/overview
https://github.com/Gregadeaux/android-fly-in-app-navigation
It is worth reading the article for its discussion about the issues with this kind of navigation also, though.
I have not implemented it but give you an exact idea that you have to use fragment for this.
Go through this link
This is the best that I've found https://github.com/DWorkS/ActionBarToggle because it's implementation is similar to DrawerLayout from google using ActionBarToggle. Although, it has a problem with open method but I wrote to its owner and he said that he will solve.
I'm trying to implement the title indicator like the one found in Google+ Android App; I've come across two implementation, one by Jake Wharton and the other by Mark Gjoel.
What I want is to be able to swipe on the indicator to switch between the different views, and swipe on viewpager to go back/forth on image results that I load from the SD card.
I've implemented the layout for the indicator, but I don't know how to "move it" (follow the users finger within the indicator layout) as the user swipes on it. Also, I don't know, how to move the viewpager at the same time with the indicator, so the interaction looks natural.
If you have Google+ App, try to do a swipe on the indicator in the stream section, and you will know what I am talking about.
Any tips would be greatly appreciated.
Following links may help you.
GreenDroid
AndroViews code
AndroViews video
ADW launcher
PageScroller
Look at the listeners in ViewPager, copy the same action to your listeners only the movement part, not everything what it does. Now, when you detect user swiping on your indicator, implement or call the function that does the swipe on the ViewPager , so that they move together.
HTH.
Try the implementation by chainsdd for Superuser app:
https://github.com/ChainsDD/Superuser/blob/master-dev/src/com/noshufou/android/su/widget/PagerHeader.java
I want to make an application which will look like android home screen. where I want to place some icons. it will have 10 pages. I want to do scroll between these pages.
How to achieve this? Plz help.
Thanks.
I'm not sure how to archive the home-screen like switching but for the icons, you can use a GridView. To switch between the pages, a TabLayout could be used. Also I found this, which might be what you're searching for.
But there might be bettwer ways of doing this...