android-3.0-honeycomb

Style an Action Bar in Android Honeycomb

坚强是说给别人听的谎言 提交于 2019-12-20 10:35:53
问题 I'd like to set the background of an action bar (Honeycomb) using themes and styles. You can do it in code with ActionBar.setBackgroundDrawable(Drawable) , but I can't find the corresponding style attributes. I have tried using this theme and style for my Activity : <style name="Theme.MyApp" parent="android:style/Theme.Holo"> <item name="android:actionBarStyle">@style/ActionBar</item> </style> <style name="ActionBar"> <item name="android:background">@drawable/action_bar_background</item> <

Fragment loading spinner/dialog in Honeycomb

别等时光非礼了梦想. 提交于 2019-12-20 10:14:22
问题 When loading data into my Fragments I would would like to have an indeterminate spinner in the middle of the fragment (example in pic below) to show the user that content is loading within that particular pane. What's the best way to do this in Honeycomb? I don't really want to use a spinner in the action bar, it's not immediately obvious where data is loading. Also, I don't want an indeterminate progress dialog because it appears in the center of the entire app and also stops the user from

Fragment loading spinner/dialog in Honeycomb

偶尔善良 提交于 2019-12-20 10:13:11
问题 When loading data into my Fragments I would would like to have an indeterminate spinner in the middle of the fragment (example in pic below) to show the user that content is loading within that particular pane. What's the best way to do this in Honeycomb? I don't really want to use a spinner in the action bar, it's not immediately obvious where data is loading. Also, I don't want an indeterminate progress dialog because it appears in the center of the entire app and also stops the user from

ProgressBar in an ActionBar, like GMail app with Refresh

痴心易碎 提交于 2019-12-20 08:42:09
问题 I would like to do the same thing than the GMail application on Honeycomb tablets. When you click on the Refresh button, the icon is replaced by a ProgressBar. How can I do this? Thanks 回答1: Ok, I tried what Cailean suggested but it didn't work for me. Every time I want to revert indeterminate progress to the original button it becomes unclickable, I used this layout for the progress (actionbar_refresh_progress.xml) <?xml version="1.0" encoding="utf-8"?> <ProgressBar xmlns:android="http:/

Modify color Android selected Dropdown item

孤人 提交于 2019-12-20 04:16:56
问题 How can I modify the text color of the selected item on a Spinner in an Android Honeycomb application? EDIT: I have a Spinner layout which i'm inflating. Is it possible to add an attribute in this spinner to change the text color? I was able to change the background for example using the android:background on the spinner, but I'm not able to do the same with android:textColor. 回答1: I used this code for ListView adaper: @Override public View getView(int position, View convertView, ViewGroup

Can GeoCoder getFromLocation method cause a NetworkOnMainThreadException to be thrown?

半世苍凉 提交于 2019-12-20 03:00:12
问题 I have an app which was tested thoroughly and working fine on Android Gingerbread (and older Android versions). I've noticed from users' reported crash errors that phones running later versions of the Android operating system are throwing a NetworkOnMainThreadException . I'm trying to work through my code and eliminate/fix all culprits. Would the GeoCoder getFromLocation and getFromLocationName methods throw a NetworkOnMainThreadException if called from the main/ui thread? 回答1: Seems like

Illegal State exception on double clicking a edittext

倖福魔咒の 提交于 2019-12-20 01:41:23
问题 Hi I am getting an illegal state exception on double clicking a EditText .Here is the stack trace.pls help 06-30 11:18:24.970: ERROR/AndroidRuntime(3011): java.lang.IllegalStateException: ActionBarContextView can only be used with android:layout_width="match_parent" (or fill_parent) 06-30 11:18:24.970: ERROR/AndroidRuntime(3011): at com.android.internal.widget.ActionBarContextView.onMeasure(ActionBarContextView.java:257) 06-30 11:18:24.970: ERROR/AndroidRuntime(3011): at android.view.View

Illegal State exception on double clicking a edittext

只谈情不闲聊 提交于 2019-12-20 01:41:03
问题 Hi I am getting an illegal state exception on double clicking a EditText .Here is the stack trace.pls help 06-30 11:18:24.970: ERROR/AndroidRuntime(3011): java.lang.IllegalStateException: ActionBarContextView can only be used with android:layout_width="match_parent" (or fill_parent) 06-30 11:18:24.970: ERROR/AndroidRuntime(3011): at com.android.internal.widget.ActionBarContextView.onMeasure(ActionBarContextView.java:257) 06-30 11:18:24.970: ERROR/AndroidRuntime(3011): at android.view.View

Cannot receive broadcast in ICS

只谈情不闲聊 提交于 2019-12-19 21:17:10
问题 I writing 1 app for Android 4.0, and it's started via broadcastreceiver. My code is below: In AndroidManifest.xml: <uses-permission android:name="android.permission.INTERNET" /> <application android:icon="@drawable/icon" android:label="@string/app_name"> <receiver android:name="com.Android.Exercise.StartUpReceiver" android:permission="android.permission.RECEIVE_BOOT_COMPLETED"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED"/> <!--<action android:name=

Binary XML file line #9: Error inflating class fragment

丶灬走出姿态 提交于 2019-12-19 05:19:08
问题 Am getting Error inflating fragment error while running calling an Activity which having fragments. CheckList is Activity which contains listview and Description fragments. and its xml code is: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <fragment class="com.uday.honeytest.CheckList$listview" android:id="@+id/titles" android:layout_weight="1" android:layout