在drawable里,选择shape

<?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">     <!-- 填充的颜色 -->     <solid android:color="#FFFFFF" />     <!-- 设置按钮的四个角为弧形 -->     <!-- android:radius 弧形的半径 -->     <corners android:radius="5dip" /> <!-- padding:Button里面的文字与Button边界的间隔 --> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> 

在Button里

<Button  android:id="@+id/crime_date" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="10dp" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" android:layout_marginTop="10dp" android:background="@drawable/shape"/>

更多相关文章

  1. android-圆角button
  2. drawable之使用shape:制作圆角背景
  3. android 多个自定义dialog
  4. View编程(2): invalidate()再探
  5. Android使用shape设置虚线、圆角、渐变
  6. android shape的使用 自定义 控件形状
  7. android shape的使用 2
  8. Android(安卓)Material Design动画 Reveal Effect | 揭示效果
  9. android 使用xml drawable 实现 局部圆角,可用作圆角边框

随机推荐

  1. 通过 nginx-proxy 实现自动反向代理和 HT
  2. 内存操作函数:memove、memcpy、strstr、st
  3. 第14章 0301-实战会话控制技术,(项目实战:
  4. 演示flex container 容器中的4个属性
  5. Android按钮的点击效果的总结
  6. Android中的UID和PID意义,及查看方式
  7. Android前景怎么样、是不是要凉了、是不
  8. Android(安卓)Wear:创建可穿戴应用 - 概述
  9. Android(安卓)之 Window、WindowManager
  10. 谷安: 米国军方的 iOS、Android、Windows