android-theme

Actionbarsherlock - change actionbar line colour

只愿长相守 提交于 2019-12-18 04:16:53
问题 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. 回答1: You

Android Studio: Rendering Problems Missing styles-correct theme chosen for this layout, Failed to find style with id

大城市里の小女人 提交于 2019-12-18 03:11:30
问题 I want to create card item xml layout for CardView and getting this error. Common solutions here not worked (tried them all and others from similar posts). This is my xml : <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/card

ActionBarSherlock - Style contains key with bad entry

霸气de小男生 提交于 2019-12-18 03:04:26
问题 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()

datepicker with different style than activity

烈酒焚心 提交于 2019-12-18 02:54:27
问题 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

What does ?attr/ mean on Android?

北慕城南 提交于 2019-12-17 23:10:25
问题 I am working on an example about Support Library and Toolbar, this is the code of the layout on the Android documentation <android.support.v7.widget.Toolbar android:id="@+id/my_toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" android:elevation="4dp" android:theme="@style/ThemeOverlay.AppCompat.ActionBar" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/> It is the first time I see these ?attr and I have no

Day/Night theme for android app

痴心易碎 提交于 2019-12-17 22:17:12
问题 I have an app in which I need to implement day / night theme. Unfortunately there is no simple way of making theming by just using styles, I need to be able to update: layout backgrounds, button selectors, text color, text size, images, icons, animations. From what I see I have 2 options: Have different xml layout files for night/day, so something like home_day.xml / home_night.xml . There are around 30 screens in the app, so in the end there will be 60 xml layouts. On activity/fragment

Android XML theme inheriting from two parent themes?

懵懂的女人 提交于 2019-12-17 22:14:22
问题 Android styles and themes always seem to make my head spin. I wanted to use the Holo UI across different versions of Android for my app. So I decided to extract the necessary resources by browsing the source. I came across the following in android-15\data\res\values\themes.xml and I'm confused as to what exactly is being 'inherited' and from where: <style name="Theme.Holo.Light" parent="Theme.Light"> ... ... </style> The Android API Guide says : If you want to inherit from styles that you've

Android - Making activity full screen with status bar on top of it

前提是你 提交于 2019-12-17 22:09:07
问题 I want to make my activity full screen with status bar on top of it like this picture: I have used this code in manifest inside activity tag: 'android:theme="@style/Theme.AppCompat.Light.NoActionBar"' But my view doesn't start from the status bar & it looks like this: How can I make my activity look like the first one? 回答1: I know that the guy asking the question may have found his own solution but for the people who are still looking for a solution this is a very simple solution but one

Adding an action bar to Theme.Black.NoTitleBar Android

旧巷老猫 提交于 2019-12-17 19:25:43
问题 I'm trying to add the action bar programatically as shown in the dev documentaion but I'm coming across an error. My minSdk is set to 11, my application has one layout and one activity and the only code in the activity is: @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.inbox); ActionBar actionBar = getActionBar(); actionBar.show(); } If I take out those last two lines then my app

appcompat_v7: Error retrieving parent for item: No resource found that matches the given name

自作多情 提交于 2019-12-17 19:12:41
问题 I am trying to build the Android project that uses appcompat_v7 library. For that, I created my project through Eclipse -> New Android Sample Project and added my custom styles.xml and then added the appcompat_v7 library Project -> Properties -> Android -> Add. But I am getting the following errors in appcompat_v7/res/values/styles_base.xml when I compile my project: appcompat_v7/res/values/styles_base.xml:24: error: Error retrieving parent for item: No resource found that matches the given