<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/sub_item_item_bg"
android:orientation="vertical"
>

<!-- 关数 -->
<TextView android:id="@+id/sub_item_item_tx"
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:layout_gravity="center_horizontal"
/>
<!-- 星星 -->
<ImageView android:id="@+id/sub_item_item_star"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="0px"
android:paddingTop="10px"
>
</ImageView>

</LinearLayout>

-----------------------------------------------------

android:layout_gravity="center_horizontal"  //内容居中
android:paddingTop="10px"          //线性布局时,距离上面元素的值

更多相关文章

  1. Android 四大组件+五大布局
  2. android 动态设置布局
  3. 新浪微博布局学习——活用Android的RelativeLayout
  4. android分开布局
  5. android 布局之滑动探究 scrollTo 和 scrollBy 方法使用说明
  6. Android五大布局详解及属性
  7. Android 控件布局实现卡片效果,阴影效果
  8. Android 键盘布局总结

随机推荐

  1. Android(安卓)横竖屏操作
  2. listView显示对象以及access any RESTFul
  3. android study ------ HAL ---> light se
  4. android 中文api (62) —— ViewSwitcher
  5. Ubuntu搭建Eclipse+JDK+SDK的Android
  6. ubuntu-11.04下android开发环境搭建
  7. EditText属性解释
  8. android Uri获取真实路径转换成File的方
  9. ListView.setOnItemClickListener无效问
  10. Google Android(安卓)Market电子市场/应