Materialdrawer: 将页脚放在抽屉底部

创建于 2015-04-25  ·  3评论  ·  资料来源: mikepenz/MaterialDrawer

@mikepenz ,我正在使用您的图书馆。 这太酷了!
但是我有一个小问题。 我使用页脚显示一些信息。 但是我可以将其设置在抽屉的底部。 你能告诉我怎么做吗? :(
我附加我的图像并在此处打印我的抽屉配置。 请帮我。 :(
非常感谢您的帮助!
screenshot_2015-04-26-01-56-58

我的配置:

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

最有用的评论

您希望@nambv始终保持在底部吗?

然后尝试将其设置为stickyFooter

所有3条评论

我的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始终保持在底部吗?

然后尝试将其设置为stickyFooter

好,我会试试。 非常感谢您的帮助@mikepenz :smile:

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

y2kshane picture y2kshane  ·  4评论

jehad-suliman picture jehad-suliman  ·  3评论

fuentepa picture fuentepa  ·  3评论

jd-alexander picture jd-alexander  ·  4评论

wayne1203 picture wayne1203  ·  3评论