【问题标题】:Navigation drawer bottom item导航抽屉底部项目
【发布时间】:2015-03-17 07:59:33
【问题描述】:

我已经从这里实现了导航抽屉材料抽屉https://github.com/kanytu/android-material-drawer-template

我的问题是我想在抽屉式导航列表的末尾添加注销。

这是我用于抽屉的 xml:

<mynews.volume.com.mynews.materialnavigation.ScrimInsetsFrameLayout
    android:id="@+id/scrimInsetsFrameLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:fitsSystemWindows="true"
    app:insetForeground="#99000000"
    android:elevation="10dp"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
</mynews.volume.com.mynews.materialnavigation.ScrimInsetsFrameLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <include
        android:id="@+id/toolbar_actionbar"
        layout="@layout/toolbar_default"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

    <FrameLayout
        android:id="@+id/container"
        android:layout_width="fill_parent"
        android:clickable="true"
        android:layout_height="match_parent">

        <mynews.volume.com.mynews.swipe.SwipeListView
            android:id="@+id/news_list_view"
            android:listSelector="#00000000"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            swipe:swipeFrontView="@+id/front"
            swipe:swipeBackView="@+id/back"
            swipe:swipeDrawableChecked="@drawable/choice_selected"
            swipe:swipeDrawableUnchecked="@drawable/choice_unselected"
            swipe:swipeCloseAllItemsWhenMoveList="true"
            swipe:swipeActionRight="reveal"
            swipe:swipeMode="right"

            />
        <!--<ListView-->
        <!--android:layout_width="fill_parent"-->
        <!--android:layout_height="wrap_content"-->
        <!--android:id="@+id/news_list_view"-->
        <!--android:divider="#E5E6E8"-->
        <!--android:listSelector="@android:color/transparent"-->
        <!--android:dividerHeight="3dp"-->
        <!--/>-->
        <ProgressBar
            android:id="@+id/progressBar1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_marginLeft="15dp"
            android:layout_marginRight="15dp"
            android:textSize="25dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:gravity="center_horizontal"
            android:layout_marginTop="200dp"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text=""
            android:visibility="gone"
            android:id="@+id/noData" />
    </FrameLayout>

</LinearLayout>
<!-- android:layout_marginTop="?android:attr/actionBarSize"-->




<fragment
    android:id="@+id/fragment_drawer"
    android:name="mynews.volume.com.mynews.materialnavigation.NavigationDrawerFragment"
    android:layout_width="@dimen/navigation_drawer_width"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    app:layout="@layout/fragment_navigation_drawer"/>

请指导我实现这一目标。

【问题讨论】:

    标签: android material-design navigation-drawer


    【解决方案1】:

    这是按钮的代码尝试实现它

    <Button
            android:id="@+id/button1"
            android:stateListAnimator="@anim/my_animator"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true" //You need this
            android:layout_centerHorizontal="true"//and this
            android:layout_below="@id/mapview"
            android:text="@string/save" />
    

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多