I want a clean action bar which support from api 10 - api 21 to implement in my app. I have gone through different tutorials, developer documents from google and some examples provided at the developer site. Do we have simple solution for a clean code and easy to follow method for enabling Actionbar in an android app, (preferably which can works well with material design and features in lollipop without affecting anything bad in earlier versions). Also I need to create a navigation tab in Actionbar, the sample code provided on the developer site is not working for me.
Any suggestions, writes ups, tutorial links are appreciated. Thanks.
One of the most useful official introductory posts is this one:
AppCompat v21 - Material Design for Pre-Lollipop Devices!
This shows you how to backport the new Toolbar all the way back to Gingerbread, as they have done with the Play Store app.
See also the Material Design on Android Checklist post which is also great.
And don't miss the How to upgrade your app’s design from Holo to Material Design article!
Love Material Design ....
Try using the Toolbar from the Android Support Libary v7.
Toolbar in Gingerbread
Related
I have an application which is designed using Material Design 2. I have not submitted that to Playstore yet.
I am now trying to upgrade that application to Material Design 3. AFAIK, the themes etc present in Material Design 3 will not work on below Android 12 devices. So, I am not able to understand how to support Material Design 2(for below Android 12) and Material Design 3(for above Android 12) in my app.
I understand that this must be some basic question but I am not sure how to achieve this. Do I submit different APKs to Playstore with MD2 and MD3 or within code, do I somehow check the version and decide what to apply?
No, you don't need to submit different versions to Google Play. Take a look at migration article from material blog.
I want to use Material Design in different devices including(i.e) Android 5.1 and Android 4.4.2.
So, after 5.0 android uses Material by default. But what about other devices?
Where I can get samples of such project? How to implement Button, side K and FAB.
Actually, what is the best and common way to implement material? I know that there are some libs to handle my task, but maybe there is the better way.
Please help me to figure out this issue.
Thanks.
You have to use AppCompat Library v21 for Material Design in Pre-Lollipop Device.
http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html
Additional, want to include ActionButton, Collapsible Toolbar, Floating EditText etc. are available with Design Support Library by Android Developers.
http://android-developers.blogspot.com/2015/05/android-design-support-library.html
You can use the AppCompact support library for that.
http://android-developers.blogspot.in/2014/10/appcompat-v21-material-design-for-pre.html
Android Navigational Drawer is supported on minimum which version? Also can we make Custom Navigational Drawer in android? If we can then kindly tell me how to get started. I have read the documentation from Android Developer Site but many things I can't understand and want help
Thanks in Advance.
The Navigational Drawer is part of the suport library v4.
From the Android doc:
Support android.app classes to assist with development of applications for android API level 4 or later.
So you can use the navigation lib from api 4 onwards.
Its available from API 2. I believe. So almost all device. I recollect seeing it in Google IO videos.
I have been using actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); in my app but the target device is android 2.3.2 and does not support this code.
Is there any solution to have actionbar and tabview in android 2.3?
The solution for getting using the ActionBar in versions prior to 3.0 is called ActionBarSherlock, and enables you to give the user a unified experience across the Android versions.
Link to the website: ActionBarSherlock.com
There's actually also something called ActionBarCompat (read more here), but it's really inferior to ActionBarSherlock.
Edit: You'll find a lot of useful samples within the project hierarchy, but this should probably be the thing you're looking to accomplish: TabNavigation.java
Use ActionbarSherlock: http://actionbarsherlock.com/
Here is the tutorial for using tabs with ActionbarSherlock : http://www.androidbegin.com/tutorial/implementing-actionbarsherlock-fragment-tabs-in-android/
Yeah ActionbarSherlock is a best way to do it.
Here is how to add it link
The next websites give explanation and guidelines of how to style the tabs and icons on android up to Android 3.0 (honeycomb) excluding this version:
http://android-ui-utils.googlecode.com/hg/asset-studio/dist/icons-tab.html
http://developer.android.com/guide/practices/ui_guidelines/icon_design_tab.html
http://developer.android.com/design/style/iconography.html
but I can't find the guidelines to Android 3.0 and above. Where are they?
Also, are there any other missing guidelines that need to be read?
The tabs I want to use are meant for an activity with both tabs and viewPager (like the tabs pager example of the compatibility package).
Android Design, where you can found the guidelines, was launched in January 2012. Before this date, Google didn't say which guidelines we must follow. This is the cause you can't find guidelines before android 3.0.
This is enough: http://developer.android.com/design/index.html
EDIT: And this: http://developer.android.com/distribute/googleplay/quality/tablet.html
found this one:
http://android-ui-utils.googlecode.com/hg/asset-studio/dist/icons-actionbar.html#source.space.trim=1&source.space.pad=0&name=example&theme=light
not sure though if it's for tabs on android 3.0 and above . since it's for the action bar , it might be the correct one .