android-stylesheeets

Set style on TableRow in Android

Using the Android SDK, there doesn't seem to be any way to set the style on a table row. I want to do the equivalent of: <TableRow style='@style/TableRow_classic' > in code. I would like something like: TableRow row = new TableRow(this); row.setStyle(R.style.TableRow_classic); Does anyone know how to find this? ...

How to get the font face size and formatting of a native element in Android application?

I would like to reuse the exact same font-face etc... like Android uses in the PreferenceScreen Here is a screenshot I am looking to reuse the title, and the summary style from these views. ...

How do I style buttons in a LinearLayout like a ListView

I have a vertically orientated LinearLayout with some Buttons in it: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <Button android:layout_height="wrap_content" android:layout_width="fill_parent" android...

Android: How to apply a border at Buttons over stylesheets?

I have some buttons orientated in a vertical LinearLayout with the default menuitem_background applied to them (Which gives them a transparent background at default state and a highlighting color on click/press). <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_h...

Android: Do I just have one shot per property through the use of themes? Is there nothing like CSS in Android?

Here they write: To apply a style definition as a theme, you must apply the style to an Activity or application in the Android manifest. When you do so, every View within the Activity or application will apply each property that it supports. For example, if you apply the CodeFont style from the previous examples to an Acti...

Android: My XML with a selector is not well-formed while styling a button?

I just tried this example. I saved that code in res/color/hover.xml but I always get this error message and Eclipse won't compile my project with this xml. What am I doing wrong? <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; <item android:state_pressed="true" an...

applying a theme to an appwidget

i'm trying to define a theme for an appwidget, and have it applied at the application level. i have a theme like, <style name="theme.dark"> <item name="android"background">#000000</item> </style> in my manifest, i set android:theme="@style/theme.dark" at the application. however, when i run the appwidget, it does not pick up th...