Android 系统功能设置菜单 LinearLayout与relativeLayout的实现
16lz
2021-01-23
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#44000000" android:text="系统设置" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="55dp" android:background="#11000000" android:paddingBottom="5dp" android:paddingLeft="5dp" android:paddingTop="5dp" > <TextView android:id="@+id/tv_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="开启短信功能" android:textSize="20sp" /> <TextView android:id="@+id/tv_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/tv_title" android:text="如果关闭该功能,则无法发送短信" android:textColor="#88000000" android:textSize="15sp" /> <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginRight="22dp" /> </RelativeLayout> <!-- 分割线 --> <View android:layout_width="match_parent" android:layout_height="0.1dp" android:background="#55000000" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="55dp" android:paddingBottom="5dp" android:paddingLeft="5dp" android:paddingTop="5dp" > <TextView android:id="@+id/tv_title2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="开启通话功能" android:textSize="20sp" /> <TextView android:id="@+id/tv_content2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/tv_title2" android:text="如果关闭此功能,则无法拨打电话" android:textColor="#88000000" android:textSize="15sp" /> <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginRight="22dp" /> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="55dp" android:background="#11000000" android:paddingBottom="5dp" android:paddingLeft="5dp" android:paddingTop="5dp" > <TextView android:id="@+id/tv_title3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="开启短信功能" android:textSize="20sp" /> <TextView android:id="@+id/tv_content3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/tv_title3" android:text="如果关闭该功能,则无法发送短信" android:textColor="#88000000" android:textSize="15sp" /> <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginRight="22dp" /> </RelativeLayout></LinearLayout>
更多相关文章
- Android 7.0 移除设置中的某些项(辅助功能、流量使用情况、位置信
- 修改Android framework定制重启功能
- Android 5.1部分apk的升级或缓存功能无效
- android 将鼠标右键点击事件改为点击后返回功能
- Android 无障碍辅助功能AccessibilityService(2)
- Android Lollipop 5.0 新功能说明
- android:imeOptions属性详解(Enter功能)
- android -- 小功能 手势操作GestureDetector
- Android支持展开/收缩功能的列表控件