我有
<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&text视图2水平对齐。我尝试在那里使用RelativeLayout
而不是LinearLayout
,但这三个小部件都没有显示。
您可以尝试这样做(对不起,工作中缺少合适的编辑器):
<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>
这个想法是添加一个面向水平的LinearLayout,并将视图放在里面。