diff options
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_display_message.xml | 12 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_main.xml | 64 | ||||
-rw-r--r-- | app/src/main/res/layout/header_navigation_drawer.xml | 26 |
3 files changed, 75 insertions, 27 deletions
diff --git a/app/src/main/res/layout/activity_display_message.xml b/app/src/main/res/layout/activity_display_message.xml deleted file mode 100644 index c44487f..0000000 --- a/app/src/main/res/layout/activity_display_message.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?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="match_parent" - android:orientation="vertical"> - <TextView - android:id="@+id/textView" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:gravity="center" - android:textSize="32sp"/> -</LinearLayout> diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index fe42b62..d740acb 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,20 +1,54 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/linearLayout" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - <EditText - android:id="@+id/edit_message" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:ems="10" - android:hint="Your message here" - android:inputType="textPersonName"/> + android:layout_height="match_parent"> - <Button - android:id="@+id/button" + <com.google.android.material.navigation.NavigationView + android:id="@+id/navigationView" android:layout_width="wrap_content" + android:layout_height="0dp" + app:headerLayout="@layout/header_navigation_drawer" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" + app:menu="@menu/navigation_drawer"> + + </com.google.android.material.navigation.NavigationView> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appBarLayout2" + style="@style/Widget.MaterialComponents.AppBarLayout.Primary" + android:layout_width="0dp" android:layout_height="wrap_content" - android:onClick="send" - android:text="Send"/> -</LinearLayout> + android:fitsSystemWindows="true" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/navigationView" + app:layout_constraintTop_toTopOf="parent"> + + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/topAppBar" + style="@style/Widget.MaterialComponents.Toolbar.Primary" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@android:color/transparent" + android:elevation="0dp" + android:keyboardNavigationCluster="true" + app:navigationIcon="@drawable/menu" + app:title="@string/nav_header_title" /> + + </com.google.android.material.appbar.AppBarLayout> + + <ListView + android:id="@+id/listView" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/navigationView" + app:layout_constraintTop_toBottomOf="@+id/appBarLayout2" /> + +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/header_navigation_drawer.xml b/app/src/main/res/layout/header_navigation_drawer.xml new file mode 100644 index 0000000..ad01e59 --- /dev/null +++ b/app/src/main/res/layout/header_navigation_drawer.xml @@ -0,0 +1,26 @@ +<?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="wrap_content" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginTop="24dp" + android:layout_marginEnd="24dp" + android:text="@string/nav_header_title" + android:textAppearance="?attr/textAppearanceHeadlineSmall" + android:textColor="?attr/colorOnSurface" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp" + android:layout_marginBottom="24dp" + android:text="@string/nav_header_subtitle" + android:textAppearance="?attr/textAppearanceTitleSmall" + android:textColor="?attr/colorOnSurfaceVariant" /> +</LinearLayout>
\ No newline at end of file |