-3
你好家伙我知道这不是一个新问题。我从HERE获得帮助。在我所取得成就,与平面背景圆圈按钮,但我想要这样的背景图像的按钮:Android:创建带有背景图像的圆形外观按钮
下面是相关的布局代码:
<LinearLayout
android:id="@+id/viewLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:background="@color/lighter_gray"/>
<Button
android:id="@+id/btnEdit"
android:background="@drawable/button_circular"
android:ellipsize="none"
android:layout_width="0dp"
android:layout_weight=".18"
android:layout_height="wrap_content" />
<View
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_weight="0.2"
android:layout_gravity="center_vertical"
android:background="@color/lighter_gray"/>
</LinearLayout>
@绘制/ button_circular
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/app_main_color"/>
<stroke android:width="2dp" android:color="@color/app_main_color" />
</shape>
我也想知道这是一个正确的方式来获得像这样的按钮?提前致谢。
的。 – 2014-09-26 05:39:28
这不能解决我的问题 – user3751280 2014-09-26 06:21:18