android-4.0-ice-cream-sandwich

EditText does not show current input (Android 4)

我怕爱的太早我们不能终老 提交于 2019-12-07 05:13:27
问题 My Android application contains an EditText view where you can type some short messages (single line). Pressing the keyboard's DONE key will append the message to a log view above (TextView) and clear the input view. Here's a snippet from my view xml: <LinearLayout ...> <TextView android:id="@+id/logView" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <EditText android:id="@+id/inputView" android:layout_height="wrap_content" android:layout_width="fill_parent"

ADK 1.0 devices fail to work with Jelly Bean, why?

天大地大妈咪最大 提交于 2019-12-07 04:45:16
问题 Just connected the tried and true ADK accessory to Nexus 7 and Galaxy Nexus - and it failed to connect with "could not read device protocol version" message. Thought that the board died, connected to Nexus S with ICS - worked just fine. Worked on Galaxy Nexus before Jelly Bean upgrade as well, so hardware failure can be ruled out. I've been watching ADK announcements pretty closely, but don't remember reading or hearing anything about this particular change, nor backward compatibility of

Android 4.0 custom notification like google music

大憨熊 提交于 2019-12-07 04:23:25
问题 I want to create a custom notification with a progress bar and a delete button. Screenshot: I succeed to create a custom notification with a progress bar, but I did not manage to create the delete event. I want to cancel the notification and stop the upload once the user click on the "x" (as in google music, so i don't want to start an activity to clear the notification). Here is my working code : notificationManager = (NotificationManager) context.getSystemService(context.NOTIFICATION

Gradient compatibility issue - ICS defaults to fewer colors than all the previous versions of Android

≯℡__Kan透↙ 提交于 2019-12-07 01:32:32
问题 Gingerbread (2.3.3) emulator left, ICS (4.0.3) emulator right. Notice the gradient fade effect difference inside the red box (open in separate window to see the full sized image). Mainview background: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/app_bg" android:orientation="vertical" > ... </LinearLayout> app_bg.xml <shape xmlns:android="http://schemas.android.com

Workaround/polyfill for Android 4.0.3 Stock browser z-index issues

白昼怎懂夜的黑 提交于 2019-12-06 20:18:57
问题 I'm looking for a workaround or polyfill for the z-index bug described in this report: http://code.google.com/p/android/issues/detail?id=31862 My markup and CSS looks basically the same as the one given in the bug report. It'd be really great if somebody could give me a hint in the right direction on how to solve this. 回答1: I had the same problem, and fixed it by adding the following css to my popups: -webkit-transform:translateZ(0); 回答2: Alternative solution (found here: https://coderwall

Fragment onHiddenChanged not called

試著忘記壹切 提交于 2019-12-06 19:00:27
问题 I recently added Fragments to my applications. For a new application i'll need to get notified as soon as my fragment is shown. So i can do some calculations as soon as my fragment is shown again. My Fragment is used with a TabIndicator and it's only one FragmentClass which is used a few times. Here's the normal standard override class: @Override public void onHiddenChanged(boolean hidden) { super.onHiddenChanged(hidden); } 回答1: Still looking for an answer? onHiddenChanged doesn't get called

How to change textcolor of switch in Android

随声附和 提交于 2019-12-06 18:43:37
问题 I'm creating an application which uses Android 4.0. I'm wondering if it is possible to change the text color of the text in a switch. I've tried setting the text color, but it doesn't work. Any ideas? Thanks in advance! 回答1: You must use android:switchTextAppearance attribute, eg: android:switchTextAppearance="@style/SwitchTextAppearance" and in styles: <style name="SwitchTextAppearance" parent="@android:style/TextAppearance.Holo.Small"> <item name="android:textColor">@color/my_switch_color<

Package Installer Application crashing when launched from Gmail app

霸气de小男生 提交于 2019-12-06 17:16:59
问题 I got the following error when i tried to Install an APK on my device. It is working in device Galaxy POP, Galaxy ACE s 5830. The only problem in galaxy s3 My app's manifest file is below. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.fixcity_app" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission

UDP sending on Android4.0 and before versions

允我心安 提交于 2019-12-06 10:05:21
In my code public void vodKeyCtrl(byte[] sendDataByte, int send_length) { try { Log.i(TAG, addr.toString()); InetAddress ia = InetAddress.getByName(addr.getKeyIp()); DatagramSocket socket = new DatagramSocket(0); socket.connect(ia, addr.getKeyPort()); DatagramPacket dp = new DatagramPacket(sendDataByte, sendDataByte.length); socket.send(dp); socket.setSendBufferSize(sendDataByte.length); socket.close(); } catch (Exception e) { Log.e(TAG, e.toString()); } } There seems no errors and exceptions,and it work fine on JAVA Application.While it just will not work on my phone i9300. I change code in

Android 4.0: setting SYSTEM_UI_FLAG_LOW_PROFILE & SYSTEM_UI_FLAG_HIDE_NAVIGATION from Activity instead of View

女生的网名这么多〃 提交于 2019-12-06 09:43:40
I am playing around with controlling the UI Navigation buttons in ICS. The current mechanism for suppressing the Nav Buttons is to call setSystemUiVisibility from a View using the SYSTEM_UI_FLAG_HIDE_NAVIGATION or SYSTEM_UI_FLAG_LOW_PROFILE flags. This seems like a strange place for setting these flags, as most other related settings (such as hiding the status bar) have been done through window LayoutParams properties. My question is if any of you have ideas for a good way to do it from an Activity context. Currently my app is designed to start with a base activity class which contains any