Materialdrawer: Set footer at the bottom of the drawer

Created on 25 Apr 2015  ·  3Comments  ·  Source: mikepenz/MaterialDrawer

Hi @mikepenz , I'm using your library. It's so cool!
But I have a small problem. I use footer to display some information. But I can set it at the bottom of the drawer. Can you tell me how to do that? :(
I attach my image and print my drawer config here. Please help me. :(
Thank you very much for your help!
screenshot_2015-04-26-01-56-58

My configuration:

result = new Drawer()
                    .withActivity(this)
                    .withToolbar(mToolbar)
                    .withActionBarDrawerToggle(true)
                    .withTranslucentStatusBar(true)
                    .withHeader(R.layout.slide_header)
                    .addDrawerItems(new PrimaryDrawerItem().withName(navMenuTitles[0]).withIcon(FontAwesome.Icon.faw_user))
                    .withSelectedItem(-1)
                    .withFireOnInitialOnClick(false)
                    .withOnDrawerItemClickListener(itemClickListener)
                    .withFooterDivider(false)
                    .withFooter(R.layout.slide_footer)
                    .withFooterClickable(false)
                    .build();
question

Most helpful comment

@nambv you want it to stay always on bottom?

then try to set it as stickyFooter

All 3 comments

My R.layout.slide_footer.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignParentBottom="true"
                android:padding="15dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:orientation="vertical">

        <TextView
            android:id="@+id/tv_version_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

        <TextView
            android:id="@+id/tv_owner_company"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Pearcomms @ 2015"/>

        <TextView
            android:id="@+id/tv_developer_team"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="by Dwarves Foundation"/>

    </LinearLayout>

</RelativeLayout>

@nambv you want it to stay always on bottom?

then try to set it as stickyFooter

Ok I'll try. Thank you very much for your help @mikepenz :smile:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pranjal-joshi picture pranjal-joshi  ·  3Comments

Ahmed-Emad picture Ahmed-Emad  ·  4Comments

sonh picture sonh  ·  3Comments

singhalavi picture singhalavi  ·  4Comments

wayne1203 picture wayne1203  ·  3Comments