我正在android中工作。 這是我的xml: -如何設置兩個佈局的高度?
請仔細檢查。 **
<RelativeLayout
android:layout_width="wrap_content" android:layout_height="140dip" android:id="@+id/rl_for_image_title" >
<ImageView
android:id="@+id/music_player_logo"
android:layout_height="fill_parent"
android:layout_width="100dip"
android:src="@drawable/musicplayer_logo"/>
</RelativeLayout>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="140dip" android:id="@+id/rl_for_texts" android:layout_toRightOf="@+id/rl_for_image_title" >
<TextView
android:id="@+id/music_player_title_name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Title :"
android:layout_marginLeft="15dip"/>
<TextView
android:layout_below="@+id/music_player_title_name"
android:id="@+id/music_player_artist_name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Artist : "
android:layout_marginLeft="15dp"/>
<TextView
android:layout_below="@+id/music_player_artist_name"
android:id="@+id/music_player_category"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Category : "
android:layout_marginLeft="15dp"/>
<TextView
android:layout_below="@+id/music_player_category"
android:id="@+id/music_player_date"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Date : "
android:layout_marginLeft="15dp"
/>
<TextView
android:layout_below="@+id/music_player_date"
android:id="@+id/music_player_song_price"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Price : "
android:layout_marginLeft="15dp"
/>
</RelativeLayout>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/rl_for_seekbar" android:layout_below="@+id/rl_for_texts" android:layout_marginTop="20dip" >
<ImageButton
android:id="@+id/ButtonTestPlayPause"
android:layout_height="40dip"
android:layout_width="fill_parent"
android:src="@drawable/button_play"/>
<SeekBar
android:layout_below="@+id/ButtonTestPlayPause"
android:id="@+id/SeekBarTestPlay"
android:layout_height="20dip"
android:layout_width="match_parent"
android:thumb="@drawable/thumb_transparent"/>
<TextView
android:layout_below="@+id/SeekBarTestPlay"
android:id="@+id/SeekBarTime"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Time :"
android:layout_marginLeft="15dp"
/>
</RelativeLayout></RelativeLayout>
,這是本上面的XML的輸出: -
我想在同一水平作爲文本信息顯示。我的圖像頂層比標題,藝術家等文本視圖稍微低一點。請告訴我該怎麼做才能使這個對齊準確。 ?
這是完整的xml文件。 –
音樂筆記圖片所在的imageview在哪裏? –
對不起,先生,我犯了一個錯誤。現在沒關係。 –