android-compatibility

setRetainInstance not working for ListFragment when using compatibiltiy library

做~自己de王妃 提交于 2019-12-05 10:25:06
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 say shouldn't happen when retainInstance is true). Neither onCreate nor onActivityCreated have bundles

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

让人想犯罪 __ 提交于 2019-12-04 22:55:32
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 ? 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 enabled by default on Android 4.4. It is enabled by default on the "L" Developer Preview. It probably will

Gradle conflict when using admob 15.0.0 with the lastest support library

家住魔仙堡 提交于 2019-12-04 04:25:32
I am using 'com.google.android.gms:play-services-ads:12.0.1'. and android support version 27.1.1. when I try to upgrade my ads library to the latest (15.0.0) I get an error saying that I must use the same version specification. See image below. Is there a way to use the latest version for both the supportLibraries and the play-services-ads ? Note that this problem does not exist when i use the play-services-ads version 12.0.1 You can try overriding the conflicted support library by adding the support library to your dependencies block: implementation 'com.android.support:customtabs:27.1.1'

Detecting thumb position in SeekBar prior to API version 16

蓝咒 提交于 2019-12-03 16:16:40
问题 Basically, I need to detect when the progress changes in the SeekBar and draw a text view on top of the thumb indicating the progress value. I do this by implementing a OnSeekBarChangeListener and on the public void onProgressChanged(SeekBar seekBar, int progress, boolean b) method, I call Rect thumbRect = seekBar.getThumb().getBounds(); to determine where the thumb is positioned. This works perfectly fine, but apparently getThumb() is only available in API level 16+ (Android 4.1), causing a

visual indication of over scroll in android

左心房为你撑大大i 提交于 2019-12-03 12:25:43
问题 I am trying to add some visual indication, that there are no more pages in the desired fling direction in the ViewPager. However I am struggling to find a place, where to put relevant code. I have tried extending ViewPager class with following code, but the Toast is not displaying ( ev.getOrientation() returns always 0). I have also tried the same with history points, but ev.getHistorySize() returns also 0. What am I missing? Class example: public class CustomViewPager extends ViewPager {

GridLayout from support library does not show 2 rows on Android 2, onChildVisibilityChanged Error

坚强是说给别人听的谎言 提交于 2019-12-03 12:25:30
问题 Has anybody gotten the support library to render a grid layout correctly in Android 2? Instead of 2 rows and columns I get a single row on the screen and see this error in the logcat output: Android GridLayout Could not find method android.support.v7.widget.ViewGroup.onChildVisibilityChanged The same exact layout is working on Android4 -> ICS when I change the layout tag from android.support.v7.widget.GridLayout to GridLayout Could this be some issue with the setup? I have the gridlayout_v7

Turn on hardware acceleration if available (such Android 3+) with Android APK 2.2

情到浓时终转凉″ 提交于 2019-12-03 07:06:28
问题 I developed a application for Android 3.0, and it's runs perfectly well, but the client insist on compatibility with 2.2 devices. Disabling hardware acceleration, using Android Compatibility Package, a NIO-backport support (For tasks and executors) and some reimplementation of View methods I was able to port my app for Android 2.2 and works really good, but if I run this apk into a newer device the performance is extremely slowly, so I want to know how to turn on hardware acceleration if

Detecting thumb position in SeekBar prior to API version 16

主宰稳场 提交于 2019-12-03 05:26:10
Basically, I need to detect when the progress changes in the SeekBar and draw a text view on top of the thumb indicating the progress value. I do this by implementing a OnSeekBarChangeListener and on the public void onProgressChanged(SeekBar seekBar, int progress, boolean b) method, I call Rect thumbRect = seekBar.getThumb().getBounds(); to determine where the thumb is positioned. This works perfectly fine, but apparently getThumb() is only available in API level 16+ (Android 4.1), causing a NoSuchMethodError on earlier versions. Any idea how to work around this issue? I was able to use my own

How to make my website mobile and tablet compatible? [closed]

旧巷老猫 提交于 2019-12-03 04:00:12
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I want to make my existing website automatically adjust itself when viewed either on mobiles, tablets, or even when you adjust your screen on a desktop. Failing that, if it's too difficult, what suggestions do you have?? I basically want an ipad and iphone (android) version that

GridLayout from support library does not show 2 rows on Android 2, onChildVisibilityChanged Error

北战南征 提交于 2019-12-03 02:52:26
Has anybody gotten the support library to render a grid layout correctly in Android 2? Instead of 2 rows and columns I get a single row on the screen and see this error in the logcat output: Android GridLayout Could not find method android.support.v7.widget.ViewGroup.onChildVisibilityChanged The same exact layout is working on Android4 -> ICS when I change the layout tag from android.support.v7.widget.GridLayout to GridLayout Could this be some issue with the setup? I have the gridlayout_v7 library project in the Android tab of my Eclipse project properties and the v.13 jar is on the build