大约有 5,000 项符合查询结果(耗时:0.0194秒) [XML]
How to draw border on just one side of a linear layout?
...ne side
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#FF0000" />
</shape>
</item>
<item android:left="5dp">...
Android: combining text & image on a Button or ImageButton
...the background.
If you are looking for something similar in xml there is:
android:background attribute which works the same way.
share
|
improve this answer
|
follow
...
How to change title of Activity in Android?
...
Just an FYI, you can optionally do it from the XML.
In the AndroidManifest.xml, you can set it with
android:label="My Activity Title"
Or
android:label="@string/my_activity_label"
Example:
<activity
android:name=".Splash"
android:label="@string/splash_act...
Shadow Effect for a Text in Android? [duplicate]
...
Perhaps you'd consider using android:shadowColor, android:shadowDx, android:shadowDy, android:shadowRadius; alternatively setShadowLayer() ?
share
|
im...
How do you make a LinearLayout scrollable?
...:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView
android:layout_width="fill_parent"
...
Android custom dropdown/popup menu
...
Update: To create a popup menu in android with Kotlin refer my answer here.
To create a popup menu in android with Java:
Create a layout file activity_main.xml under res/layout directory which contains only one button.
Filename: activity_main.xml
<Rela...
How to make gradient background in android
...rawable.xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:type="linear"
android:angle="0"
android:startColor="#f6ee19"
android:endColor="#115ede" />
</shape>
...
Custom ImageView with drop shadow
...nePatch:
along with the appropriate padding in XML:
<ImageView
android:id="@+id/image_test"
android:background="@drawable/drop_shadow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="6px"
android:paddin...
How to change spinner text size and text color?
In my Android application, I am using spinner, and I have loaded data from the SQLite database into the spinner, and it's working properly. Here is the code for that.
...
Scrollview vertical and horizontal in android
...a good solution:
Custom ScrollView:
package com.scrollable.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;
public class VScroll extends ScrollView {
public VScroll(Context context, AttributeSet attrs,...