-4
我是新的android開發,我想在這樣的機器人的屏幕:Android的佈局設計
任何一個可以幫助我在做這個:
- ImageView的(留下20像素的空間從左,右和頂部)。
- 空間。
- TextView。
- 空間。
- TextView1。
- 空間。
- TextView2:TextView3。
- 空間。
。 。 ....
如果imageView不在那裏,textview應該出來,imageview應該隱藏。
我是新的android開發,我想在這樣的機器人的屏幕:Android的佈局設計
任何一個可以幫助我在做這個:
。 。 ....
如果imageView不在那裏,textview應該出來,imageview應該隱藏。
例子:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:layout_marginTop="20dip"
android:src="@drawable/img"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:layout_marginLeft="2dip"
android:layout_marginRight="2dip"
android:layout_marginTop="5dip"
android:text="Txt1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:layout_marginLeft="2dip"
android:layout_marginRight="2dip"
android:layout_marginTop="5dip"
android:text="Txt2"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:layout_marginLeft="2dip"
android:layout_marginRight="2dip"
android:layout_marginTop="5dip"
android:text="Txt3"/>
</LinearLayout>
線性佈局方向:垂直 –
如何從頂部空間給予和左 – user1902994
您可以使用保證金爲 –