android-4.0-ice-cream-sandwich

How can I override TimePicker to change text color

随声附和 提交于 2019-11-28 02:26:34
My view has a white background, and it has to stay that way. I have a TimePicker on that white background.Everything is woking fine with android 2.3.3 but android 4.0.3 has a new timePicker style. The numbers have a very bright color. It is very hard to see them on the white background, and I didn't find a direct way to change the textColor. I don't want to change the background because it would look not so good. Is there any way to override this and set the color of the numbers to black? Sincerly, Wolfen Take a look at the android source for styles.xml https://github.com/android/platform

Program different layouts for different versions in android

喜夏-厌秋 提交于 2019-11-28 00:24:56
问题 I have to program my Android app with the best compatibility to different screen sizes (tablets and smartphones) and to the versions 2.3, 3.2 and 4.0. I know about the possibliy to name the folders of the layout like res/layout-sw600dp/. to match the layout exactly to different screen sizes. So, cause I will use completely different layouts for Tablets / Smartphones , I would start with a "Load Screen", which tests which Android-version is used and if there is used a tablet-or smartphone

How to use and test the Android 4.0 Calendar API in the emulator?

。_饼干妹妹 提交于 2019-11-28 00:12:19
问题 Do most use real phones to test Google Account specific Android features? For example, I want to develop/test the Ice Cream Sandwich calendar api and in the emulator I can add a Google Gmail account to the operating system, but the calendars never seem to sync. Here's a related post: How to read and edit Android calendar events using the new Android 4.0 Ice Cream Sandwich API? My question is how do you test it? I'd like to upgrade my nexus s phones and the galaxy 10.1 tablet but I'd also like

Android app doesn't call “onDestroy()” when killed (ICS)

我只是一个虾纸丫 提交于 2019-11-27 22:00:34
I'm developing an android app using bluetooth communication (using a propetary protocol) and I need to catch the moment when the app is killed. I wanted to use the "onDestroy()" method but it isn't called every time the app is killed. I noticed that it is called when I press the back button and, only sometimes, when I kill the app from the task manager. The question is: How can I catch the moment before the app is killed? Here is the code I tried to use: @Override public void onDestroy() { sendMessage(msg); Log.d("SampleApp", "destroy"); super.onDestroy(); } @Override public void finish(){

How to know “Don't keep activities” is enabled in ICS?

时光怂恿深爱的人放手 提交于 2019-11-27 20:45:54
How to know in settings "Don't keep activities" option is enabled in ics via code. If it is in enabled,how to prevent the activity. Note: I have used more activities in my application.Because of that settings if I move one activity to another the first activity is destroyed.I can save my data on the onSaveInstanceState. With out using saved instance state is there any way to do... Thanks in advance.. That flag is there for exactly this reason. The idea is to check and make sure your app handles its activities being destroyed. You can't override it because in the real world it might happen even

android 4.0 Dialog gets canceled when touched outside of dialog window

大憨熊 提交于 2019-11-27 20:24:11
Hi I am facing the problem on ICS like dialog is dismissed when we click outside dialog window, due to which I am getting problem like I don't get any confirmation from user. Please help. Check this method from the Android Developers site for dialog. Try using the dialog.setCanceledOnTouchOutside (boolean cancel) Pass a boolean value to enable/disable dialog behaviour when touched outside of the dialog window. Also go through these links: How do I fire an event when click occurs outside a dialog How to cancel an Dialog themed like Activity when touched outside the window? I hope this answers

How do I get IP_ADDRESS in IPV4 format

和自甴很熟 提交于 2019-11-27 18:23:42
I am trying to get the IP address of an device i.e using WIFI or 3G connection. I am getting the ip address in IPV6 format which is not understandable. I want in IPV4 format IP address.I have done google but dint found any proper solutions. here is code which I am using to get IP address of an device public String getLocalIpAddress() { try { try { for (Enumeration<NetworkInterface> en = NetworkInterface .getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {

How to disable/hide three-dot indicator(Option menu indicator) on ICS handsets

老子叫甜甜 提交于 2019-11-27 18:18:45
How to disable/hide three-dot indicator(Option menu indicator) on ICS handsets which does't have menu button. ? I am running application as <uses-sdk android:minSdkVersion="5"/> in Manifest, code is compiled with 4.0 . Three-dot indicator shows on every screen. Example for preference activities i don't want show Three-dot indicator, since it does't have any menu options. Adding android:targetSdkVersion="14" in manifest it works. However don't want hide/remove three dots button on all screens . Only in preference activities don't want to show this three dots button. Asaf Manassen Override

How to force overflow menu on android actionbar compat?

时光毁灭记忆、已成空白 提交于 2019-11-27 17:59:52
Android action bar compat Is it possible? On older devices (pre 3.0) the items that don't fit the action bar are only shown when the menu key is pressed, I want these items to be grouped in the actionbar's overflow menu. esilac The action overflow menu is only available when there is no hard menu button available on the device. I found this stated in the Framework Topics under User Interface > Action Bar, check out the 3rd bullet here . There is an action bar library written by Jake Wharton called ActionBarSherlock. Perhaps this is able to supply you with an action overflow menu style even

Tab widget have always in capital alphabets in android 4.0

一笑奈何 提交于 2019-11-27 17:54:13
问题 In Android 4.0 i put tab bar with two widget. in code i write in small alphabates(new) but in application it should always display (NEW) How to write small alphabates on tab in android 4.0 回答1: The default theme for tab views in Android 4.0 (the Holo theme) has android:textAllCaps set to true. You can create your own theme and then apply it to the action bar in your manifest to override this behavior. For more information on styling the ActionBar and creating your own styles, see: http:/