Does it really make sense for these to be fill_parent?


<https://lh6.googleusercontent.com/-DoIpgtqV19Q/UWgcPi5PYfI/AAAAAAAAAXA/gXNZgBoDyDA/s1600/fillparent.png>



Shouldn't they be wrap_content?


Thanks.



On Friday, April 12, 2013 2:00:03 AM UTC-5, Abhishek Kumar Gupta wrote:
>
> Scrolling is not working in HTC Sensation handset(but it is working in 
> other handsets).
>  
> *Layout:*
> ** 
> <?xml version="1.0" encoding="utf-8"?>
> <LinearLayout 
> xmlns:android="*http://schemas.android.com/apk/res/android*<http://schemas.android.com/apk/res/android>
> "
>     style="@style/main_background"
>     android:gravity="center_horizontal"
>     android:orientation="vertical" >
>     
>     <ScrollView
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>         android:fillViewport="true"
>         android:scrollbars="vertical" >
>     
>     <LinearLayout 
>         android:layout_width="fill_parent"
>         android:layout_height="fill_parent"
>         android:orientation="vertical"
>         android:gravity="center_horizontal">
>         
>
>     <ImageView
>         android:id="@+id/login_main_layout"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="10dp"
>         android:background="@drawable/red_header_logo" />
>
>     <LinearLayout
>         android:id="@+id/login_linear_layout"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_marginTop="5dp"
>         android:orientation="vertical" >
>
>         <RelativeLayout
>             android:layout_width="fill_parent"
>             android:layout_height="wrap_content" >
>
>             <EditText
>                 android:id="@+id/username"
>                 android:layout_width="290dp"
>                 android:layout_height="wrap_content"
>                 android:hint="@string/login_text"
>                 android:imeOptions="actionNext|flagNoExtractUi"
>                 android:inputType="textNoSuggestions|textVisiblePassword"
>                 android:paddingLeft="8dp"
>                 android:paddingRight="30dp"
>                 android:singleLine="true" />
>
>             <LinearLayout
>                 android:id="@+id/clear_username"
>                 android:layout_width="35dp"
>                 android:layout_height="45dp"
>                 android:layout_alignRight="@+id/username"
>                 android:gravity="center_horizontal"
>                 android:onClick="clearUsernameClickHandler"
>                 android:visibility="invisible" >
>
>                 <ImageView
>                     android:layout_width="19dp"
>                     android:layout_height="18dp"
>                     android:id="@+id/clear_username_image"
>                     android:background="@drawable/clear_click_effect"
>                     android:onClick="clearUsernameClickHandler" />
>             </LinearLayout>
>         </RelativeLayout>
>
>         <RelativeLayout
>             android:layout_width="fill_parent"
>             android:layout_height="wrap_content" >
>
>             <EditText
>                 android:id="@+id/password"
>                 android:layout_width="290dp"
>                 android:layout_height="wrap_content"
>                 android:layout_marginTop="5dp"
>                 android:autoText="false"
>                 android:hint="@string/password_text"
>                 android:imeOptions="actionDone|actionNone|flagNoExtractUi"
>                 android:inputType="textNoSuggestions"
>                 android:paddingLeft="8dp"
>                 android:paddingRight="30dp"
>                 android:password="true"
>                 android:singleLine="true" />
>
>             <LinearLayout
>                 android:id="@+id/clear_password"
>                 android:layout_width="35dp"
>                 android:layout_height="55dp"
>                 android:layout_alignRight="@+id/password"
>                 android:gravity="center_horizontal"
>                 android:onClick="clearPasswordClickHandler"
>                 android:visibility="invisible" >
>
>                 <ImageView
>                     android:layout_width="19dp"
>                     android:layout_height="18dp"
>                     android:id="@+id/clear_password_image"
>                     android:background="@drawable/clear_click_effect"
>                     android:onClick="clearPasswordClickHandler" />
>             </LinearLayout>
>         </RelativeLayout>
>
>         <LinearLayout
>             android:layout_width="fill_parent"
>             android:layout_height="wrap_content"
>             android:layout_marginTop="15dp"
>             android:gravity="center_horizontal"
>             android:orientation="horizontal" >
>
>             <Button
>                 android:id="@+id/login_button"
>                 android:layout_width="wrap_content"
>                 android:layout_height="wrap_content"
>                 android:background="@drawable/blue_medium_button_bg"
>                 android:gravity="center_horizontal"
>                 android:onClick="loginClickHandler"
>                 android:text="@string/login_caps_text"
>                 android:textColor="@color/white"
>                 android:textSize="17sp" />
>         </LinearLayout>
>     </LinearLayout>
> </LinearLayout>
> </ScrollView>
> </LinearLayout>
>  
>  
> *style.xml:*
> ** 
> <style name="main_background" >
>         <item name="android:layout_width">fill_parent</item>
>         <item name="android:layout_height">fill_parent</item>
>         <item name="android:background">@color/main_background_color</item>
> </style>
>  
>  
> Any help or guidance to resolve this issue will be well appreciated.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to