Impliment Slidingdrawer with viewpager, where the sliding frame is on the viewpager

enter image description here

I want to display the Viewpager with a slidedrawer.Viewpager is used to scroll images and on top of this viewpager. I want to place one sliding drawer (top to bottom).

I attached my sample code. If you have an idea on how to implement this screen, please help me.

  • android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dip" android:text="Infra2Apps" android:textColor="#ffffff" android:textSize="9pt" /> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="6dip" android:text="Sales and Marketing Resources" android:textColor="#ffffff" android:textStyle="bold" android:typeface="sans" /> 

     <LinearLayout android:id="@+id/handle" android:layout_width="wrap_content" android:layout_height="wrap_content" > <ImageView android:id="@+id/imageView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/arrow" /> </LinearLayout> <ImageView android:id="@+id/content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#FF0000" android:src="@drawable/love" /> 

     <android.support.v4.view.ViewPager android:id="@+android:id/viewpager" android:layout_width="fill_parent" android:layout_height="fill_parent" /> 

     <ImageView android:id="@+id/settings" android:layout_width="wrap_content" android:layout_height="25dp" android:src="@drawable/settings" /> <ImageView android:id="@+id/search" android:layout_width="wrap_content" android:layout_height="24dp" android:src="@drawable/searchbutton" /> <ImageView android:id="@+id/refresh" android:layout_width="wrap_content" android:layout_height="27dp" android:src="@drawable/refreshrest" /> <ImageView android:id="@+id/question" android:layout_width="wrap_content" android:layout_height="26dp" android:src="@drawable/questionmark" /> 

+4
source share
1 answer

Use a frame layout and use a box for a fixed width and height.

 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:id="@+id/middle_ll" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <android.support.v4.view.ViewPager android:id="@+id/view_pager" android:layout_width="match_parent" android:layout_height="match_parent" /> </LinearLayout> <SlidingDrawer android:id="@+id/option_menu" android:layout_width="wrap_content" android:layout_height="@dimen/drawer_top_height" android:layout_alignParentRight="true" android:background="@android:color/transparent" android:content="@+id/content" android:handle="@+id/handle" android:rotation="180" > <RelativeLayout android:id="@+id/content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:orientation="vertical" android:rotation="180" > <include android:id="@+id/menu_pop_down" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" layout="@layout/menu_layout" android:visibility="visible" /> </RelativeLayout> <RelativeLayout android:id="@+id/handle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:rotation="180" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:src="@drawable/date_picker_icon" /> </RelativeLayout> </SlidingDrawer> </FrameLayout> 
0
source

Source: https://habr.com/ru/post/1500365/


All Articles