I am looking for the implementation of floatingaction button for API 19.
I am still using ADT . Is there any library that i can directly use in project.
I saw some libraries in AndroidSTudio but didnt succeed in porting to eclipse.
Here is my original post describing a library with FloatingActionButton implementation.
You may use it even for API level 7! It also supports the elevation feature from API 21.
Related
I need to know what api version support the fab element in android.
The blog post for the Design Support Library release, of which FloatingActionButton is a part of, states the following:
With a little help from the new Android Design Support Library, we’re bringing a number of important material design components to all developers and to all Android 2.1 or higher devices.
Android 2.1 is API level 7, so apps targeting 7 and above can use FloatingActionButton
The FloatingActionButton is available to API 7 (android 2.1), as it was added to the Android Support library in 2015: http://android-developers.blogspot.ca/2015/05/android-design-support-library.html
To use the fab using the support library you can use the answer provided here: https://stackoverflow.com/a/31753179/6543020
And analogue from shamanland - FAB Library also works from the Android 2.1, API level 7.
mine api it support is 7+. if i am not wrong.
I'm starting a project with a minimum API level of 21, trying to figure out the right way to implement the ActionBar. The official docs start with using the appcompat library, and the main advantage listed is that it preserves compatibility back to level 7. I don't even want pre-Lollipop installs. Should I use appcompat anyway? Is there any advantage or disadvantage to forgoing the appcompat library?
Is it a good idea to forgo appcompat for a project with minimum API level 21?
Probably not.
First of all, even if you now think you won't, you might still want to downgrade later.
But even if that is not the case, it still provides features. Think of if as being able to upgrade to 24, 25, or 26 in the future without modifying your code.
Appcompat is all about compatibility. The APIs will change less (likely) and you can use interfaces without having to manually check API versions.
I need proof!
Take getColor(int). It was deprecated with version 23. So with 21 you would still use it, with 23 you would (should) have to switch to getColor(int, Theme). ContextCompat of the support library would handle this version check for you.
And this is just one sample.
I would like to use bottom sheets in my application. As you may know, there's no official implementation for this, however there are few projects on GitHub. I found the Flipboard's version, but that doesn't work under API level 14 and my program targets API level 8. I found another one, but unfortunately that doesn't allow me to set a layout/view for the bottom sheet or creating modal bottom sheets neither.
What now?
Official support for BottomSheets was added to the Android Design Support Library as of version 23.2.0
Is there a way to use View animation methods previous to API 11? I know about the Support v4 library but I can't figure out how to use it, so I can't tell if a solution is in there. I want to be able to execute a line like that below in earlier versions:
activeAnimator = sliderHolder.Animate().TranslationX(newX).SetDuration(500).SetListener(new SlideFinishListener(this));
Have a look at NineOldAndroids, which provides all of the same functionality and API that the HoneyComb+ APIs do.
I have a very basic question.
I have a project which has minSDKVersion set to 8 and targetSDK version as 16. Now one of the methods I used setActionView() using this link.
requires a min API level of 11.
I just want to know if it'll work in version 2.2 or not??
Or if there is a way to support previous devices?I want to use collapsible action item which requires the use of 'setActionView()'. Is there any other way to use this?
If it says this feature requires a minimum API level that is greater than what you set in your manifest, you will have trouble using this feature in these older devices. But check Android support library. This may help you support these devices.
if you are using MenuItem com.actionbarsherlock.view.MenuItem.setActionView(View view) then the support for the same should be there in library and will work on 2.2 .
You may also want to check out ActionBarCompat, to give you this functionality... (see this link)
When using android appcompact actionbar library, you could use setActionView with SupportMenuItem.So your code should be like
private SupportMenuItem menuItem=(SupportMenuItem) menu.findItem(R.id.menu_refresh);
menuItem.setActionView(R.layout.progressbar);
You can do it like this with the support library:
MenuItemCompat.setActionView(yourMenuItem, R.layout.your_view);