android-4.0-ice-cream-sandwich

ShareActionProvider with a split ActionBar

人走茶凉 提交于 2019-12-09 14:10:52
问题 I'm using a ShareActionProvider and would like to take advantage of the split ActionBar when there isn't enough room for it at the top - android:uiOptions="splitActionBarWhenNarrow" . The action works fine when the ActionBar does not need to split: However when the ActionBar does need to split, the ActionProvider seems to break the lower ActionBar layout completely. It fills the entire viewport below the top ActionBar and the action itself does not appear: Has anyone been able to use these

Distinguish between Tablet and Smart phone on ICS

妖精的绣舞 提交于 2019-12-09 11:35:03
问题 I understand that by default (pre ICS), to distinguish between a Tablet & Smartphone, a developer can use the sdk version in the Android Manifest (apart from screen size and openGL filters). Now with ICS running on both SP and Tablet, what options does a developer have in case I need to distinguish between SP and Tablet? I don't think screen size is reliable. Lets say for certain reasons I cannot have a common apk for SP and Tablet. I would also like to avoid a separate application for

ErrnoException: isConnected failed: EHOSTUNREACH (No route to host) when changing the wifi network using ICS

喜你入骨 提交于 2019-12-09 07:46:41
问题 When using my app on ics, after I change my wifi network from networkA to networkB all the requests for images start coming back with an exception. failed with exception > org.apache.http.conn.HttpHostConnectException: Connection to > https://m1.testapp.com refused at > org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183) > at > org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) > at > org.apache.http.impl

Why won't the Android browser span this paragraph over the full browser width?

北城余情 提交于 2019-12-08 22:53:25
问题 The Problem: The Question The paragraph will fill the complete width of the page in Firefox Firefox Mobile (tested with 4.0.3 on SGS2) Chrome Chrome Mobile Beta (tested with 4.0.3 on SGS2) Internet Explorer Internet Explorer Mobile (testes with Windows Phone Emulator) Opera Mobile (tested with 4.0.3 on SGS2) Android native browser (tested with 4.0.3 on SGS2 and Android emulator) What do I have to do so it does the same in the default Android browser? I tried: Please note that this example is

Horizontally center Views inside Android GridLayout

余生长醉 提交于 2019-12-08 18:54:05
问题 We are writing an app targeting ICS+ and believe a GridLayout is the best layout paradigm, but it seems very little has been written about it, and we are having some alignment issues. <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/row_background" android:rowCount="1" android:columnCount="3" android:layout_width="match_parent" android:layout_height="match_parent" android:useDefaultMargins="true" android:background="@drawable/list_item_bg"> <ImageView

Detect when application is started via NFC in ICS

十年热恋 提交于 2019-12-08 13:57:49
ICS introduces the possibility to share an application via Android Beam using NFC, and as far as I understood if an app is opened on deviceA it will automatically be started on deviceB (if it's already installed on it, otherwise the Market app will open) when the devices are close enough and a user "touches to beam" it. Is there a way, inside the launcher Activity, to detect if it has been started because of a NFC message or because of a user interaction? Only NFC Intents are started when a beam occurs. These are ACTION_NDEF_DISCOVERED, ACTION_TECH_DISCOVERED, or ACTION_TAG_DISCOVERED. Check

How do you to implement Android 4.0 Restful, HTTP post request

纵然是瞬间 提交于 2019-12-08 13:35:34
问题 Since they changed the way we make HTTP request in the latest Android SDK, I have not been able to find a tutorial that shows how to make HTTP post request. Especially for login. So I would like to see a some code examples that show how to implement an HTTP post request, and deals with the cookies. And if possible, I would also like to see a code example for https://security.stackexchange.com/questions/4302/how-to-implement-a-remember-me-on-a-mobile-app Thank you. 回答1: Library used: http:/

How to increase internal memory for Android 4.0 Emulator images?

穿精又带淫゛_ 提交于 2019-12-08 10:28:26
问题 Free internal memory is sparse on Android 4.0, because the system occupies quite some space. This limits the number of apps one can install. So, how can we increase the internal memory? In the dialog for creating new AVDs, I didn't see an option for it. What did I miss? I tried some of the partition size options, but it won't affect the internal memory or the emulator hangs during boot. 回答1: greenrobot i couldn't find that option in the UI either. but you can start the emulator from the

Detect when application is started via NFC in ICS

爱⌒轻易说出口 提交于 2019-12-08 08:03:26
问题 ICS introduces the possibility to share an application via Android Beam using NFC, and as far as I understood if an app is opened on deviceA it will automatically be started on deviceB (if it's already installed on it, otherwise the Market app will open) when the devices are close enough and a user "touches to beam" it. Is there a way, inside the launcher Activity, to detect if it has been started because of a NFC message or because of a user interaction? 回答1: Only NFC Intents are started

Connect to NAS device from Android

时光怂恿深爱的人放手 提交于 2019-12-08 05:35:53
问题 I'd like to add NAS support to one of my application, and it is critical that the application is capable of streaming the content and that it not has to download it to the device. The application will be streaming video content, so once the video is over, there shouldn't be any large video files on the device. What I've tried so far: jCIFS - Works beautifully, but isn't capable of streaming (to my knowledge). I've successfully created video files on the device using jCIFS, but they're still