標籤:android style blog http color 使用 strong ar 2014
網上找的圖片
左邊的點代表垂直展開的地區,上邊的點代表水平展開的地區。
右邊的點代表文字等的垂直可可顯示地區,下邊的點代表文字等的水平可顯示地區。
左上重合的地區就是展開地區,右下重合的地區就是顯示地區。
可顯示地區其實指的是控制項的text屬性設定後文字顯示的地區,以前老是以為是圖片上文字顯示的位置,下面有帶文字的例子
經過處理的3張圖
圖1
圖2
圖3
效果
XML
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <Button android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:background="@drawable/a11" android:layout_margin="2dp" /> <Button android:id="@+id/button1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/Button01" android:background="@drawable/a11" android:layout_margin="2dp"/> <Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/button1" android:background="@drawable/a22" android:layout_margin="2dp"/> <Button android:id="@+id/Button02" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:layout_below="@+id/button2" android:background="@drawable/a22" android:layout_margin="2dp" /> <Button android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/button2" android:layout_toRightOf="@+id/button2" android:background="@drawable/a33" android:layout_margin="2dp"/> <Button android:id="@+id/Button03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/button3" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_below="@+id/button3" android:background="@drawable/a33" android:layout_margin="2dp"/></RelativeLayout>
帶文字地區例子
未完待續。。。。。。
安卓學習-介面-使用點9圖製作可拉升圖片