0

私はdeveloper.xalkin.comからDeveloperWalkthroughの例を使用しています。イメージビューと2つ目のレイアウトを2つのテキストウィジェットで追加した後、すべてが機能します。私はルートリニアレイアウトの向き値を変更すると、2つのテキストウィジェットと第2のリニアレイアウトはこちらデザイナーから1つの要素のプロパティを変更すると、他の要素が表示されなくなります。

消え添付のソースコード

<xml version="1.0" encoding="utf-8"?> 
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
     android:orientation="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"> 
     <ImageView 
      android:src="@android:drawable/ic_menu_gallery" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/imageView1" /> 
     <LinearLayout 
      android:orientation="vertical" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/linearLayout1"> 
      <TextView 
       android:text="Large Text" 
       android:textAppearance="?android:attr/textAppearanceLarge" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/textView1" /> 
      <TextView 
       android:text="Small Text" 
       android:textAppearance="?android:attr/textAppearanceSmall" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/textView2" /> 
      </LinearLayout> 
     </LinearLayout> 

はの前と後のスクリーンショットですされますデザイナーは、私がルートLinearLayoutの向きを水平に変更するとき

答えて

0

ImageViewLinearLayoutの幅はmatch_parentです。つまり、画面全体を埋めることになります。あなたの要素は消えていない、彼らは画面外にプッシュされている。彼らはImageViewの隣に座っています。幅を短くすると、それらを見ることができます。

+0

それはトリックでした。ありがとうDeeV。明らかに私は多くのことを学んでいる – user182162

関連する問題