android-compatibility

AppCompatActivity vs AppCompatDelegate

做~自己de王妃 提交于 2019-12-10 23:15:27
问题 Recently I discovered what is AppCompatDelegate so a natural question arises - is it worse than using AppCompatActivity or do they have their differences and what are they? 回答1: If your activity class is not extending AppCompatActivity but you still want to use some of its features then you can you AppCompatDelegate. You can create Appcompatdelegate with following lines of code in your activity class: private AppCompatDelegate getDelegate() { if (mDelegate == null) { mDelegate =

Appcompat, compatibility, and support libraries for Lollipop if minimum SDK = 14

最后都变了- 提交于 2019-12-08 19:14:48
问题 We have an existing Android app that supports API Level 8 up to 18. We used compatibility libraries 19.1.0. Now we are changing/upgrading to: Minimum SDK = 14 Target = android-22 Now given that there are v4, v7, v13 support, compatibility, and appcompat libraries in different versions, I'm not sure which ones to include and which ones not. We are using maven for dependency management and using Maven SDK deployer 回答1: If you are using a minSDK of 14 then technically you do not need any of them

Action Bar in API Level > 3.0 but Still Support API < 3.0

心不动则不痛 提交于 2019-12-08 06:58:52
问题 Yet another compatibility question. THE PROBLEM I need to use a tabbed action bar in api level 3.0 and greater to switch between fragments . However, I also need to be able to switch between these fragments somehow in api level < 3.0. The spanner in the works is the fact that I have already downloaded a custom compatibility library that allows me to use google maps with fragments and therefore I can't use a library. THE QUESTION How can I implement a tabbed ActionBar solution in 3.0 and

Setting background color of android actionbar

…衆ロ難τιáo~ 提交于 2019-12-08 03:08:25
问题 I am operating with the compatibility library v7. I am just trying to set the color of my actionbar (for Android 2.1 and above - though I run Android 4.4.2) to a solid color. However the color does not change. It remains the same. I have also tried creating a solid drawable with the color but that also does not change. Finally I tested if I could change the backgroudn of my layout and I could - it must be something about the actionbar background which I'm not getting. Here is the code: <?xml

where should incompatibilities with different android devices be reported?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 15:33:07
问题 i developed a home screen widget. the first release was tested on a nexus one, htc evo 4g and motorola droid. worked fine. after release in the android market, someone reported that it didn't work on a samsung fascinate (galaxy s). it turns out there are 2 incompatibilities (bugs?) with the galaxy android implementation. one is with layout and the other with intent handling. they're easy enough to work around, but where should something like this be reported? 回答1: I would start by posting

setRetainInstance not working for ListFragment when using compatibiltiy library

风格不统一 提交于 2019-12-07 05:32:22
问题 I'm attempting to save a ListFragment subclass across an orientation change so I added setRetainInstance(true) to the end of my onCreate function. I added an onSaveInstanceState method to add all of it's data to a bundle, then added code into onActivityCreated to load that data back. Unfortunately, it wouldn't work. When I added some debugging messages with the help of Log.d I discovered that not only was onSaveInstanceState not being called, but onCreate was (which the documentation seems to

Better to use FragmentActivity (or ActionBarActivity) or system Activity when targeting min API 14 (ICS)?

牧云@^-^@ 提交于 2019-12-07 02:05:50
问题 I'm making my app to have minimum Android version of 4.0 (ICS, API level 14). First I guessed that I can get rid of using FragmentActivity as the base class for the activities, but it seems that some support library classes like FragmentStatePagerAdapter is not available on the system framework, and it needs the support Fragment instead of the system Fragment . So I wonder if I should make my activities inherit from the system Activity , or stay using FragmentActivity (or ActionBarActivity

Action Bar in API Level > 3.0 but Still Support API < 3.0

*爱你&永不变心* 提交于 2019-12-06 16:03:44
Yet another compatibility question. THE PROBLEM I need to use a tabbed action bar in api level 3.0 and greater to switch between fragments . However, I also need to be able to switch between these fragments somehow in api level < 3.0. The spanner in the works is the fact that I have already downloaded a custom compatibility library that allows me to use google maps with fragments and therefore I can't use a library. THE QUESTION How can I implement a tabbed ActionBar solution in 3.0 and greater and also cater for the bigger market that is 3.0 and less? Any help would be grand. What you want is

What is ART(Android Run Time), is their any changes required in live android application for making it compatible with ART?

a 夏天 提交于 2019-12-06 14:53:11
问题 I am heard that now Google start using ART, a new run-time for executing Android app and its come with Android 4.4 (in some devices). Now I am just want to confirm that, is pro-grammatically any changes are required or not in existing application or their is any criteria for making new application i.e. run on Dalvik but also compatible with ART ? 回答1: I am heard that now Google start using ART, a new run-time for executing Android app and its come with Android 4.4 (in some devices) ART is not

where should incompatibilities with different android devices be reported?

折月煮酒 提交于 2019-12-05 19:30:40
i developed a home screen widget. the first release was tested on a nexus one, htc evo 4g and motorola droid. worked fine. after release in the android market, someone reported that it didn't work on a samsung fascinate (galaxy s). it turns out there are 2 incompatibilities (bugs?) with the galaxy android implementation. one is with layout and the other with intent handling. they're easy enough to work around, but where should something like this be reported? I would start by posting questions here on StackOverflow, describing your actual symptoms (one question per theorized bug, please), so