2013-12-10 61 views
0

兩個一套TextViews和LinearLayout中一個ImageView的Android中

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="#ffffff" 
    android:orientation="vertical" > 

    <LinearLayout 
     <com.google.android.youtube.player.YouTubePlayerView> 
     <**Add textView1 here**> 
     <ImageView> 
     <**Add textView2 here**> 
     <ScrollView 
      <LinearLayout 
      <ImageView> 
      <ListView> 
     > 
    > 
> 

我試圖將它們添加使得在YouTube播放器textView1,ImageView的& textView2前來水平aligned.I曾嘗試使用RelativeLayout了,而不是LinearLayout但這並未顯示這三個小部件中的任何一個。

+0

查看我的帖子在這裏http://stackoverflow.com/questions/20397575/android-button-height-in-layout-not-filling-the-parent/20397742#20397742 – AndroidHacker

+0

你基本上想要youtube播放器在textview1,imageview和textview2(它們在同一個「行」上)的頂部? –

+0

@MarioStoilov你找到了正確的朋友多數民衆贊成我的要求。 – onkar

回答

1

你可以嘗試做這樣的事情(在缺乏作品一個合適的編輯器,不好意思):

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" > 
     <com.google.android.youtube.player.YouTubePlayerView> 
     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
     android:orientation="horizontal" > 
      <**Add textView1 here**> 
      <ImageView> 
      <**Add textView2 here**> 
     </LinearLayout> 
</LinearLayout> 

的想法是添加一個Horizo​​nrally導向的LinearLayout,並把意見裏面。

+0

我該如何實現它? – onkar

相關問題