aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorClyhtsuriva <aimeric@adjutor.xyz>2021-05-31 15:15:39 +0200
committerClyhtsuriva <aimeric@adjutor.xyz>2021-05-31 15:15:39 +0200
commitfc2156374611421c242ff7d65315f52fe57ceecf (patch)
treebbc122054ed71e1032dfbc2e022f202cae28e0c2 /app/src/main/res/layout
parenteea218eda48b3a35a4940d2525b8b7a9fa316ee7 (diff)
Adding the base of bottom navigation.
Also changing the the prev and next button for top manga
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/activity_main.xml32
-rw-r--r--app/src/main/res/layout/content_main.xml2
-rw-r--r--app/src/main/res/layout/top_manga_page.xml16
3 files changed, 35 insertions, 15 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index dc71220..9c34ba0 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.coordinatorlayout.widget.CoordinatorLayout 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:layout_width="match_parent"
@@ -9,6 +9,8 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
android:theme="@style/Theme.Aniki.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
@@ -20,6 +22,30 @@
</com.google.android.material.appbar.AppBarLayout>
- <include layout="@layout/content_main" />
+ <com.google.android.material.bottomnavigation.BottomNavigationView
+ android:id="@+id/nav_view"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="0dp"
+ android:layout_marginEnd="0dp"
+ android:background="?android:attr/windowBackground"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:menu="@menu/bottom_nav_menu" />
+
+ <androidx.fragment.app.FragmentContainerView
+ android:id="@+id/nav_host_fragment_activity_main"
+ android:name="androidx.navigation.fragment.NavHostFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:defaultNavHost="true"
+ app:layout_constraintBottom_toTopOf="@id/nav_view"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:navGraph="@navigation/mobile_navigation" />
+
+ <!--include layout="@layout/content_main" /-->
-</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml
index c4e7db6..f4c4e46 100644
--- a/app/src/main/res/layout/content_main.xml
+++ b/app/src/main/res/layout/content_main.xml
@@ -5,7 +5,7 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
- <fragment
+ <androidx.fragment.app.FragmentContainerView
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
diff --git a/app/src/main/res/layout/top_manga_page.xml b/app/src/main/res/layout/top_manga_page.xml
index b9b3182..cde56c7 100644
--- a/app/src/main/res/layout/top_manga_page.xml
+++ b/app/src/main/res/layout/top_manga_page.xml
@@ -8,6 +8,7 @@
tools:context=".presentation.view.fragment.TopMangaFragment">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
+ android:paddingVertical="50dp"
android:id="@+id/swiperefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -30,16 +31,8 @@
android:layout_height="wrap_content"
android:text="@string/prev"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@id/button_home" />
-
- <Button
- android:id="@+id/button_home"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/home"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent" />
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/button_next"
@@ -47,6 +40,7 @@
android:layout_height="wrap_content"
android:text="@string/next"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@id/button_home" />
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file