I'm beginner in android and want show something with this plan:
and my xml file is this:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".MainActivity">
<FrameLayout android:id="@+id/container" android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/ExplainImage"
android:layout_gravity="center"
android:layout_width="fill_parent"
android:layout_height="78dp"
android:src="@drawable/abc_btn_check_material" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/MAINLABEL"
android:layout_gravity="center" />
</ScrollView>
</FrameLayout>
</android.support.v4.widget.DrawerLayout>
but when run my app,i see like this:
How can i solve that problem?thanks.
i change XML file but so not work!,my complete xml file after change:
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".MainActivity">
<LinearLayout android:id="@+id/container" android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="3" >
<ImageView
android:id="@+id/ExplainImage"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:src="@drawable/abc_btn_check_material" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/MAINLABEL" />
</ScrollView>
</LinearLayout>
<ListView
android:id="@+id/myLIST"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<fragment android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width" android:layout_height="match_parent"
android:layout_gravity="start"
android:name="com.example.nothing.myapplication.NavigationDrawerFragment"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>