Scaffold responsive Android notification log shell
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<se.ajpanton.notificationlog.SafeInsetDrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/window_background"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view_permanent"
|
||||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/surface"
|
||||
android:fitsSystemWindows="true"
|
||||
android:visibility="gone"
|
||||
app:headerLayout="@layout/drawer_header"
|
||||
app:itemBackground="@drawable/drawer_item_background"
|
||||
app:itemTextColor="@color/drawer_item_text_color"
|
||||
app:menu="@menu/drawer_menu" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/primary"
|
||||
android:elevation="0dp"
|
||||
android:theme="@style/ThemeOverlay.NotificationLog.Toolbar"
|
||||
app:navigationIconTint="@color/on_primary"
|
||||
app:titleTextColor="@color/on_primary" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view_drawer"
|
||||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="@color/surface"
|
||||
android:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/drawer_header"
|
||||
app:itemBackground="@drawable/drawer_item_background"
|
||||
app:itemTextColor="@color/drawer_item_text_color"
|
||||
app:menu="@menu/drawer_menu" />
|
||||
|
||||
</se.ajpanton.notificationlog.SafeInsetDrawerLayout>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/drawer_header_height"
|
||||
android:background="@color/primary"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/drawer_header_padding">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="?attr/textAppearanceHeadline6"
|
||||
android:textColor="@color/on_primary"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/drawer_subtitle"
|
||||
android:textAppearance="?attr/textAppearanceCaption"
|
||||
android:textColor="@color/on_primary" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/page_padding">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/page_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?attr/textAppearanceHeadline5"
|
||||
android:textColor="?attr/colorOnBackground" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
Reference in New Issue
Block a user