android-theme

Cannot resolve symbol Theme, ThemeOverlay

一个人想着一个人 提交于 2019-11-29 05:32:37
I updated my android studio to latest version - 3.0.1. Since then it complains 'Cannot resolve symbol' for Theme and ThemeOverlay in the following lines of code. App runs fine but they are marked in RED in the file. styles.xml <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"></style> <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> build.gradle is updated with the latest version dependencies { classpath 'com.android.tools.build:gradle:3.0.1' } 1)Close the

Is there a theme for Holo, full screen but with Action Bar?

北城以北 提交于 2019-11-29 05:14:46
问题 I need to make an activity appear such that the activity remains full screen (no title bar) but with the Action Bar present. App uses Holo Light for its interfaces. Is there such a style/theme? 回答1: Unfortunately, all built-in Holo Light themes with no title bar also have no action bar. Theme.Holo.Light.NoActionBar has a title bar but no action bar, and Theme.Holo.Light.NoActionBar.Fullscreen has neither the action bar nor the title bar. 回答2: I had the same "issue" and what I do is basically

Actionbarsherlock - change actionbar line colour

左心房为你撑大大i 提交于 2019-11-29 04:38:33
I am currently working on making my application compatible with pre 3.0 devices with the aid of actionbarsherlock. My application has a custom theme which overide Holo.light changing the blue to orange. I am wanting to change the blue line which appears under the actionbar to orange. With the official actionbar I managed this by overriding <item name="android:background">@drawable/ad_tab_unselected_holo</item> Unfortunately this does not seem to be working in actionbarsherlock 4. You need to do two things: The ABS 4 now mimics the standard Action bar with its attributes so you need to add -

Android set edit text style globally in theme doesn't work

别等时光非礼了梦想. 提交于 2019-11-29 03:11:44
I am facing with problem. I am trying to make edit texts in my app look the same with the help of theme. I have generated styles with the help of online tools (9-patch images) and tried to set it in my theme like this <!-- Base application theme. --> <style name="DefaultAppTheme" parent="Theme.AppCompat"> <!-- Main theme colors --> <!-- your app branding color for the app bar --> <item name="colorPrimary">@color/blue</item> <!-- darker variant for the status bar and contextual app bars --> <item name="colorPrimaryDark">@color/darkblue</item> <!-- theme UI controls like checkboxes and text

Android Alert Dialog Background Issue API 11+

半世苍凉 提交于 2019-11-29 02:45:23
问题 I create a AlertDialog with the code below. For some reason I'm getting an extra background (see pic) on Honeycomb and above. The code crashes fine for anything below honeycomb. MyCustomDialog is simply Theme.Dialog for < API-11 and Theme.Holo.Dialog for API-11 and up. Any idea why I'm getting the extra background? Any idea why it crashes for API < 11? It works fine if I remove the Theme. Update figured out the answer to Question #2. Seems the constructor AlertDialog.Builder(Context context,

Translucent Activity filling the entire screen

╄→尐↘猪︶ㄣ 提交于 2019-11-29 02:32:47
问题 I'd like to have an activity (2) with translucent aspect over another activity (1), aligned at the top of the screen (4). I have tried assigning these themes to activity number 2: <style name="Theme.CustomDialog" parent="android:style/Theme.Dialog"> <item name="android:windowBackground">@android:color/black</item> </style> <style name="CustomTheme"> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:background">@android:color/transparent</item> <item

ActionBarSherlock - Style contains key with bad entry

徘徊边缘 提交于 2019-11-29 01:14:40
I'm trying to use ActionBarSherlock in one specific activity which I've declared in the Manifest like this: <activity android:name=".activities.Bla" android:screenOrientation="portrait" android:theme="@style/Theme.Sherlock" /> My Activity code is this: public class Bla extends SherlockFragmentActivity implements ActionBar.OnNavigationListener { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.bla); getSupportActionBar().setTitle(""); getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); Context context =

Set Title gravity to center in ActionBarSherlock

感情迁移 提交于 2019-11-29 00:59:58
问题 Hello I would like to apply a custom Backgroundlayout just for my Main Activity. I couldn't find a solution. Can somebody give me some tips? would like to have just a simple TextView with a background in the Actionbar. Is this possible? I managed to remove the icon and set a backgroundimage. But how can I set the gravity of the text to center and change the typefont? getSupportActionBar().setDisplayShowHomeEnabled(false); getSupportActionBar().setBackgroundDrawable(getResources().getDrawable

datepicker with different style than activity

隐身守侯 提交于 2019-11-29 00:14:50
I have activities with custom style, I want my activity with a custom title bar so I created below style: <style name="costum_titlebar"> <item name="android:background">@color/titlebar_background</item> </style> <style name="CustomTheme" parent="android:Theme"> <item name="android:windowTitleSize">@dimen/titlebar_size</item> <item name="android:windowTitleBackgroundStyle">@style/costum_titlebar</item> </style> In manifest I use: <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/CustomTheme" > In the activity I

How can I have a drop shadow on my ActionBar (ActionBarSherlock)?

怎甘沉沦 提交于 2019-11-28 23:38:25
问题 I am including my styled xml layout: <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="Theme.Styled" parent="Theme.Sherlock"> <item name="actionBarStyle">@style/Widget.MyApp.ActionBar</item> <item name="android:actionBarStyle">@style/Widget.MyApp.ActionBar</item> </style> <style name="Widget.MyApp.ActionBar" parent="Widget.Sherlock.Light.ActionBar"> <item name="titleTextStyle">@style/Widget.MyApp.TitleTextStyle</item> <item name="background">@color/red</item>