From 416450b33960588984d88659d596703e84c8c2d5 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Fri, 12 Feb 2021 11:26:07 +0100 Subject: Renaming. --- app/src/main/res/navigation/nav_graph.xml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'app/src/main/res/navigation') diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index 5441348..78eb7f0 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -3,26 +3,26 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/nav_graph" - app:startDestination="@id/FirstFragment"> + app:startDestination="@id/HomePage"> + android:id="@+id/HomePage" + android:name="xyz.adjutor.aniki.HomePage" + android:label="@string/home_page_label" + tools:layout="@layout/home_page"> + android:id="@+id/action_HomePage_to_NewsPage" + app:destination="@id/NewsPage" /> + android:id="@+id/NewsPage" + android:name="xyz.adjutor.aniki.NewsPage" + android:label="@string/news_page_label" + tools:layout="@layout/news_page"> + android:id="@+id/action_NewsPage_to_HomePage" + app:destination="@id/HomePage" /> \ No newline at end of file -- cgit v1.2.3 From 97ff499413e5dae958ac3741616e2ee84a188871 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Fri, 12 Feb 2021 12:35:33 +0100 Subject: Adding Article and Top Manga pages. --- app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt | 31 ++++++++++++++++++++++ app/src/main/java/xyz/adjutor/aniki/HomePage.kt | 6 ++--- app/src/main/java/xyz/adjutor/aniki/NewsPage.kt | 2 +- .../main/java/xyz/adjutor/aniki/TopMangaPage.kt | 31 ++++++++++++++++++++++ app/src/main/res/layout/article_page.xml | 29 ++++++++++++++++++++ app/src/main/res/layout/top_manga_page.xml | 29 ++++++++++++++++++++ app/src/main/res/navigation/nav_graph.xml | 30 +++++++++++++++++++++ app/src/main/res/values/strings.xml | 6 +++-- 8 files changed, 157 insertions(+), 7 deletions(-) create mode 100644 app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt create mode 100644 app/src/main/java/xyz/adjutor/aniki/TopMangaPage.kt create mode 100644 app/src/main/res/layout/article_page.xml create mode 100644 app/src/main/res/layout/top_manga_page.xml (limited to 'app/src/main/res/navigation') diff --git a/app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt b/app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt new file mode 100644 index 0000000..68af902 --- /dev/null +++ b/app/src/main/java/xyz/adjutor/aniki/ArticlePage.kt @@ -0,0 +1,31 @@ +package xyz.adjutor.aniki + +import android.os.Bundle +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.Button +import androidx.navigation.fragment.findNavController + +/** + * A simple [Fragment] subclass as the second destination in the navigation. + */ +class ArticlePage : Fragment() { + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.article_page, container, false) + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + view.findViewById