边界在Android的按钮 [英] Border for button in Android
本文介绍了边界在Android的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我提出的页恰好如在下面给出的图像链接 但我没有得到我怎样才能实现对上手按钮金色边框,请帮帮忙 谢谢
I am making the page exactly as in the image link given below But I am not getting how can I achieve the golden border for the button get started, Please help thank you
链结的http://cdn9.staztic.com/app/a/2256/2256036/muthoot-fincorp-my-jewel-box-4103-0-s-307x512.jpg
推荐答案
在你的文件夹绘制这样创建绘制形状,
Create a drawable shape in your drawable folder like this,
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="#FFFFFF"
android:endColor="#FFFFFF"
android:angle="270" />
<corners android:radius="3dp" />
<stroke android:width="5px" android:color="#eecc68" />
</shape>
和你的.xml放像下面,
and in your .xml put like below,
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:layout_marginLeft="52dp"
android:layout_marginTop="39dp"
android:background="@drawable/button"
android:text="Button" />
这篇关于边界在Android的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文