知道如何重现这个 Android 按钮
Any idea how reproduce this Android button
提前感谢您的宝贵时间。
我想重现这个 android 按钮,但不幸的是我花了好几个小时才弄明白,但没有结果!
图像:http://i.stack.imgur.com/m0mSw.jpg
PS : 我只想要左边的 ICON/BACKGROUND 和右边的 TITLE,不需要事实计数器。
如果你有任何想法,请随时帮助我。
再次感谢。
试试RelativeLayout
就这么简单
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/holo_blue_light">
<ImageView
android:id="@+id/icon"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="24dp"
android:src="@android:drawable/ic_dialog_info"
android:background="@android:color/holo_blue_dark"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/icon"
android:layout_margin="8dp"
android:text="Button text"
android:textColor="@android:color/white"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"/>
</RelativeLayout>
提前感谢您的宝贵时间。
我想重现这个 android 按钮,但不幸的是我花了好几个小时才弄明白,但没有结果!
图像:http://i.stack.imgur.com/m0mSw.jpg
PS : 我只想要左边的 ICON/BACKGROUND 和右边的 TITLE,不需要事实计数器。
如果你有任何想法,请随时帮助我。
再次感谢。
试试RelativeLayout
就这么简单
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/holo_blue_light">
<ImageView
android:id="@+id/icon"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="24dp"
android:src="@android:drawable/ic_dialog_info"
android:background="@android:color/holo_blue_dark"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/icon"
android:layout_margin="8dp"
android:text="Button text"
android:textColor="@android:color/white"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"/>
</RelativeLayout>