How to make so that over Listview at a sliding panel there was a picture, instead of at once ListView began from above?

Closed due to the fact that the essence of the question is incomprehensible to the participants Grundy , user194374, Streletz , cheops , aleksandr barakin Aug 14 '16 at 8:37 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    For example, you can do with the help of two layouts. The first:

    <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/nav_drawer" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <!-- This LinearLayout represents the contents of the screen --> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <!-- The ActionBar displayed at the top --> <include layout="@layout/toolbar"/> <!-- The main content view where fragments are loaded --> <FrameLayout android:id="@+id/flContent" android:layout_width="match_parent" android:layout_height="match_parent" /> </LinearLayout> <android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:fitsSystemWindows="true" app:headerLayout="@layout/drawer_header" app:menu="@menu/drawer"/> </android.support.v4.widget.DrawerLayout> 

    And second, drawer_header.xml:

     <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="150dp" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/gas_st" android:scaleType="centerCrop" /> <TextView style="@style/TextAppearance.AppCompat.Subhead" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_margin="16dp" android:text="Text" android:textColor="@android:color/white" /> </FrameLayout> 

    Only in this case under the picture is not a ListView , but a menu from menu / drawer.xml:

     <group android:checkableBehavior="single" android:id="@+id/first_group"> <item android:id="@+id/navigation_item_1" android:checked="true" android:title="@string/item_1" /> </group> <group android:checkableBehavior="single" android:id="@+id/second_group"> <item android:id="@+id/navigation_item_2" android:checked="true" android:title="@string/item_2" /> </group> 

    But you can try replacing the ListView menu if you need this particular item.