mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Blog Fragment in Navigation Drawer with Tabs
This replaces the custom layouts in the navigation drawer with a `NavigationView` and adds a menu entry for Blogs. A Main Blogs fragment is added that holds a `TabLayout` and a `ViewPager`. Five tabs are already added, but they just have a single placeholder fragment that is to be replaced by the actual fragments. Closes #409
This commit is contained in:
@@ -1,110 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/nav_drawer_width"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/menu_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nav_menu_header"
|
||||
style="@style/BriarTextTitleInverted"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/briar_primary"
|
||||
android:paddingBottom="@dimen/margin_large"
|
||||
android:paddingLeft="@dimen/margin_large"
|
||||
android:paddingTop="@dimen/margin_xlarge"
|
||||
android:textStyle="bold"
|
||||
tools:text="Username"
|
||||
/>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/navigation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fadingEdge="none"
|
||||
android:fillViewport="true">
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/navigation_header"
|
||||
app:menu="@menu/navigation_drawer">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<include
|
||||
layout="@layout/transports_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/nav_btn_contacts"
|
||||
style="@style/NavMenuButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/social_person"
|
||||
android:onClick="onNavigationClick"
|
||||
android:text="@string/contact_list_button"/>
|
||||
|
||||
<View
|
||||
style="@style/Divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/nav_separator_height"
|
||||
android:layout_marginLeft="@dimen/margin_large"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/nav_btn_forums"
|
||||
style="@style/NavMenuButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/social_chat"
|
||||
android:onClick="onNavigationClick"
|
||||
android:text="@string/forums_button"/>
|
||||
|
||||
<View
|
||||
style="@style/Divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/margin_separator"
|
||||
android:layout_marginLeft="@dimen/margin_large"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/nav_btn_settings"
|
||||
style="@style/NavMenuButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/action_settings"
|
||||
android:onClick="onNavigationClick"
|
||||
android:text="@string/settings_button"/>
|
||||
|
||||
<View
|
||||
style="@style/Divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/margin_separator"
|
||||
android:layout_marginLeft="@dimen/margin_large"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/nav_btn_signout"
|
||||
style="@style/NavMenuButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/device_access_accounts"
|
||||
android:onClick="onNavigationClick"
|
||||
android:text="@string/sign_out_button"/>
|
||||
|
||||
<View
|
||||
style="@style/Divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/margin_separator"
|
||||
android:layout_marginLeft="@dimen/margin_large"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.0"/>
|
||||
|
||||
<include
|
||||
layout="@layout/transports_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
android:layout_gravity="bottom"
|
||||
tools:visibility="gone"/>
|
||||
|
||||
</android.support.design.widget.NavigationView>
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user