1. Download our Official Android App: Forums for Android!

Apps Parent view : wrap_content , Child view : fill_parent -> how to determine the size

Discussion in 'Android Development' started by namanhams, Jun 2, 2011.

  1. namanhams

    namanhams Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Jun 2, 2011

    Jun 2, 2011
    1
    0
    5
    For example :

    Code (Text):
    1.  
    2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    3.     android:layout_width="fill_parent"
    4.     android:layout_height="wrap_content">
    5.  
    6.     <TextView
    7.                 android:layout_width="wrap_content"
    8.         android:layout_height="fill_parent" />
    9.  
    10. </LinearLayout>
    11.  
    In this case, the LinearLayout will wrap the height of the content, but the TextView will fill the height of the LinearLayout.

    Then how to determine the size ? Thanks.
     

    Advertisement

Share This Page

Loading...