android-3.0-honeycomb

Proguard error when exporting signed app using android.support.v4.app honeycomb compatibility package

强颜欢笑 提交于 2019-11-28 05:32:21
I am using v4 compatibility package in my project, but when I try to export a signed app, I get the following message from Proguard. I've Googled the whole evening, but I didn't find the answer to solve this. [2011-07-03 01:46:29 - worldscopeApp] Proguard returned with error code 1. See console [2011-07-03 01:46:29 - worldscopeApp] Warning: android.support.v4.app.ActivityCompatHoneycomb: can't find referenced method 'void invalidateOptionsMenu()' in class android.app.Activity [2011-07-03 01:46:29 - worldscopeApp] Warning: android.support.v4.app.ActivityCompatHoneycomb: can't find referenced

Action bar custom view

冷暖自知 提交于 2019-11-28 04:45:49
I want to declare a custom view, BUT I also want the home logo with up icon to appear on the left with its default functionality. How can I achieve to use both? Best way is to use XML styles: <style name="Theme.Main" parent="android:Theme.Holo.Light"> <item name="android:actionBarStyle">@style/Widget.ActionBar</item> </style> <style name="Widget.ActionBar" parent="android:Widget.Holo.Light.ActionBar"> <item name="android:displayOptions">showHome|useLogo|showCustom</item> <item name="android:customNavigationLayout">@layout/custom</item> </style> Then simply set this theme as either the

Handling orientation changes with Fragments

两盒软妹~` 提交于 2019-11-28 04:40:26
问题 I'm currently testing my app with a multipane Fragment -ised view using the HC compatibility package, and having a lot of difficultly handling orientation changes. My Host activity has 2 panes in landscape ( menuFrame and contentFrame ), and only menuFrame in portrait, to which appropriate fragments are loaded. If I have something in both panes, but then change the orientation to portrait I get a NPE as it tries to load views in the fragment which would be in the (non-existent) contentFrame .

Android - can I increase the textSize for the NumberPicker widget?

我们两清 提交于 2019-11-28 04:31:55
We got a NumberPicker widget in 3.0, but it seems that the textSize for this widget can't be modified. Am I missing something or is this the case? I'd really like to increase the font size, it's quite small with the default value. But I can't see a textSize property for it. Ginger McMurray We ran into the same problem and ended up recreating NumberPicker locally. There's a more in depth tutorial here . I was able to accomplish this by extending the default NumberPicker. Not ideal, but it works. public class NumberPicker extends android.widget.NumberPicker { public NumberPicker(Context context,

android_asset not working on Honeycomb?

做~自己de王妃 提交于 2019-11-28 04:28:30
问题 I have a shipping Android application that displays occasional static webpages that are included in the assets folder. I have been displaying these programmatically like: webView = new WebView(PKBDocument.KnowledgeBook.KBContext); setContentView(webView); webView.loadUrl("file:///android_asset/path/to the/file.html"); This works fine for API levels 3 - 9. I just recently received my shiny new Xoom and tried running the same app, and I get an error The webpage at file:///android_asset/path/to

Change theme according to android version

不想你离开。 提交于 2019-11-28 04:24:34
I am preparing my app to work smoothly with honeycomb. I have an small aesthetics question regarding with the android theme. For honeycomb it is recommended that the following theme is used. android:theme="@android:style/Theme.Holo.Light" How can I make my app use another theme when it is used in a previous version? Thanks in advance EDIT : Updated for released version of the 3.0 SDK. One way to do this is to set <uses-sdk android:targetSdkVersion="11"> . You should also place this above your <application> definition. This will tell the system to use the Holographic theme if it's available,

Tap outside Android dialog to dismiss it?

北战南征 提交于 2019-11-28 03:56:40
I was wondering if it's possible to somehow tap outside a popup dialog (or an Activity with a dialog theme), and dismiss it by just tapping outside of it? I made a quick picture to illustrate it: Normally, you have to press the back key to dismiss the dialogs, but on Honeycomb it could be great to have the option of just tapping outside the dialog, due to all the screen estate. My app is a single activity with Theme.Holo.Dialog. In my case the other answer did not work. It only made the other background apps or the launch screen to receive touch events. I found that using dispatchTouchEvent

IllegalArgumentException: No view found for id for fragment when fast switching ActionBar Tabs

笑着哭i 提交于 2019-11-28 00:12:33
问题 I am developing an Android app for tablets and not using the compatibility library. There is just one Activity and it uses the ActionBar with 3 tabs. In the TabListener I use setContentView to load the layout specific to that tab, and then add the relevant fragments to their frames. This almost works exactly like I want, except when you switch between the tabs fast enough the app will crash. I am using a Samsung Galaxy Tab as my debugging device and switching tabs is really fast. At a normal

What to do about ListActivity/MapActivity when converting to Fragments using the compatibility library?

守給你的承諾、 提交于 2019-11-27 23:38:59
问题 I'm converting an existing app to the Fragments API using the compatibility library. I've read that you're supposed to update classes that extend Activity to now use FragmentActivity. This is fine for most cases, but what about classes that extend ListActivity or MapActivity? What is the preferred way to handle this? I was hoping there was a ListFragmentActivity or something along those lines, but I don't see one. 回答1: There is a ListFragment: http://developer.android.com/reference/android

Hide Tablet system bar

♀尐吖头ヾ 提交于 2019-11-27 22:13:05
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 ? Code snippet to show/hide status bar on rooted android tablets To hide: Process proc = null; String ProcID = "79"; //HONEYCOMB AND OLDER if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH){ ProcID = "42"; //ICS AND