android-theme

Usage of ?android:attr/ in backwards compatible apps

五迷三道 提交于 2019-11-28 23:28:05
I'm trying to make my ICS (API level 15) app compatible with Gingerbread (API level 10), and I'm getting InflateException Error inflating class <Unknown> for any layout XML that has an ?android:attr/ attribute. If I comment out these attributes I can compile and run the app, but then it, of course, looks aweful. I'd rather not duplicate all of the items from android.R.attr that I'm using, but at the moment I'm lost as to another way to do it. I'm using ActionBarSherlock to get the ActionBar working, and I don't seem to be using anything else that requires the support library (although I've

Setting Holo theme for Android application

青春壹個敷衍的年華 提交于 2019-11-28 23:05:00
问题 I have a simple login screen with username and password. I'd like it to show the EditText fields in the same way as you see in the Holo theme on Ice Cream Sandwich and Honeycomb. In my manifest file I have <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Holo"> Shouldn't the text fields now look different e.g. have no top, left and right borders? Mine seem to look the exact same. I'm sure I'm doing something very basically

How to set the theme for the application, to avoid wrong color transitions?

本秂侑毒 提交于 2019-11-28 20:39:41
Background I'm developing a themes chooser feature in my "app manager" app , and I've succeeded setting the theme dynamically for each of the activities. AGAIN : this is not about setting the theme for the activities. This actually works fine for me. The problem The acitivties are showing the correct theme, but the application itself, when launching the app, is showing the wrong one, no matter what I do. This is a problem because when the user opens the app, he will see the background of the theme of the app, and only after a few moments the activity will be shown with the theme the user has

Different Theme for different Android SDK versions

被刻印的时光 ゝ 提交于 2019-11-28 19:13:01
Is there a way to use a different theme depending on which SDK version the application is installed on? The reason I ask is because I want to support all the way back to SDK version 8, but for those users that have ICS I want to be able to follow the design standards for ICS and use the Holo theme. I can see from Program different layouts for different versions in android that I can have a folder values-v14 which will have a theme.xml to override the theme declaration. However, it won't compile if I reference Theme.Holo. I believe this is because I have the following in my AndroidManifest.xml

Dropdown Spinner outside of actionbar? (IceCream Sandwich style, w/ActionBarSherlock)

孤人 提交于 2019-11-28 18:01:51
Is there a way to create a Dropdown Spinner for Android 2.3.3? I am using ActionbarSherlock. Here is an Example of what I mean: Thanks As it stands, you're in luck. It can be done with ActionBarSherlock and it works with versions pre-4.0 . However, I'm not 100% sure Jake Wharton will want us to use it like this, since it's not exactly "public api", AFAIK (I've meant to ask). Anyway, you have to first create your own class to extend from the ActionBarSherlock class: public class MyIcsSpinner extends IcsSpinner { public MyIcsSpinner(Context context, AttributeSet attrs) { super(context, attrs,

use holo theme on Android < 4.0

那年仲夏 提交于 2019-11-28 17:08:25
问题 I'm developing an app for Android 2.2 and higher. I use the great ActionBarSherlock (thank you, Jake Wharton !!) to use the action bar on pre-ICS devices. While the actionbar looks great, all other gui elements have the look of the default theme of the device (in my case HTC Sense 3). Is there a possibility to style my (>= Android 2.2) app on all android devices with the Holo.Dark.Theme? I compile my app with Android 4.0.3, the minSDK version is 8. 回答1: Enjoy HoloEverywhere, that's the whole

How to make Beautiful & Stylish apps like Timely

别等时光非礼了梦想. 提交于 2019-11-28 13:13:46
问题 A Quote from Google in terms of Designing, and some example of apps: Based on what Google said in http://developer.android.com/ within design section, a developer should consider three goals: Enchant me Simplify my life Make me amazing Which BTW we (Developers) are aware of. By looking at many successful apps on play store, you can see that they are designed by following Google design guidelines and are pretty much using the same components and theming and styles that google used in their own

EditText with custom theme shows underline under selection handle

浪尽此生 提交于 2019-11-28 12:51:25
i am trying to modify the underline color of a EditText by applying a theme. Style: <style name="MyTheme.EditText" parent="Widget.AppCompat.EditText"> <item name="colorControlActivated">@color/green</item> </style> EditText: <EditText android:id="@+id/editText_amount" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/hint_enter_amount" android:theme="@style/MyTheme.EditText"/> Basically it works, but when i try to select or move the cursor the selection handle is also underlined. You can see this in the screenshot. Does someone know how to fix this?

AppCompat DayNight theme not work on Android 6.0?

亡梦爱人 提交于 2019-11-28 11:14:02
I am using the new Theme.AppCompat.DayNight added in Android Support Library 23.2 On Android 5.1 it works well. On Android 6.0, activity looks like using light theme, but dialog looks using dark theme. My Application class: public class MyApplication extends Application { static { AppCompatDelegate.setDefaultNightMode( AppCompatDelegate.MODE_NIGHT_YES); } } My styles.xml <style name="AppTheme" parent="Theme.AppCompat.DayNight"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <

Custom AppCompat Theme not changing Overflow icon on older devices

蓝咒 提交于 2019-11-28 10:45:36
问题 Recently I decided to change the Action Overflow Icon on my app. I got it working on Lollipop devices, but it isn't working on my Ice Cream Sandwich and Kitkat device. Note: on both the devices that it does not work on, the action overflow icon has 3 rounded dots, so the theme is changing it to the Material version....just not my version. My issue is that I cannot get this to work on older devices, but it works on Lollipop. Before, I would have had to create separate themes for each version,