大约有 4,100 项符合查询结果(耗时:0.0240秒) [XML]
Android selector & text color
...text.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:color="#000000" /> <!-- pressed -->
<item android:state_focused="true"
android...
How to change theme for AlertDialog
...
In Dialog.java (Android src) a ContextThemeWrapper is used. So you could copy the idea and do something like:
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.AlertDialogCustom));
And then style i...
How do I make a LinearLayout scrollable?
...
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layo...
Border for an Image view in Android?
How can I set a border for an ImageView and change its color in Android?
16 Answers
...
Custom Drawable for ProgressBar/ProgressDialog
...tes.xml declares the colors of the different states:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<gradient
android:startColor="#000001"
...
Open-sided Android stroke?
Is it possible to create an Android shape object with stroke on only certain sides?
8 Answers
...
Android - styling seek bar
...
I would extract drawables and xml from Android source code and change its color to red.
Here is example how I completed this for mdpi drawables:
Custom red_scrubber_control.xml (add to res/drawable):
<selector xmlns:android="http://schemas.android.com/apk/re...
Custom toast on Android: a simple example
I'm new to Android programming. What is a simple example showing a custom toast notification on Android?
17 Answers
...
How to set space between listView Items in Android
...t of XML for anyone maybe floating in here later via google:
<ListView android:id="@+id/MyListView"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:divider="@android:color/transparent"
android:dividerHeight="10.0sp"/>
For some reason, values such as ...
How to center icon and text in a android button with width set to “fill parent”
I want to have an Android Button with icon+text centered inside it. I'm using the drawableLeft attribute to set the image, this works well if the button has a width of "wrap_content" but I need to stretch to max width so I use width "fill_parent" . This moves my icon straight to the left of the b...