android-3.0-honeycomb

How Android application decide if they want to use network proxy or not

梦想与她 提交于 2019-11-28 13:07:48
I have been running some testing with wifi proxy settings on a Motorola Xoom with Android 3.2. So first of all, it is a big step forward comparing to 2.x releases. now if you set proxy, most of the apps automatically get it (in 2.x, only builtin browser uses it). So I tried things like yahoo finance, bloomberg, etc. and they all going through proxy fine. What I don't get is some browsers like firefox, Opera, will not go through proxy. Any idea how they did that. Basically in my app, how can I decide if I want to use proxy or try to connect directly. Based on my testing, if we don't do anything

Can I remove a fragment defined in a layout.xml file?

本小妞迷上赌 提交于 2019-11-28 09:58:43
Is is possible to use FragmentTransaction and the remove() method to get rid of fragments that are defined in the layout.xml (using the fragment tag) ? I did not get this to work using the support libraries v4. The fragment stays in place after you commit the FragmentTransaction, after calling remove(). Can anyone tell me if this is by design, a bug or a feature? It is possible to replace a fragment that is defined in the lyaout.xml, so I find it a bit strange that it should not be possible to remove it? David C. Sainte-Claire The native APIs available starting in Honeycomb work the same as

Keyboard layout hiding android action bar?

主宰稳场 提交于 2019-11-28 09:49:36
In my Android application running in a XOOM device, when I click in an Edittext the keyboard opens and hides the Actionbar. I don't want this to happen, how can I solve this? This is done by the Google Contacts app for the tablet for example. EDIT: I have several edittexts in which the user needs fo fill. At first, when the user clicked on one edittext on the bottom, the keyboard showed up and hide the edittext in which the user was typing, so he couldn't see what he was typing. I found it really bad, and to solve it I just added to the manifest: android:windowSoftInputMode="stateVisible

How to ignore button click of “Recent Activity Button” in android 3.0

强颜欢笑 提交于 2019-11-28 09:33:16
My question is self explanatory. I have searched a lot but could not found the way to handle Recent activity button click. I want to ignore the hardware button clicks of Recent Activity button from the status bar from android 3.0 tablet. Currently what I have tried so far is: public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { return true; } // in the same way I have written it for KEYCODE_HOME } can you tell me what should I write to handle recent activity button? Thanking you in advance. :) EDIT: This is what I have tried now. The KEYCODE_APP_SWITCH

How to align items in action bar to the left?

百般思念 提交于 2019-11-28 09:28:27
I have an actionbar with a searchview but I'd like to align it to the left such as in the maps app as opposed to the right. How would I do this? You can do this Try this it would definetly help: ActionBar action=getActionBar(); action.setDisplayShowCustomEnabled(true); action.setDisplayShowHomeEnabled(false); action.setDisplayShowTitleEnabled(false); RelativeLayout relative=new RelativeLayout(getApplicationContext()); relative.addView(new SearchView(getApplicationContext())); action.setCustomView(relative); Do not forget to add layout params to your searchview so that it may align on right to

VerifyError deploying on API 1.6

こ雲淡風輕ζ 提交于 2019-11-28 07:38:10
I've come across a backwards compatibility issue when deploying my application on android 1.6. Im getting a VerifyError on this piece of code: if(android.os.Build.VERSION.SDK_INT >= 11) { getActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar_bg)); } This is not unexpected since getActionBar() doesn't exist pre API 11, however post-1.6 (API 5 and higher?) builds all semi-gracefully go around this according to the logcat message im getting when deploying for example on a API level 8 device; 06-27 16:47:04.333: INFO/dalvikvm(11529): Could not find method com.me.app

Android Honeycomb: NetworkOnMainThreadException even when using AsyncTask and no strict mode?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 07:34:07
I run into a NetworkOnMainThreadException with my Android 3.0 app. Searching for a solution I found this , but if I understand this correctly, default setting would be that the strict mode is turned off. Also, all my network access is in an AsyncTask , so I don't see the point in this Exception anyway. So, I'm quite desperate now what I should do to prevent this... Kind regards, jellyfish Edit: This blog entry says that AsyncTask should be enough, but at least clarifies the StrictMode point. Solution: I turned off the StrictMode (its probably better to keep some settings but I couldn't be

Is there a standard way to add dividers between action bar items in Android 3.0?

血红的双手。 提交于 2019-11-28 06:33:22
I have a slight problem trying to customise the look of the action bar in my app. I want to be able to have the pixel wide dividers to group action bar items that you see in many of the native apps (e.g. Gmail, Calendar). I found a way to do this by adding a menu item and setting the 'android:actionLayout' attribute to a custom layout for the divider: <View android:background="@color/LightGray" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_width="1dip" android:layout_height="fill_parent" /> This works nicely, but the issue is it counts as a menu item and the

honeycomb sync adapter features for editing contacts

喜欢而已 提交于 2019-11-28 06:15:23
问题 I'm developing a sync adapter. I found this: http://groups.google.com/group/android-developers/msg/85f9304dfcc4e284 In that forum a google employee states: In releases of Android from Eclair through Gingerbread integrated editing of 3rd party contacts is poorly supported. The trick is to insert a data row, "Edit in MyApp", which would take the user to your app and your app would then provide an editor activity. Also, there is no provision in the Contacts UI for creating new contacts in 3rd

Handling the missing MENU button in new versions of Android (3.x and up)

这一生的挚爱 提交于 2019-11-28 06:12:31
I'm a fan of the menu button as used in Android <3.0, as it was very useful for my game apps - it allowed me to take important but gameplay irrelevant functionality (saving game, reference info links) and place it somewhere where it did not clutter up the main game interface, but was still easily accessible (the options menu). This use of keys became a problem with 3.0, because it removed the MENU button and substituted it with the Action Bar. The Action bar is really not suitable for a game which likes to run full-screen, so that was a real pain. No action bar - no access to the options menu.