1

I designed my Own custom navigation Drawer, and it looks like this: enter image description here

and the xml code for this navigation drawer is:

<RelativeLayout
    android:id="@+id/UserOptionsDrawer"
    android:layout_width="240dp"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:background="@color/nav_drawer_background_black"
    tools:layout="@layout/fragment_navigation_drawer">

    <!-- Cover or Banner -->

    <RelativeLayout
        android:id="@+id/rlBanner"
        android:layout_width="match_parent"
        android:layout_height="150dp"
        android:orientation="vertical">

        <!-- Cover Pic Container -->
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="150dp">

            <!-- Cover Picture -->
            <ImageView
                android:id="@+id/ivCoverPic"
                android:layout_width="match_parent"
                android:layout_height="150dp"
                android:scaleType="centerCrop"
                android:src="@drawable/cover_pic"/>

            <!-- Tint -->
            <LinearLayout
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="150dp"
                android:id="@+id/llCoverTint">
            </LinearLayout>
        </RelativeLayout>

        <!-- Profile Pic Container -->
        <LinearLayout
            android:id="@+id/llProfilePicContainer"
            android:layout_width="65dp"
            android:layout_height="65dp"
            android:layout_alignParentBottom="true"
            android:layout_alignParentLeft="true"
            android:layout_marginBottom="5dp"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="7dp"
            android:orientation="vertical">

            <com.example.neotavraham.MLRoundedImageView
                android:id="@+id/civProfilePic"
                android:src="@drawable/ic_no_user"
                android:layout_height="65dp"
                android:layout_width="65dp"
                />

        </LinearLayout>

        <TextView
            android:id="@+id/tvUserName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/llProfilePicContainer"
            android:layout_marginTop="10dp"
            android:layout_toRightOf="@+id/llProfilePicContainer"
            android:textColor="#ffffff"
            android:textSize="15sp"
            android:text="Username"/>

        <TextView
            android:id="@+id/tvUserEmail"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@+id/tvUserName"
            android:layout_below="@+id/tvUserName"
            android:textColor="#ffffff"
            android:textSize="12sp"
            android:text="example@hostname.com"/>

    </RelativeLayout>

    <TextView
        android:id="@+id/tvShabatCategory"
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:gravity="right"
        android:layout_marginRight="5dp"
        android:layout_below="@id/rlBanner"
        android:text="עדכון זמני שבת"
        android:textSize="15dp"
        android:textColor="@android:color/white"
        android:textAppearance="?android:attr/textAppearanceSmall"/>

    <!-- ListMenu -->

    <ListView
        android:id="@+id/navigation_menu_container"
        android:layout_width="240dp"
        android:layout_height="wrap_content"
        android:layout_below="@id/tvShabatCategory"
        android:layout_gravity="start"
        android:background="@android:color/transparent"
        android:choiceMode="singleChoice"
        android:divider="@color/divider_orange"
        android:dividerHeight="2dp" >
    </ListView>

    <TextView
        android:id="@+id/tvWeeklyCategory"
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:gravity="right"
        android:layout_marginRight="5dp"
        android:layout_below="@id/navigation_menu_container"
        android:text="עדכון זמני השבוע"
        android:textSize="15dp"
        android:textColor="@android:color/white"
        android:textAppearance="?android:attr/textAppearanceSmall"/>

    <ListView
        android:id="@+id/lv_weekly_updates"
        android:layout_width="240dp"
        android:layout_height="wrap_content"
        android:layout_below="@id/tvWeeklyCategory"
        android:layout_gravity="start"
        android:background="@android:color/transparent"
        android:choiceMode="singleChoice"
        android:divider="@color/divider_orange"
        android:dividerHeight="2dp" >
    </ListView>

    <TextView
        android:id="@+id/tvMessagesCategory"
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:gravity="right"
        android:layout_marginRight="5dp"
        android:layout_below="@id/lv_weekly_updates"
        android:text="עדכון הודעות"
        android:textSize="15dp"
        android:textColor="@android:color/white"
        android:textAppearance="?android:attr/textAppearanceSmall"/>

    <ListView
        android:id="@+id/lv_messages_updates"
        android:layout_width="240dp"
        android:layout_height="wrap_content"
        android:layout_below="@id/tvMessagesCategory"
        android:layout_gravity="start"
        android:background="@android:color/transparent"
        android:choiceMode="singleChoice"
        android:divider="@color/divider_orange"
        android:dividerHeight="2dp" >
    </ListView>

    <TextView
        android:id="@+id/tvEvenetsCategory"
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:gravity="right"
        android:layout_marginRight="5dp"
        android:layout_below="@id/lv_messages_updates"
        android:text="עדכון הודעות"
        android:textSize="15dp"
        android:textColor="@android:color/white"
        android:textAppearance="?android:attr/textAppearanceSmall"/>

    <ListView
        android:id="@+id/lv_events_updates"
        android:layout_width="240dp"
        android:layout_height="wrap_content"
        android:layout_below="@id/tvEvenetsCategory"
        android:layout_gravity="start"
        android:background="@android:color/transparent"
        android:choiceMode="singleChoice"
        android:divider="@color/divider_orange"
        android:dividerHeight="2dp" >
    </ListView>

    <TextView
        android:id="@+id/tvOptionsCategory"
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:gravity="right"
        android:layout_marginRight="5dp"
        android:layout_below="@id/lv_events_updates"
        android:text="אפשרויות נוספות"
        android:textSize="15dp"
        android:textColor="@android:color/white"
        android:textAppearance="?android:attr/textAppearanceSmall"/>

    <ListView
        android:id="@+id/lvOptions"
        android:layout_width="240dp"
        android:layout_height="wrap_content"
        android:layout_below="@id/tvOptionsCategory"
        android:layout_gravity="start"
        android:background="@android:color/transparent"
        android:choiceMode="singleChoice"
        android:divider="@color/divider_orange"
        android:headerDividersEnabled="true"
        android:dividerHeight="2dp" >
    </ListView>

</RelativeLayout>

{it's just a part of entire xml file with android.support.v4.widget.DrawerLayout tags..}

Anyway, there are more buttons in the bottom which i can't reach because it's not a scroll view...

I tried to wrap it with a ScrollView but the result was a mess..

what can i do?

edit:

this is what happend when i use scrollview with linear layout: enter image description here

and this is the code:

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_below="@id/rlBanner">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

 ...everything is the same inside

    </LinearLayout>
</ScrollView>
kitsuneFox
  • 1,243
  • 3
  • 18
  • 31
  • 1
    you can try to do the following. Since the scrollview can host only 1 child you can use a scrollview and inside you can use a LinearLayout(Vertical) inside of this layout you can add multiple buttons, imageviews, e.t.c. –  Mar 02 '15 at 16:02
  • Have you tried @KostasDrakonakis 's proposal? What exactly happens when you try using a ScrollView? – A B Mar 02 '15 at 16:26
  • @AB i edited the post with the results... – kitsuneFox Mar 02 '15 at 16:38
  • @AB,post updated again, as u can see,you can see only one item from each listView without scrolling..i want all items to be shown without scrolling the inner list views... – kitsuneFox Mar 02 '15 at 16:48
  • @KostasDrakonakis,can u take a look on the uppdate? – kitsuneFox Mar 02 '15 at 18:22
  • yes exactly like this....but if you are using listviews they have the scroll implemented automatically... –  Mar 02 '15 at 18:58

0 Answers0