android-theme

Define TabLayout style in theme

旧街凉风 提交于 2019-11-30 08:01:58
问题 I have two different styles of TabLayout in my app: <style name="TabLayoutPower" parent="Widget.Design.TabLayout"> <item name="tabSelectedTextColor">@android:color/white</item> <item name="tabTextColor">@android:color/white</item> </style> <style name="TabLayoutFree" parent="Widget.Design.TabLayout"> <item name="tabSelectedTextColor">@android:color/black</item> <item name="tabTextColor">@android:color/black</item> </style> How can I define the default TabLayout style for a theme? I cannot

EditText how to activate copy/paste popup without any actionbar?

大城市里の小女人 提交于 2019-11-30 07:53:42
问题 I m under delphi and i use the android framework to create an edit. When i set the theme to Theme.DeviceDefault.Light.NoActionBar then i can select some text in my EditText and i have a popup with "select all/cut/copy/paste/etc" like you can see on the picture below. However, when i select Theme.Material.Light.NoActionBar or Theme.Holo.Light.NoActionBar then i can't select any text in my EditText (i have no right or left text selection handles) and off course i don't have any copy/paste popup

Create downloadable custom theme and apply it during run time

爷,独闯天下 提交于 2019-11-30 07:02:05
I'm making an Android app that needs to allow client to maintain the resources from their server which would include strings, drawables etc. I've already created a mechanism for downloading a zip file with all these files, and they're able to change strings pretty easy, I've also created a mechanism that allows the client to change bg color for UI controls, to change width, height etc but I have a feeling that there must be a better way to create all this. So I believe the real question is: What's the best practice to create a custom theme, deploy it on server, make the app download it, and

Usage of ?android:attr/ in backwards compatible apps

为君一笑 提交于 2019-11-30 06:56:50
问题 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

No Title Bar Android Theme

老子叫甜甜 提交于 2019-11-30 06:43:41
In my application I want to use the Theme.NoTitleBar, but on the other hand I also don't want to loose the internal Theme of the Android OS.. I searched on the net and Found the following answer.. I have modified my styles.xml and added the following line of code.. Inside values/styles.xml <style name="Theme.Default" parent="@android:style/Theme"></style> <style name="Theme.NoTitle" parent="@android:style/Theme.NoTitleBar"></style> <style name="Theme.FullScreen" parent="@android:style/Theme.NoTitleBar.Fullscreen"></style> Inside values-v11/styles.xml <style name="Theme.Default" parent="

Translucent Activity filling the entire screen

六月ゝ 毕业季﹏ 提交于 2019-11-30 05:11:43
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 name="android:windowIsFloating">true</item> <item name="android:windowNoTitle">true</item> </style> But

Set Title gravity to center in ActionBarSherlock

梦想与她 提交于 2019-11-30 04:14:05
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(myimage)); It should look like this: thanks! You have to set a custom layout for the Actionbar like

Coloring Android Status Bar in Nav Drawer

﹥>﹥吖頭↗ 提交于 2019-11-30 03:50:16
问题 In this app I'm building, I've added a Navigation Drawer fragment into my activity. I'm using 5.0, so I've been able to set the primaryColor and primaryColorDark to get the right colors. I've decided to try and style my Nav Drawer to be very similar to Google Now's drawer in 5.0, where the Nav Drawer has it's own background for the status bar. (Can't post pictures, not enough reputation >.>) I've followed this question's recommendations here, which has helped quite a bit. I've achieved

Setting Holo theme for Android application

点点圈 提交于 2019-11-30 02:41:54
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 wrong but any suggestions welcome. This is what I see in the emulator: I was expecting more like this:

Using the colors for the new Material design theme in Android

醉酒当歌 提交于 2019-11-30 01:54:45
I was in the process of designing an Android application and decided to try out the new Material theme. I found all of the available color schemes for the new theme online, but I was unable to find a corresponding .xml file that has all of the colors in the color palette. Does anyone know where I can find this so that I might use these colors in my styles? Here is the color palette: http://www.google.com/design/spec/style/color.html#color-ui-color-application I was unable to find an XML file containing all of the colors for the new Material theme in Android, so I ended up making one. I figured