Шаблон для разработки
Some checks failed
Merge core/template-android-project to this repo / merge-if-needed (push) Failing after 15s

This commit is contained in:
2024-08-05 00:09:01 +03:00
parent 3e6fe310e0
commit b4fe30358b
15 changed files with 285 additions and 3 deletions

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<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/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<!-- TODO: Реализовать фрагмент для навигации. Должен растягиваться по родительскому объекту, иметь id "nav_host_fragment" и обозначить параметр navGraph "nav_graph" -->
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FirstFragment">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="First Fragment"
android:layout_gravity="center" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:orientation="vertical">
<Button
android:id="@+id/fromFirstToSecond"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Second" />
<Button
android:id="@+id/fromFirstToThird"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Third" />
</LinearLayout>
</FrameLayout>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SecondFragment">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Second Fragment"
android:layout_gravity="center" />
</FrameLayout>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ThirdFragment">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Third Fragment"
android:layout_gravity="center" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:orientation="vertical">
<Button
android:id="@+id/fromThirdToFirst"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Second" />
</LinearLayout>
</FrameLayout>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/nav_graph"
app:startDestination="@id/firstFragment">
<fragment
android:id="@+id/firstFragment"
android:name="ru.myitschool.work.FirstFragment"
android:label="First Fragment">
<action
android:id="@+id/action_firstFragment_to_secondFragment"
app:destination="@id/secondFragment" />
<action
android:id="@+id/action_firstFragment_to_thirdFragment"
app:destination="@id/thirdFragment" />
</fragment>
<fragment
android:id="@+id/secondFragment"
android:name="ru.myitschool.work.SecondFragment"
android:label="Second Fragment"/>
<fragment
android:id="@+id/thirdFragment"
android:name="ru.myitschool.work.ThirdFragment"
android:label="Third Fragment">
<!-- TODO: Создать переход из третьего фрагмента в первый с id "action_thirdFragment_to_firstFragment" -->
</fragment>
</navigation>

View File

@ -1,3 +1,4 @@
<resources>
<string name="app_name">Work</string>
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>

View File

@ -5,7 +5,7 @@
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<!--
<include .../>
<exclude .../>
-->