android-4.0-ice-cream-sandwich

Mixing Android widget old & new themes

旧时模样 提交于 2019-12-24 02:02:10
问题 I'm starting my second Android app and find that I would like to mostly use HOLO dark theme for app. EXCEPT for the EditTexts, I would prefer to use the old Gingerbread style ones (looking closer to iOS) with some rounded corner. I'm a bit lost as to how I can achieve this. If anyone could drop some hints or links that would be HIGHLY appreciated 回答1: In your Theme: <style name="myTheme" parent="android:Theme.Holo"> <item name="editTextStyle">@style/MyWidget.EditText</item> </style> <style

Mixing Android widget old & new themes

烈酒焚心 提交于 2019-12-24 02:01:08
问题 I'm starting my second Android app and find that I would like to mostly use HOLO dark theme for app. EXCEPT for the EditTexts, I would prefer to use the old Gingerbread style ones (looking closer to iOS) with some rounded corner. I'm a bit lost as to how I can achieve this. If anyone could drop some hints or links that would be HIGHLY appreciated 回答1: In your Theme: <style name="myTheme" parent="android:Theme.Holo"> <item name="editTextStyle">@style/MyWidget.EditText</item> </style> <style

can not launch home from android 4.0

核能气质少年 提交于 2019-12-23 23:05:22
问题 I want to launch Home Screen From my application for that I used Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); I also follow this thread Now I am having problem to launch in ICS(4.0). Problem is that I can't launch home screen while I am in some other application(to check this I created a thread in my app which will sleep for 5 sec and fires the intent so that I get time to go in

Android webview loading html5 page from SD card with mp4 videos on various API

自闭症网瘾萝莉.ら 提交于 2019-12-23 15:08:09
问题 this is my first question on the forums. I'm building an app which implements a simple webview that loads an html5 page from the SD card. The app is a presentation made of 5 sections, and each section is contains some text overlayed on top of an HD video about 2 seconds long that plays in loop, basically acting like a page with a video background. The app runs fullscreen with automatic letterboxing / pillarboxing depending on the video resolution and orientation. On Chrome (Windows 7) and

Android Full Width ICS style Minimalist Bottom ButtonsViews

故事扮演 提交于 2019-12-23 09:57:02
问题 I want to make some buttons that look like this the following: I've looked pretty hard for preset ICS ones in the android.widget package, but I can't find any. I figure there's got to be an easy way, since they seem to be thematic of the entire OS version. If anyone knows of a way to make buttons look like these I'd be a happy camper. 回答1: In case you are looking for the XML layout of the button from Android ICS like the one in the following screenshot, here is the XML layout that I found

Work around SpellCheckerSession leak?

无人久伴 提交于 2019-12-23 09:32:31
问题 I discovered my Activity is leaking on the ICS emulator. HProf seemed to show SpellCheckerSession keeping a reference to my Activity around, and there appears to have been a fix: https://github.com/android/platform_frameworks_base/commit/df3722895172e03c81787f62d922daabaad3e20b But is there any way to work around this in the mean time? Can I disable spell checking somehow? 回答1: Does it need a Context ? Maybe pass the Application Context by using activity.getApplicationContext() . 回答2: I've

Notification Number and Ice Cream Sandwich?

你离开我真会死。 提交于 2019-12-22 11:17:24
问题 http://developer.android.com/reference/android/app/Notification.html#number Can anyone please confirm if this was removed from ICS (or before)? I usually do my testing in 2.2 and just noticed the little number badge isnt showing in ice cream sandwich in the status bar. Which version was it removed or is this just a bug? 回答1: Correct, the number badge is no longer overlaid on the notification icon in Android 3.0 and later. 来源: https://stackoverflow.com/questions/8350615/notification-number-and

onScrollChanged() never fired on Android 4.0

眉间皱痕 提交于 2019-12-22 06:49:31
问题 I have a GridView that shows images from your gallery. When user scrolls the list, details about the image animate in from the left. I implemented this in the class that defines custom layout for the GridView item. It extends LinearLayout . OnScrollChangedListener mScrollListener = new OnScrollChangedListener() { @Override public void onScrollChanged() { if (!getGlobalVisibleRect(r)) { resetAnimation(); } else { if (checkBounds()) { showInfo(); } } else { hideInfo(); } Method resetAnimation()

TimePicker NullPointerException on ICS

﹥>﹥吖頭↗ 提交于 2019-12-22 05:31:54
问题 Alright so I just switched my TimePickerDialog to a TimePicker widget directly visible in the Activity I'm working on because of customer demand. The problem is when I press any of the arrows on said TimePicker , I get a NullPointerException. Just to clarify, no code what so ever is attached to the TimePicker except this line in the onCreate() method of my Activity: ((TimePicker) findViewById(R.id.time_picker)).setIs24HourView(true); I found this post on the Google Forums regarding this issue

TimePicker NullPointerException on ICS

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 05:31:09
问题 Alright so I just switched my TimePickerDialog to a TimePicker widget directly visible in the Activity I'm working on because of customer demand. The problem is when I press any of the arrows on said TimePicker , I get a NullPointerException. Just to clarify, no code what so ever is attached to the TimePicker except this line in the onCreate() method of my Activity: ((TimePicker) findViewById(R.id.time_picker)).setIs24HourView(true); I found this post on the Google Forums regarding this issue