android - Layout positioning problem with Custom SlidingDrawer -



android - Layout positioning problem with Custom SlidingDrawer -

hi i've been trying create work quite while , sense stuck, found component on web wich pretty nice, allows me top bottom sliding, default sample pretty easy bar goes on top , goes down:

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <button android:id="@+id/button_open" android:layout_width="100dp" android:layout_height="wrap_content" android:text="@string/open" android:layout_centerinparent="true" android:visibility="gone" /> <textview android:layout_height="wrap_content" android:textappearance="?android:attr/textappearancemedium" android:layout_width="wrap_content" android:text="@string/default_feed_detail" android:id="@+id/txtdetailnews" ></textview> <it.sephiroth.demo.slider.widget.multidirectionslidingdrawer xmlns:my="http://schemas.android.com/apk/res/it.sephiroth.demo.slider" android:id="@+id/drawer" my:direction="toptobottom" android:layout_width="fill_parent" android:layout_height="wrap_content" my:handle="@+id/handle" my:content="@+id/content"> <include android:id="@id/content" layout="@layout/pen_content" /> <imageview android:id="@id/handle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/sliding_drawer_handle_bottom" /> </it.sephiroth.demo.slider.widget.multidirectionslidingdrawer> </relativelayout>

and renders quite nicely:

but want have header image between text , between custom slidingdrawer not render text

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <button android:id="@+id/button_open" android:layout_width="100dp" android:layout_height="wrap_content" android:text="@string/open" android:layout_centerinparent="true" android:visibility="gone" /> <imageview android:id="@+id/header" android:src="@drawable/header" android:layout_height="wrap_content" android:layout_width="wrap_content"></imageview> <it.sephiroth.demo.slider.widget.multidirectionslidingdrawer xmlns:my="http://schemas.android.com/apk/res/it.sephiroth.demo.slider" android:layout_below="@id/header" android:id="@+id/drawer" my:direction="toptobottom" android:layout_width="fill_parent" android:layout_height="wrap_content" my:handle="@+id/handle" my:content="@+id/content"> <include android:id="@id/content" layout="@layout/pen_content" /> <imageview android:id="@id/handle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/sliding_drawer_handle_bottom" /> </it.sephiroth.demo.slider.widget.multidirectionslidingdrawer> <textview android:layout_height="wrap_content" android:textappearance="?android:attr/textappearancemedium" android:layout_below="@id/drawer" android:layout_width="wrap_content" android:text="@string/default_feed_detail" android:id="@+id/txtdetailnews"></textview> </relativelayout>

and text gone.... suggestion relative layout, or if has thought or component can done easly great thanks!!

edit

i found interesting hierarchyviewer using next layout arrange components:

<it.sephiroth.demo.slider.widget.multidirectionslidingdrawer xmlns:my="http://schemas.android.com/apk/res/it.sephiroth.demo.slider" android:layout_above="@id/txtdetailnews" android:id="@+id/drawer" my:direction="toptobottom" android:layout_width="fill_parent" android:layout_height="wrap_content" my:handle="@+id/handle" my:content="@+id/content"> <include android:id="@id/content" layout="@layout/pen_content" /> <imageview android:id="@id/handle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/sliding_drawer_handle_bottom" /> </it.sephiroth.demo.slider.widget.multidirectionslidingdrawer>

it seems components within drawer beingness render , take space shown here:

first off, need proof-read questions. have had more response if had fixed basic grammar mistakes , added few clarifications wrote.

here couple things try: move textview above sliding drawer in xml, did in first layout. leave android:layout_below="@id/drawer" attribute- if not work, seek removing that.

try that, we'll go there.

android layout android-layout relativelayout

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -