2012-12-27 4 views
-4

나는 안드로이드 개발에 새로운 오전, 나는이 같은 안드로이드의 화면을 만들고 싶어 :안드로이드 레이아웃 디자인

어느 한이 일에 저를 도울 수 : 20 픽셀의

  1. 이미지 뷰를 (떠나는 공간 왼쪽, 오른쪽 및 상단에서).
  2. 공간.
  3. TextView.
  4. 스페이스.
  5. TextView1.
  6. 공간.
  7. TextView2 : TextView3.
  8. 공간.

. . ....

imageView가 없으면 textview가 나타나야하고 imageview가 숨겨져 야합니다.

+0

선형 레이아웃 : –

+0

수직 위에서 공간을 제공하는 방법 및 그에 대한 마진을 – user1902994

+0

사용할 수 있습니다 왼쪽 –

답변

0

예 :

<?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> 
방향으로