2016-06-16 1 views
0

나는 필름 장르를 포함하는 텍스트 필드와 필름 설명이 포함 된 텍스트 필드를 가지고 있습니다. 설명은 고정 된 크기의 영화 엄지 아래에 설정되며 장르는 엄지 오른쪽에 있습니다. 문제는 장르가 내가 예약하고 설명을 덮어 쓰는 공간에 오래 머물 수 있다는 것입니다. 나는 엄지 손가락과 장르의 아래에 묘사를 두거나, 중복을 막기 위해 다른 방법을 써야한다.TextField가 다른 TextField를 중첩합니다 - Android

film_information.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
xmlns:tools="http://schemas.android.com/tools"> 

<ImageView 
    android:layout_marginTop="2dp" 
    android:layout_marginLeft="2dp" 
    android:layout_width="110dp" 
    android:layout_height="149dp" 
    android:id="@+id/thumb_detail" 
    android:layout_alignParentTop="true" 
    /> 

<TextView 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:textAppearance="?android:attr/textAppearanceLarge" 
    android:layout_marginLeft="5dp" 
    android:id="@+id/titolo" 
    tools:text="Main Title" 
    android:layout_toRightOf="@+id/thumb_detail" 
    android:layout_marginTop="2dp" 
    /> 

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/release_date" 
    android:layout_toRightOf="@+id/thumb_detail" 
    android:layout_marginTop="2dp" 
    android:layout_marginLeft="5dp" 
    android:layout_below="@+id/titolo" 
    tools:text="Data rilascio" 
    /> 

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginTop="2dp" 
    android:layout_marginLeft="5dp" 
    android:id="@+id/author" 
    android:layout_toRightOf="@+id/thumb_detail" 
    android:layout_below="@+id/release_date" 
    tools:text="autore" 
    /> 

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginTop="2dp" 
    android:layout_marginLeft="5dp" 
    android:id="@+id/voto" 
    android:layout_toRightOf="@+id/thumb_detail" 
    android:layout_below="@+id/author" 
    tools:text="Voto" 
    /> 

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/durata" 
    android:layout_marginTop="2dp" 
    android:layout_marginLeft="5dp" 
    android:layout_toRightOf="@+id/thumb_detail" 
    android:layout_below="@+id/voto" 
    tools:text="Durata" 
    /> 

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_marginTop="2dp" 
    android:id="@+id/generi" 
    android:layout_toRightOf="@+id/thumb_detail" 
    android:layout_below="@+id/durata" 
    tools:text="Genere" 
    android:layout_marginLeft="5dp" 
    /> 
<TextView 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/titDesc" 
    android:layout_below="@+id/thumb_detail" 
    android:layout_marginTop="3dp" 
    tools:text="Descrizione" 
    android:textSize="18dp" 
    android:layout_marginLeft="2dp" 
    android:textColor="#000000" 
    /> 



    <TextView 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/descr" 
      android:layout_marginLeft="2dp" 
      android:layout_below="@+id/titDesc" 
      android:layout_marginTop="2dp" 
      /> 

    </RelativeLayout> 
+0

당신이 LinearLayout' 수평'사용하려고 노력하는 방법이 될 수있다 LayoutLayout 아래에 도움을 교체하고 그것을 하나의 'ImageView' 및 다음 내부 'TextView's를 가진 또 다른'LinearLayout' 수직으로? (그렇게 평평하지 않은 방법 ...) – snachmsm

답변

1

당신

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent"> 

<RelativeLayout 
    android:id="@+id/rl1" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"> 


    <ImageView 
     android:id="@+id/thumb_detail" 
     android:layout_width="110dp" 
     android:layout_height="149dp" 
     android:layout_alignParentTop="true" 
     android:layout_marginLeft="2dp" 
     android:layout_marginTop="2dp" /> 

    <TextView 
     android:id="@+id/titolo" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginLeft="5dp" 
     android:layout_marginTop="2dp" 
     android:layout_toRightOf="@+id/thumb_detail" 
     android:textAppearance="?android:attr/textAppearanceLarge" 
     tools:text="Main Title" /> 

    <TextView 
     android:id="@+id/release_date" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_below="@+id/titolo" 
     android:layout_marginLeft="5dp" 
     android:layout_marginTop="2dp" 
     android:layout_toRightOf="@+id/thumb_detail" 
     tools:text="Data rilascio" /> 

    <TextView 
     android:id="@+id/author" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_below="@+id/release_date" 
     android:layout_marginLeft="5dp" 
     android:layout_marginTop="2dp" 
     android:layout_toRightOf="@+id/thumb_detail" 
     tools:text="autore" /> 

    <TextView 
     android:id="@+id/voto" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_below="@+id/author" 
     android:layout_marginLeft="5dp" 
     android:layout_marginTop="2dp" 
     android:layout_toRightOf="@+id/thumb_detail" 
     tools:text="Voto" /> 

    <TextView 
     android:id="@+id/durata" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_below="@+id/voto" 
     android:layout_marginLeft="5dp" 
     android:layout_marginTop="2dp" 
     android:layout_toRightOf="@+id/thumb_detail" 
     tools:text="Durata" /> 

    <TextView 
     android:id="@+id/generi" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_below="@+id/durata" 
     android:layout_marginLeft="5dp" 
     android:layout_marginTop="2dp" 
     android:layout_toRightOf="@+id/thumb_detail" 
     tools:text="Genere" /> 

</RelativeLayout> 

<TextView 
    android:id="@+id/titDesc" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_below="@+id/rl1" 
    android:layout_marginLeft="2dp" 
    android:layout_marginTop="3dp" 
    android:textColor="#000000" 
    android:textSize="18dp" 
    tools:text="Descrizione" /> 

<TextView 
    android:id="@+id/descr" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_below="@+id/titDesc" 
    android:layout_marginLeft="2dp" 
    android:layout_marginTop="2dp" /> 

</RelativeLayout> 
+0

그래, 그게 효과가있어 :) (7 분 그리고 아픈 답을 받아 들인다) –

+0

그래, 좋은 .. :) –

관련 문제