I was surfing some apps couple of hours ago and I saw something common in all of them. One clear instance for that is when you open YouTube app you see a narrow horizontal tool just above the device's home button which seems to be in charge of controlling what page user want To go I guess.
It has search button, a button which leads to the home page of the app and etc.
Question: Is it just a strip with buttons which is used to switch between activities ( by Intent class)? Or something else?
my bro you should use some library for apply this such as chip navigation
if you interest to learn it recommend you to see this tutorial https://www.youtube.com/watch?v=DQtdOSN21lQ&feature=emb_logo and the library https://github.com/ismaeldivita/chip-navigation-bar
Do you mean the bottom app bar?
If so you'll find the details here: https://material.io/components/app-bars-bottom
And yes you can use it to switch between activities.
Related
I'm developing an Android-/iOS-App with react-native.
I want to allow my customers to select between options upon clicking the "options menu hardware button" in Android (you know, the button usually at the bottom left of the android devices with 3 lines on top of each other, often triggering a menu in the app providing additional options).
Question: How can I listen to the options menu button click?
To clearify, I mean that button:
I know that the button does not exist under iOS and not under all Android phones and I will have to implement another solution for there, but that does not matter at the moment, as I want the button primarily to provide debugging functionality for my customers/testers (e.g. sending me the state of an erroneous screen).
Strangely, I did not find any resources on google regarding this problem, although I would assume wanting to use hardware buttons in react-native is a common task. Maybe I used the wrong search terms - if someone could link me to better terms describing this problem, I'm thankful as well :D.
Only thing I could find is the BackHandler for handling back-button-clicks.
A lot of apps that I have (such as gmail) has a feature where you can swipe left and right to go from one record to another. In gmail, this navigation takes you from one email to the next (or previous, depending on which way you swipe). When you reach the end, you get this blue halo effect, and the swiping in that direction doesn't work. My question is, what is this navigation called? Is it something in the sdk, or is it written by the developer for each app? Can I use it in my app where I have data stored in the sqlite database that I would like to show one record at a time this way? Is it available in all sdk versions?
I would search for it, but I don't know what it's called so I can't really think of any good search terms here. If someone just points me in the right direction, I can read the documentation and figure it out.
The component you are looking for calls ViewPager. You'll find in under the compatibility pack jar.
android viewPager implementation
http://android-developers.blogspot.co.il/2011/08/horizontal-view-swiping-with-viewpager.html
You can use something called a viewFlipper if you want to use animations.
There's a nice tutorial here: http://www.warriorpoint.com/blog/2009/05/26/android-switching-screens-in-an-activity-with-animations-using-viewflipper/
Good luck :)
I have seen couple of Android applications when I came across one common practice. Navigation header does not have a Back button. Since then I was quite confused so as to place the same in the Navigation header of my application.
Should back button be placed in Navigation (Header) or we should leave keys to handle it? What is the best practice we should follow?
Thanks
My personal view is that each platform has its own way of handling certain functions. An apple device will have a back button on its navigation bar because that is the place where an iphone user will look for it.
As far as Android is concerned, because we are supplied with a physical back button, we must leave it at that because that is the first place an android user will look to if he wants to go back.
Therefore since user satisfaction and ease of use is the main concern, i would not play with the back button (unless i have to).
Similar to the responses above, however for the sake of simplicity I have taken a central approach in which I actually keep a back button in the navigation header however user can still press the hard key back button and the code actually performs the same functionality.
Essentially what it does is to cover both set of users, some really new ones who do not understand Android hard-keys yet, like people used to iOS (pun intended) and the other more suave Android users.
oI believe there could not be best approach. It depends on your custom UI and how much screen estate your navigation consume. The best approach is to buil two variants ant alllow to beta-testers decide.
Allthow back button on the screen could be as much handy, so much annoying.
What the "Back" button actually does, is to close your current activity and bring the previous one to the front.
You can do the same by calling finish() in your current activity. It will remove the current activity from activity Stack and take you to the previous one.
Asaf Pinhassi
I would like to put fairly extensive help information within my app - both "how to use" and explanation of what one is seeing.
The app (map oriented) has a row of buttons at the bottom, and I was considering adding a help button.
Context sensitive help is mostly not appropriate, btw.
What are common and best practices for this?
Thanks
I wouldn't suggest using a help button, once the user knows how to use your app it will be useless, and will only takes some space.
What I do (but it's maybe not the best practice) is to show a popup on the first use. Within the popup I put some basic help and a link to my website which fully explains how my app works (with some screenshots to make it user-friendly). I also put a "Help" button in the activity menu which redirects to my website again.
What I can suggest is to explore by yourself how other android apps shows the help information, and reuse or adapt the one you prefer (this is what I've done).
I have put help into a menu item as I expect new users to click the menu button anyway (my app, Zwitscher also has a button bar at the bottom).
Clicking the menu item then starts an Activity that simply shows a table view that explains the various buttons in the system and contains a link to more information online.
See https://github.com/pilhuhn/ZwitscherA/blob/master/src/de/bsd/zwitscher/HelpActivity.java and
https://github.com/pilhuhn/ZwitscherA/blob/master/res/layout/help.xml
Another option I've seen sometimes is including a help option in the preferences/configuration screen.
Usually it starts a new activity with a sequence of steps to make the user understand everything.
Desktop apps have top level menus (File, Edit, Search, ..., Help).
Web apps have very similar thing, menu tabs (Logo, Questions, Tags, Users, Badges, ...).
However I cannot find equivalent of top level menu in Android framework. Assume that my app has 5 main activities. According to menu design guidelines options menu should contain actions related to current activity. So how an app should allow users to easily switch to one of five main activities.
It seems that different apps solve the problem in different ways. Some have a tab list at the top of the screen, some at the bottom. Even Google applications aren't consisted in that field. Google Listen has an options menu item called 'Listen Home', however Listen main activity has no that options menu item. Others have two icons in app luncher which start two different activities from one app.
I realize that due to small phone screens Android apps have to be designed in a slightly different way than web or desktop apps. But I have a feeling that the app top level menu topic was omitted in Android framework. And developers are on their own here. Or am I missing something?
Update: this is Google blueprint for a great app
Update2: this an example app of these patterns
Update3: GreenDroid library helps a lot implementing these patters in your apps. It seems that dashboard and action bar patterns are becoming quite popular.
You should take a look at this Google I/O session: http://www.google.com/events/io/2010/sessions/android-ui-design-patterns.html
They talk about the design patterns they used for the Twitter application and basically the type of concept you are asking about. Basically, your activity should have a top bar that gives the user specific tasks to do in the view or allows them to switch into another activity.
Google has not implemented anything like this into the actual SDK yet so you're sort of on your own in terms of implementing it but the main concept is given in the presentation. This is the direction that Google would like to see Android shift into though.
Hopefully this helps you out somewhat.
The file/edit menus of desktop apps have a very different purpose than the questions/tags etc. tabs at the top of this webpage.
The contents of the file/edit menu should be implemented as in the options menu that appears when you press the menu button. This is, as you noted, to save space on the smaller screens.
App navigation like the questions/tags etc could be implemented using a Tab Layout. You are right that apps vary in whether or not the tabs are on the top or bottom, but I don't think thats a huge deal. In my unscientific look through apps on my phone, the bottom seems to be more common. However, I think it might depend on your specific implementation which you decide.
A lot of apps don't require any sort of navigation like that, and can get away with just having a path forward or back via the back button. I think this is preferable for a lot of applications, but won't work in all cases.
I'm not sure what more you would want built into the framework.. It seems like you can accomplish any kind of navigation desired with the above options.
You can look at the source of the Google IO app
ioshed