亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

Android實現矩形設置菜單

系統 2676 0

最近試著做下圖的界面,源碼分享,先上圖看看效果吧,下面代碼為白色區域。

?

Android實現矩形設置菜單

?

xml Layout

?

    <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="fill_parent" android:layout_height="fill_parent">

	<LinearLayout android:id="@+id/all_details"
		android:layout_width="fill_parent" android:layout_height="fill_parent"
		android:orientation="vertical">
		<TextView android:text="@string/settings"
			android:layout_width="fill_parent" android:layout_height="wrap_content"
			android:layout_marginLeft="10px" android:id="@+id/settingsText"
			android:textSize="20sp" android:textStyle="bold" android:layout_marginBottom="10dip">
		</TextView>
		<RelativeLayout android:layout_width="fill_parent"
			android:layout_height="wrap_content" android:orientation="horizontal"
			android:layout_gravity="center_vertical" android:background="@drawable/imagetop"
			android:layout_marginLeft="10px"
			android:layout_marginRight="10px" android:paddingLeft="10px">
			<CheckBox android:id="@+id/firewall_checkBox" android:layout_width="@android:dimen/app_icon_size"
				android:layout_height="@android:dimen/app_icon_size"
				android:layout_alignParentRight="true" android:scaleType="fitCenter"
				android:layout_gravity="center" />
			<TextView android:id="@+id/apps_name" android:layout_width="wrap_content"
				android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium"
				android:textColor="#000000" android:textSize="18dip"
				android:layout_alignParentTop="true" android:layout_alignParentLeft="true"
				android:paddingTop="10dip" android:paddingRight="6dip"
				android:paddingLeft="6dip" android:layout_gravity="center"
				android:text="@string/firewall_switch" />


		</RelativeLayout>
		<RelativeLayout android:layout_width="fill_parent"
			android:layout_height="wrap_content" android:orientation="horizontal"
			android:layout_gravity="center_vertical" android:background="@drawable/imagemid"
			android:layout_marginLeft="10px" 
			android:layout_marginRight="10px" android:paddingLeft="10px">
			<CheckBox android:id="@+id/call_checkBox" android:layout_width="@android:dimen/app_icon_size"
				android:layout_height="@android:dimen/app_icon_size"
				android:layout_alignParentRight="true" android:scaleType="fitCenter"
				android:layout_gravity="center" />
			<TextView android:id="@+id/apps_name" android:layout_width="wrap_content"
				android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium"
				android:textColor="#000000" android:textSize="18dip"
				android:layout_alignParentTop="true" android:layout_alignParentLeft="true"
				android:paddingTop="10dip" android:paddingRight="6dip"
				android:paddingLeft="6dip" android:layout_gravity="center"
				android:text="@string/blockincomingcall"/>


		</RelativeLayout>
		<RelativeLayout android:layout_width="fill_parent"
			android:layout_height="wrap_content" android:orientation="horizontal"
			android:layout_gravity="center_vertical" android:background="@drawable/imagebottom"
			android:layout_marginLeft="10px"
			android:layout_marginRight="10px" android:paddingLeft="10px">
			<CheckBox android:id="@+id/sms_checkbox" android:layout_width="@android:dimen/app_icon_size"
				android:layout_height="@android:dimen/app_icon_size"
				android:layout_alignParentRight="true" android:scaleType="fitCenter"
				android:layout_gravity="center" />
			<TextView android:id="@+id/apps_name" android:layout_width="wrap_content"
				android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium"
				android:textColor="#000000" android:textSize="18dip"
				android:layout_alignParentTop="true" android:layout_alignParentLeft="true"
				android:paddingTop="10dip" android:paddingRight="6dip"
				android:paddingLeft="6dip" android:layout_gravity="center"
				 android:text="@string/showcalllocation"/>


		</RelativeLayout>

	</LinearLayout>
</ScrollView>
  

?

imagetop.xml(保存于drawable)

?

    <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient 
    	android:startColor="#FFFFFF" 
    	android:endColor="#CCCCCC" 
    	android:angle="270" android:centerY="0.75"
    	/>
 
    <corners android:radius="1dp"
             android:bottomRightRadius="0dp"
             android:topRightRadius="7dp"
             android:bottomLeftRadius="0dp"
             android:topLeftRadius="7dp"
             />
 
             <!-- 
    <corners android:radius="5dip" />
    -->
</shape>
  

?

imagemid.xml

?

    <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient 
    	android:startColor="#FFFFFF" 
    	android:endColor="#CCCCCC" 
    	android:angle="270" android:centerY="0.75"
    	/>

</shape>

  

?

imagebottom.xml

?

    <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient 
    	android:startColor="#FFFFFF" 
    	android:endColor="#CCCCCC" 
    	android:angle="270" android:centerY="0.75"
    	/>

    <corners android:radius="1dp"
             android:bottomRightRadius="7dp"
             android:topRightRadius="0dp"
             android:bottomLeftRadius="7dp"
             android:topLeftRadius="0dp"
             />
</shape>
  

?

?

?

?

?

?

Android實現矩形設置菜單


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 草久久免费视频 | 中文字幕亚洲视频 | 欧美日韩中文一区二区三区 | 色综合久久综合 | 99色视频在线 | 日日摸夜夜添夜夜添毛片 | 久久中文字幕日韩精品 | 真实国产乱弄免费视频 | 福利午夜影院 | 欧美视频日韩专区午夜 | 亚洲国产精品成人午夜在线观看 | 韩国精品一区二区久久 | 91精品视频在线免费观看 | 欧美骚视频 | 成人免费一级片 | 99久久综合精品国产 | 欧美高清成人 | 中文字幕欧美日韩 | 日韩欧美中文字幕在线视频 | 护士日本xxxxx丰满hd4k | 四虎新地址 | 我要看一级毛片 | 欧美日韩国产在线成人网 | 亚洲一区二区在线 | 99热久久国产精品这 | 日韩免费在线观看 | 国产精品福利视频手机免费观看 | 欧美xxxb| 999精品视频这里只有精品 | 亚洲激情综合 | 99视频这里有精品 | 国产成人h片视频在线观看 国产成人h综合亚洲欧美在线 | 特级毛片在线 | 精品欧美成人bd高清在线观看 | 久操免费在线视频 | 日本免费特黄aa毛片 | 奇米影视资源 | 欧美老司机| 99久久网站 | 大学生一级毛片 | 日韩欧美在线不卡 |