<LinearLayout android:id="@+id/status_toolbar"    android:layout_width="fill_parent"    android:layout_height="wrap_content"    android:layout_alignParentBottom="true"    android:orientation="horizontal"    android:background="@drawable/status_toolbar_bg"    android:gravity="center_vertical|center_horizontal"    >    <RadioButton        android:background="@android:color/transparent"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:button="@null"        android:drawableTop="@drawable/status_refresh_selector"        android:gravity="center"        android:text="刷新"        android:layout_weight="1"        android:textColor="@color/white" />            <RadioButton android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:button="@null"        android:text="评论"        android:gravity="center"        android:layout_weight="1"       android:background="@android:color/transparent"        android:textColor="@color/white"        android:drawableTop="@drawable/status_comment_selector"></RadioButton>            <RadioButton android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:button="@null"        android:text="转发"        android:gravity="center"        android:layout_weight="1"        android:background="@android:color/transparent"        android:textColor="@color/white"        android:drawableTop="@drawable/status_forward_selector"></RadioButton>            <RadioButton android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:button="@null"        android:text="收藏"        android:gravity="center"        android:layout_weight="1"        android:background="@android:color/transparent"        android:textColor="@color/white"        android:drawableTop="@drawable/status_fav_selector"></RadioButton>           <RadioButton android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:button="@null"        android:text="更多"        android:gravity="center"        android:layout_weight="1"        android:background="@android:color/transparent"        android:textColor="@color/white"        android:drawableTop="@drawable/status_more_selector"></RadioButton>      </LinearLayout>


关键语句功能:

android:button="@null" 删除原本系统默认在左的选择框

android:background="@android:color/transparent" 去除左边选择框被删除后的空白

android:drawableTop="@drawable/status_more_selector" 选择图片在文字上面

android:gravity="center" 保证文字与图片在平行

android:layout_weight="1" 使每一个RadioButton占的空间一样大


  

更多相关文章

  1. 自定义progressbar使用图片
  2. Shape实现圆形图片
  3. Android 异步加载图片
  4. android手机中图片的拖拉及浏览功能
  5. Android studio图片ERROR: 9-patch image xx .9.png malformed
  6. Android 之 ImageSwitch图片转换器
  7. Android下图片或按钮等可拖动到任意位置的效果实现源码
  8. android 处理图片工具
  9. android ImageView 显示本地图片

随机推荐

  1. 浅析Android权限机制(一) —— Android的权
  2. Android(安卓)Studio 2.2 预览 - 新的UI
  3. Android(安卓)Studio 3.2.2- Android(安
  4. Android中各种JAVA包的功能描述
  5. Android应用程序注册广播接收器(registerR
  6. 【Android(安卓)内存优化】Android(安卓)
  7. Android计算器低级错误?都是二进制惹的祸!
  8. Android中AsyncTask的简单用法
  9. .Android的Window类默认分类
  10. Android应用程序与SurfaceFlinger服务的