Android的自定义按钮布局 [英] Android custom buttons layout
本文介绍了Android的自定义按钮布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能创造这样的荷兰银行Bankieren申请荷兰与onclick处理的按钮?
How can I create buttons like the "ABN Amro Bankieren" application for the Netherlands with onclick handlers?
推荐答案
您必须使2 pressed和正常的(也可能是4的重点和残疾人),为每个3顶部,中部和底部按键XML布局。 这是示例XML为正常状态的中间按钮
You have to make 2 pressed and normal (it may be 4 for focused and disabled) xml layout for each 3 top, center and bottom buttons. This is example xml for the center button for normal state is
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#F7FCF6"/>
<stroke android:width="2sp" android:color="#9FA89F"/>
</shape>
,使它的圆角,你可以利用角球标签上面的按钮
to make it rounded corner you may use corner tag for top button
<corners android:bottomLeftRadius="0.1sp"
android:bottomRightRadius="0.1sp" android:topLeftRadius="7sp"
android:topRightRadius="7sp" />
这可能会导致XML布局editer问题,但将罚款模拟器或实际设备
this may cause problem in xml layout editer but will be fine on emulator or real device
这篇关于Android的自定义按钮布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文