android-2.3-gingerbread

LayerDrawable.setLayerInset() not working on android 2.3

不问归期 提交于 2019-12-23 19:19:08
问题 Following sample working for android 4.1 but for android 2.3 left and right inset are not changed. What is the reason for this behavior? public class MyFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.badges_fragment_layout, container, false); view.setBackgroundDrawable(getCustomDrawable()); return view; } private Drawable getCustomDrawable() { LayerDrawable

Gingerbread devices not using Holo style from Theme.AppCompat (support library)

戏子无情 提交于 2019-12-23 09:38:11
问题 I'm using the v4 and v7 support library to integrate the action bar and navigation drawer in my app, which supports API 10+. I've followed the guide on the developer site to use Theme.AppCompat and style/Widget.AppCompat.ActionBar as the parent of my theme and action bar style, respectively. Everything works fine, except when I test on Gingerbread devices, things like a dropdown/popup menu has a white background (skin from the phone) and text fields don't use the holo-style backgrounds (again

Eclipse becomes stuck on “starting activity” when sending application to device. How to solve this?

你。 提交于 2019-12-23 09:08:43
问题 Sometimes, when I attempt to "Run" my application on my Droid Charge (running Gingerbread), Eclipse displays the following in the console: [2012-05-31 23:08:50 - SomeApp] Android Launch! [2012-05-31 23:08:50 - SomeApp] adb is running normally. [2012-05-31 23:08:50 - SomeApp] Performing com.test.SomeActivity activity launch [2012-05-31 23:08:52 - SomeApp] Uploading SomeApp.apk onto device 'DEVICEIDHERE' [2012-05-31 23:08:52 - SomeApp] Installing SomeApp.apk... [2012-05-31 23:08:53 - SomeApp]

Android 2.3: How do I switch from SCO to A2DP for a capable Bluetooth speaker?

佐手、 提交于 2019-12-23 04:14:06
问题 Now I can get it the app to start playing audio over A2DP and successfully switch to SCO, however when I try to switch back it plays over my phone's speaker instead. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); layout = (RelativeLayout) findViewById(R.id.layout); text = (TextView) findViewById(R.id.editText1); scoSwitch = (ToggleButton) findViewById(R.id.switch1); try { mp1 = MediaPlayer.create(this, R.raw.jc_cm

GCM messages are not received on android 2.3.6 v but working fine on android 4.X v

南楼画角 提交于 2019-12-23 02:49:15
问题 My GCM client is able to register on all versions but messages are received on android above 4.x versions, not on android 2.3.6 . I have made many changes but I cannot figure this problem out please help me, thanks in advance. manifest file code <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.democlientapp" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion=

Downloading files in API <9

流过昼夜 提交于 2019-12-22 08:35:50
问题 I just realized that my app, with over 300 users still using an Android version under Gingerbread, is having issues for them because they dont have the DownloadManager that was introduced in API 9 (2.3). Is there a compatibility library or something that I can use or is my best best just to use an asyncTask to download the files manually? 回答1: Is there a compatibility library or something that I can use No, DownloadManager is not in the Android Support package. I took a look at making my own

How to increase heap size on Android 2.3 (Gingerbread)?

北城余情 提交于 2019-12-21 23:01:04
问题 I am getting an OutOfMemoryError when I try to create a String larger than 4MB using StringBuilder.append() . As far as I know, StringBuilder doesn't have any limitations regarding size and so doesn't String . So I searched for "how to increase Android heap size" and as far as I could conclude from this answer and this answer, Gingerbread is the only version in which you have no way of dealing with the heap size, since for earlier versions you use the VMRuntime class and for newer versions

Samsung Galaxy S2 2.3.5+ not calling overScrollBy()

十年热恋 提交于 2019-12-21 04:22:09
问题 Seems like Samsung disabled their overscroll (probably due to an Apple suit). I have an implementation of a view that extends ScrollView and overrides protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY,int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) { ... return super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX, scrollRangeY, 0, metrics.widthPixels,isTouchEvent); } On every other device (Gingerbread

httpurlconnection is very slow on Android 4.2

夙愿已清 提交于 2019-12-20 22:58:10
问题 I can succesfully connect, send and receive data by using httpurlconnection. But it takes very long time to load all the data on my phone (Samsung s4, 4.2) and on android 4.2 emulator. But it takes almost 1-2 seconds (which is very fast) to load pics on Android 2.3.x emulator. Faster than my galaxy s4 on http connection. I'm using AsyncTask and my code works fine on both. It is just slow on android 4.2s. I tried removing chunkedStreaming, keep alive, changing timeout values etc. but still no

httpurlconnection is very slow on Android 4.2

依然范特西╮ 提交于 2019-12-20 22:57:41
问题 I can succesfully connect, send and receive data by using httpurlconnection. But it takes very long time to load all the data on my phone (Samsung s4, 4.2) and on android 4.2 emulator. But it takes almost 1-2 seconds (which is very fast) to load pics on Android 2.3.x emulator. Faster than my galaxy s4 on http connection. I'm using AsyncTask and my code works fine on both. It is just slow on android 4.2s. I tried removing chunkedStreaming, keep alive, changing timeout values etc. but still no