askIT

Android Vertical layout

The default layout view of the phone is horizontal. It can easily be changed to vertical.

horizontal.jpg vertical.jpg

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:background="#F8FBBF"
        android:layout_margintop"50dip" >

                <ExpandableListView
                    android:id="@+id/lvExp"
                    android:layout_height="match_parent"
                    android:layout_width="match_parent"
                    android:cacheColorHint="#00000000"/> 

    </LinearLayout>


</RelativeLayout>

Add comment

avatar_blank_60.png

Comment:

Name:

Email:

Comments

No comments yet. You can be the first one to comment. Just write your comment in the form and click on the submit button.