android-2.3-gingerbread

setItemChecked not working on Gingerbread

这一生的挚爱 提交于 2019-12-19 11:49:03
问题 I am using the following selector to change the appearance of text in a listView item: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:color="#FFFFFFFF" /> <!-- checked --> <item android:state_activated="true" android:color="#FFFFFFFF" /> <!-- activated --> <item android:state_pressed="true" android:color="#FFFFFFFF" /> <!-- pressed --> <item android:state_focused="true" android:color="#FFFFFFFF" /> <!-- focused --> <item

Get sorting order preference selected user in Contacts>settings in Android Device and How to reduce query time?

我的梦境 提交于 2019-12-19 02:01:31
问题 I have two questions: 1: How can my application know Default sorting order used for sorting native "Android Device Contacts"? Inside "Contacts" -> "Settings" in android, we have " List by " and " Display Contacts by" options. How can I get these prefrences in my application. For example: suppose device contacts are sorted by "First Name", then application should get some constant(or something similar). On the other hand, if contacts are sorted by "Last Name" then application should get

Android GCM instanceID.getToken() throws TIMEOUT exception on Gingerbread

牧云@^-^@ 提交于 2019-12-14 04:01:08
问题 As the title indicates I get a TIMEOUT exception when trying to get token using Google Cloud Messaging on API 10 emulator. I have added my google account on the device, checked that "Sync" is ON, also added the <action android:name="com.google.android.c2dm.intent.REGISTRATION"/> in the manifest in the receiver and still cannot find out what is causing this: 11-25 17:35:00.896 29750-29774/com.example.alexis.myapplication W/InstanceID/Rpc: No response android.os.ConditionVariable@b667bc18 11-25

Android 2.2/2.3 doesn't load YouTube videos on the YouTube app from a WebView

大兔子大兔子 提交于 2019-12-14 03:58:47
问题 I know that this question has been answered many times, but I still can't get it to work on Android 2.2 nor 2.3. I am developing an app which is composed of tabs. One of those tabs loads the mobile version of YouTube inside a WebView. So far so good. The problem is that the videos don't play inside a WebView, so I'm using the YouTube app as here is suggested. Great! It works in Android 2.1, but not in 2.3. All the phones that I'm using have the YouTube app instaled. It simply doesn't display

Monodroid - EditText input method won't accept numbers

别说谁变了你拦得住时间么 提交于 2019-12-14 01:40:27
问题 I am having some very strange problems with the EditText control in Mono for Android. My solution is targeting 2.3 and I am debugging on a T Mobile VivaCity. Here is my AXML for the EditText <EditText android:inputType="text" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/ctl_searchText" /> When I show the View containing the EditText the keyboard automatically appears, this is not a problem. The problem is I can't enter any numbers by tapping the

google play services version issue real device

霸气de小男生 提交于 2019-12-13 07:46:49
问题 I´m new on android developement, and i have faced some troubles with google maps. here are a few questions I´know that adv with target 4.2 or higher includes google play services, does this imply that real devices with lower versions will not run my app? 01-28 15:46:55.529: W/GooglePlayServicesUtil(627): Google Play services out of date. Requires 4132500 but found 4131530 the lowest version for my app is 2.3 and it worked until i use gps and polilyne to draw routes between markers. I found a

Rendering rounded corners for imageView on Android

我与影子孤独终老i 提交于 2019-12-12 12:31:50
问题 I have the following piece of code for rendering an imageView with rounded corners. public class RoundedCornerImageView extends ImageView { private int rounded; public RoundedCornerImageView(Context context) { super(context); } public RoundedCornerImageView(Context context, AttributeSet attrs) { super(context, attrs); } public RoundedCornerImageView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public int getRounded() { return rounded; } public void

Android NumberPicker limits on Gingerbread

大城市里の小女人 提交于 2019-12-11 20:05:21
问题 I have a numberpicker: AlertDialog alertDialog = builder.create(); alertDialog.setTitle("Quantidade"); NumberPicker NP = (NumberPicker)view.findViewById(R.id.npicker); NP.setMaxValue(1000); NP.setMinValue(1); alertDialog.setButton(...); alertDialog.show(); This works fine on Android 4.0.x, but on Android 2.3.x I get java.lang.NoSuchMethodError: android.widget.NumberPicker.setMaxValue If I remove NP.setMaxValue(1000) and NP.setMinValue(1) , it works but the limits are set as 0, is there any

Android Fullscreen Not Working: Gingerbread

谁说胖子不能爱 提交于 2019-12-11 15:09:23
问题 I am trying to make a fullscreen activity, but it doesn't seem to work in GingerBread, here is my code @SuppressLint("NewApi") @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_eyes); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH){ ActionBar actionBar = getActionBar(); actionBar.hide(); } if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD){ requestWindowFeature(Window.FEATURE_NO

How to enable Hardware Acceleration on ICS, but disable in Gingerbread?

陌路散爱 提交于 2019-12-11 01:32:25
问题 I want my app to be hw accelerated in ICS, but support of 2.3.3 is still needed too. Can I enable HW acceleration for ICS only? Or I can only drop 2.3.3 support? 回答1: Hardware acceleration was not added until 3.0. This is not an issue. ref: http://developer.android.com/guide/topics/graphics/hardware-accel.html 回答2: on ICS (android 4+) ,GPU acceleration is enabled by default and can be disabled in the manifest. up to gingerbread, including, (up to android 2.3.x) , it's disabled since it's not