android-3.0-honeycomb

Hide Tablet system bar

安稳与你 提交于 2019-11-27 04:34:22
问题 I want to hide system bar for tablet device. I searched a lot but not succeed. I added image for it. I found some solution like View v = findViewById(R.id.view_id); v.setSystemUiVisibility(View.STATUS_BAR_HIDDEN); but I dont know how to use it And I know that is possible as http://forum.xda-developers.com/showthread.php?t=1228046 Can any one know how to do this ? 回答1: Code snippet to show/hide status bar on rooted android tablets To hide: Process proc = null; String ProcID = "79"; //HONEYCOMB

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

a 夏天 提交于 2019-11-27 04:22:31
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 flickers a bit. Hard to explain but I hope I'm being sort of clear, if not, ask! None of standard

How can I customize the Action Mode's color and text?

五迷三道 提交于 2019-11-27 03:54:10
The default action mode (3.0 and up) comes with a green theme and a 'Done' button on the left side. How can I customize these? Thanks adneal This is the style used for any ActionMode, I pulled it from the SDK. You'll need to create your own style to customize it. It's really easy to do. If you've never done anything like this before, you should read through this post on customizing the ActionBar. It explains everything you'll need to know. <style name="Widget.ActionMode"> <item name="android:background">?android:attr/actionModeBackground</item> <item name="android:backgroundSplit">?android

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

你说的曾经没有我的故事 提交于 2019-11-27 03:18:57
问题 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

Keyboard layout hiding android action bar?

那年仲夏 提交于 2019-11-27 03:14:21
问题 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

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

北战南征 提交于 2019-11-27 02:59:57
问题 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

How to align items in action bar to the left?

落爺英雄遲暮 提交于 2019-11-27 02:55: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? 回答1: 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

Connect USB device to Android Emulator?

夙愿已清 提交于 2019-11-27 02:09:33
问题 We've been looking into Android 3.1+ and its ability to read/write to USB devices connected to the OTG/Host port. I've found some code examples that allow me to detect and read/write to a USB HID device, but at the moment, I simply don't have a physical 3.1+ compatible device to deploy and remotely debug on. Does anyone know how I can attach my HID device to the emulator, via the PC/Eclipse so the app can detect and read/write to/from the device? I've tried listing the currently connected USB

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

陌路散爱 提交于 2019-11-27 01:52:14
问题 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.

Disable Home Button in Android ICS (4.0)

一个人想着一个人 提交于 2019-11-27 01:38:31
I am making a proprietary app for a company which will never release it to the Android Market (or Play Store I guess now) in Ice Cream Sandwich (Android 4.0). I need to disable the Home so the users cannot maliciously uninstall software or delete the data that the app captures. This latest version is the first to be written in 4.0, the previous versions were written in 2.2 and 3.2. For disabling the Home button in 2.2, I associated the app as a home replacement, so the button just reopened the app, but I can no longer use this method, as that somewhat prevents us from doing our updates to the