I have to design the following for Action Bar.
can we design it without customization.
Please let me know what is the best approach to design it.
EDIT: My application will support Android ICE-cream sandwich and higher versions, so I am not using ActionBarSherlock library.
Thanks
The action bar is a window feature that identifies the application and user location, and provides user actions and navigation modes. You should use the action bar in most activities that need to prominently present user actions or global navigation, because the action bar offers users a consistent interface across applications and the system gracefully adapts the action bar's appearance for different screen configurations
check this Answer. It may help you.
Related
What is the point of action bars in android if you can just use a custom linear layout and use that? You can add more robust functionality, you can do much more than with the regular app bar, it's less hassle to use. I can only see the advantage when you tie your action bar to the activity, but most of the apps now have different action bars or no action bars at all for different screens.
Why would one choose one over another, or what even is the use case of action bars
As written in the google documentation https://developer.android.com/training/appbar
"The app bar, also known as the action bar, is one of the most important design elements in your app's activities because it provides a visual structure and interactive elements that are familiar to users. [Pay attention to the point 'familiar to users'] Using the app bar makes your app consistent with other Android apps, allowing users to quickly understand how to operate your app and have a great experience. The key functions of the app bar are as follows:
A dedicated space for giving your app an identity and indicating the user's location in the app.
Access to important actions in a predictable way, such as search.
Support for navigation and view switching (with tabs or drop-down lists)."
To your question.
Yes, it is a valid point that custom action bars provide very robust and diverse functionality, but the point here lies in UI/UX part of the software development.
As you saw in the documentation
Familiarity to users
Consistency in design
Users are not comfortable with design changes as in general, because
Most of them do not even care about the design they just have to do what they have to do.
They have to again familiarize themselves to the new design so that they could remember it and navigate through the user interface faster.
So keeping software development aside for a while it becomes a bit difficult for the end-user.
Also, It might be that the default UI elements work better with the operating system [Cache, CPU, etc. ]
This is related to our design , I think when design is sync with Action bar then it is better to use it but if we have flexible design we have to use custom Toolbar.
Some of benefits of an Action bar that cause developers select it at first :
-Makes important actions accessible in a predictable way (such as Search).
-Supports consistent navigation and view switching within apps.(If you use navigation component is very simple to use Action bar)
-Reduces clutter by providing an action overflow for rarely used actions.
-Provides a dedicated space for giving your app an identity.
And finaly Should you replace ActionBar with ToolBar? YES and NO. YES if you want the flexible header that comes with the Toolbar, NO if you don not need those flexible header. by flexibility, you can do things like adding background image, animations,...
I have another question for you:
Is there a way to hide a specific virtual button from android navigation bar?
My particular case is hide recent apps button. I've searched in some posts about this, but they mention how to hide or disable navigation bar. I just need to hide one virtual button from navigation bar.
I hope that you can give me an answer, thanks!
Update:
Somebody told me that Airwatch app from VM-Ware does this customization
It is currently impossible to make an App-specific customization, but it is possible to make a device-specific modification on Navigation Bar, starting from Android 8.0 (Oreo) by unlocking System UI Tuner.
However, do consider the limitation as both Navigation Bar and System UI Tuner ability is pre-defined by OEMs. Which means we cannot customize more than the given customization choices, and different device might introduce different customization capabilities.
You can not change the navigation bar from your application; you do not have access to these settings. Instead, what you can do is using adb to hide the navigation bar and use only the navigation inside your app. You can follow this tutorial of XDA-dev and their application called "Navigation Gesture", you will find the adb command.
Recently I've heard the recommendation of using actionbar to manage user actions and navigation in the app.
However to implement this and have my app be compatible with lower versions I have to use actionbarsherlock, also I'll have to change some themes, so it comes to my mind: All this looks like a lot of effort when I could just add a custom view to my activities' layout as they need it.
Is there a real benefit in performance or something when using action bar?
I think it's more about user experience. The action bar makes an interface consistent across applications. Here is the quote from developer.android.com
"You should use the action bar in most activities that need to prominently present user actions or global navigation, because the action bar offers users a consistent interface across applications and the system gracefully adapts the action bar's appearance for different screen configurations".
The developer site also says the primary goals of the action bar are to:
Provide a dedicated space for identifying the application brand and user location.
Provide consistent navigation and view refinement across different applications.
Make key actions for the activity (such as "search", "create", "share", etc.) prominent and accessible to the user in a predictable way.
I've never really handled an android device before. I've read most of the discussion on here :
http://developer.android.com/guide/topics/ui/actionbar.html#ActionItems
From what I gather if I'm using a Holo theme and that my target is at least API level 11 I should have an action bar within my app.
How exactly do I open it up with the keyboard? My emulator has a custom size(8" tablet) and I don't know how to see the action bar :
As you see on the screen I have no idea where this bar is supposed to be at.
Its that bar at the top with the app title in it!
As most of us android developer - I assume - still want to support Froyo, many of us use
actionbarsherlock.com
which brings Action Bar down to API 2.x
- from my experience with it so far it is an awesome lib.
Just a hint for the case you start liking the Action Bar ...
I am new to Android app development and I recently published my first app. My app uses the menu key to display 2-3 functionalities. But there are HTC Evo 4G users who sent me e-mails complaining that they cant use that because their device doesnt have a physical menu key. Now how do I implement a solution the best possible way? The app supports devices android 2.2+ How do I add a action bar without breaking my app? I was wondering if I should add a action bar for all android versions or only for 4.0 and above? What would be easier?
My app uses the menu key to display 2-3 functionalities.
It should be doing so by using the standard options menu system.
Now how do I implement a solution the best possible way?
Add android:targetSdkVersion="11" (or higher) to your <uses-sdk> element in your manifest. Your title bar will be automatically converted to an action bar on API Level 11+ devices, and your options menu will appear as the overflow menu in the action bar.
How do I add a action bar without breaking my app?
See above.
I was wondering if I should add a action bar for all android versions
You can certainly do this, using libraries like ActionBarSherlock.