android-4.0-ice-cream-sandwich

How to force overflow menu on android actionbar compat?

末鹿安然 提交于 2019-12-17 15:27:57
问题 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. 回答1: 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

Android spinner with date picker, like Google Calendar app

我们两清 提交于 2019-12-17 15:23:54
问题 I'm trying to get a text box that looks like a spinner to activate a date picker dialog. This is done in both the Google Calendar app and the Contacts app (for birthdate) on ICS. Do I need to use a spinner, and if so how do I change it's input view to be a date picker? Or if not, how do I get a text view to have the little triangle that usually indicates a spinner? 回答1: Twaddington's comment on his answer is actually the right approach. What you need is to create a text view and apply the

How to programmatically create a new VPN interface with Android 4.0?

有些话、适合烂在心里 提交于 2019-12-17 10:19:39
问题 I'd like to know whether it's possible to create a VPN interface programmatically with the new VPN APIs in Android 4.0. I've looked through http://developer.android.com/resources/samples/ToyVpn but this is about creating a complete VPN client that handles the connections etc. I only want to add a new VPN configuration and possibly remove existing ones. There are lots of questions like this but they all seem to be pre 4.0. I understand that previously this wasn't possible, but one would think

How to detect “Recent Apps” system button clicks (Honeycomb+)

你离开我真会死。 提交于 2019-12-17 07:25:29
问题 I'm wondering what method this button calls. My game always pauses/resumes correctly except for when I use this button, its seems like this button doesn't call the onPause() and onResume() methods of an Activity. It works if I exit the game, go to another window(like the one on the picture) and then use this button to resume. But If I just press this button, when ingame, the game pauses but the thread dosnt resume like it does every other time, the game kind of just stands still on screen and

android 4.0, text on the action bar NEVER shows

最后都变了- 提交于 2019-12-17 06:26:38
问题 I am trying to use the new api's from google, specifically the action bar. When the build was set at api 10, if I pressed the menu button, I got nice looking menu options, each with a picture and icon. When using api 14, No matter what I try, it always puts the icon in the action bar with NO text. I have tried everything I can think of. I gave it the "with text" property, changed the text to a single character (in case it was a room issue), but nothing. I have seen this done before, even in

android 4.0, text on the action bar NEVER shows

社会主义新天地 提交于 2019-12-17 06:26:05
问题 I am trying to use the new api's from google, specifically the action bar. When the build was set at api 10, if I pressed the menu button, I got nice looking menu options, each with a picture and icon. When using api 14, No matter what I try, it always puts the icon in the action bar with NO text. I have tried everything I can think of. I gave it the "with text" property, changed the text to a single character (in case it was a room issue), but nothing. I have seen this done before, even in

TYPE_SYSTEM_OVERLAY in ICS

霸气de小男生 提交于 2019-12-17 04:59:26
问题 In Honeycomb I was able to create a system overlay with TYPE_SYSTEM_OVERLAY and receive touches with FLAG_WATCH_OUTSIDE_TOUCH. Now ICS has changed something. I can still create the system overlay, but i can't get touches. Now, i am able to create the same with TYPE_SYSTEM_ALERT and get touches, but it just catches the touchevents, and not passing them on like in Honeycomb. Any idea's? Kind regards 回答1: Everything you describe is true. It is presumably to tighten up security, as the former

Changing overflow icon in the action bar

纵饮孤独 提交于 2019-12-17 03:22:25
问题 Is it possible to change the overflow icon in the action bar? I have blue icons for all ActionBar items and I also want to change the overflow icon when it appears. 回答1: You can with a style, but you have to add it to the main Theme declaration. <resources> <!-- Base application theme. --> <style name="Your.Theme" parent="@android:style/Theme.Holo"> <!-- Pointer to Overflow style ***MUST*** go here or it will not work --> <item name="android:actionOverflowButtonStyle">@style/OverFlow</item> <

Android VideoView Error 1,0

给你一囗甜甜゛ 提交于 2019-12-13 12:15:53
问题 I have an application thats main goal is to play a specific video file. it plays the video correctly sometimes. But other times it gives me this error: 03-21 14:52:36.181: I/AwesomePlayer(119): setDataSource_l('/data/data/my.package.name/files/MyMovie.mp4') 03-21 14:52:36.196: W/VideoView(26612): Unable to open content: /data/data/my.package.name/files/MyMovie.mp4 03-21 14:52:36.196: W/VideoView(26612): java.lang.IllegalArgumentException: The surface has been released 03-21 14:52:36.196: W

Android 4.0.4 MediaPlayer prepare issue using RTSP urls

做~自己de王妃 提交于 2019-12-13 12:04:27
问题 I am experiencing an odd issue with a video streaming application I am working on. The actual streaming of video/audio is working fine on all of my test devices. However, on seemingly any device 4.0+, when using an RTSP URL, prepare() returns instantly (this causes an issue providing proper feedback to the users while a video is loading and interferes with a few other systems I have in place). Below is the block of code where I initialize and setup my MediaPlayer, but keep a few things in