Browse Source

firt init

Dola TENG 1 year ago
parent
commit
59452175d2

+ 7 - 0
app/src/main/java/com/sambath/sbc/screen/FighterFragment.kt

@@ -0,0 +1,7 @@
+package com.sambath.sbc.screen
+
+// TODO: Rename parameter arguments, choose names that match
+// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
+private const val ARG_PARAM1 = "param1"
+private const val ARG_PARAM2 = "param2"
+

+ 60 - 0
app/src/main/java/com/sambath/sbc/screen/event/EventFragment.kt

@@ -0,0 +1,60 @@
+package com.sambath.sbc.screen.event
+
+import android.os.Bundle
+import androidx.fragment.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.sambath.sbc.R
+
+// TODO: Rename parameter arguments, choose names that match
+// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
+private const val ARG_PARAM1 = "param1"
+private const val ARG_PARAM2 = "param2"
+
+/**
+ * A simple [Fragment] subclass.
+ * Use the [EventFragment.newInstance] factory method to
+ * create an instance of this fragment.
+ */
+class EventFragment : Fragment() {
+    // TODO: Rename and change types of parameters
+    private var param1: String? = null
+    private var param2: String? = null
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        arguments?.let {
+            param1 = it.getString(ARG_PARAM1)
+            param2 = it.getString(ARG_PARAM2)
+        }
+    }
+
+    override fun onCreateView(
+        inflater: LayoutInflater, container: ViewGroup?,
+        savedInstanceState: Bundle?
+    ): View? {
+        // Inflate the layout for this fragment
+        return inflater.inflate(R.layout.fragment_event, container, false)
+    }
+
+    companion object {
+        /**
+         * Use this factory method to create a new instance of
+         * this fragment using the provided parameters.
+         *
+         * @param param1 Parameter 1.
+         * @param param2 Parameter 2.
+         * @return A new instance of fragment EventFragment.
+         */
+        // TODO: Rename and change types and number of parameters
+        @JvmStatic
+        fun newInstance(param1: String, param2: String) =
+            EventFragment().apply {
+                arguments = Bundle().apply {
+                    putString(ARG_PARAM1, param1)
+                    putString(ARG_PARAM2, param2)
+                }
+            }
+    }
+}

+ 29 - 0
app/src/main/java/com/sambath/sbc/screen/fighter/FighterFragment.kt

@@ -0,0 +1,29 @@
+package com.sambath.sbc.screen.fighter
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.Fragment
+import com.sambath.sbc.R
+
+/**
+ * A simple [Fragment] subclass.
+ * Use the [FighterFragment.newInstance] factory method to
+ * create an instance of this fragment.
+ */
+class FighterFragment : Fragment() {
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+
+    }
+
+    override fun onCreateView(
+        inflater: LayoutInflater, container: ViewGroup?,
+        savedInstanceState: Bundle?
+    ): View? {
+        // Inflate the layout for this fragment
+        return inflater.inflate(R.layout.fragment_fighter, container, false)
+    }
+}

+ 60 - 0
app/src/main/java/com/sambath/sbc/screen/lives/LivesFragment.kt

@@ -0,0 +1,60 @@
+package com.sambath.sbc.screen.lives
+
+import android.os.Bundle
+import androidx.fragment.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.sambath.sbc.R
+
+// TODO: Rename parameter arguments, choose names that match
+// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
+private const val ARG_PARAM1 = "param1"
+private const val ARG_PARAM2 = "param2"
+
+/**
+ * A simple [Fragment] subclass.
+ * Use the [LivesFragment.newInstance] factory method to
+ * create an instance of this fragment.
+ */
+class LivesFragment : Fragment() {
+    // TODO: Rename and change types of parameters
+    private var param1: String? = null
+    private var param2: String? = null
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        arguments?.let {
+            param1 = it.getString(ARG_PARAM1)
+            param2 = it.getString(ARG_PARAM2)
+        }
+    }
+
+    override fun onCreateView(
+        inflater: LayoutInflater, container: ViewGroup?,
+        savedInstanceState: Bundle?
+    ): View? {
+        // Inflate the layout for this fragment
+        return inflater.inflate(R.layout.fragment_lives, container, false)
+    }
+
+    companion object {
+        /**
+         * Use this factory method to create a new instance of
+         * this fragment using the provided parameters.
+         *
+         * @param param1 Parameter 1.
+         * @param param2 Parameter 2.
+         * @return A new instance of fragment LivesFragment.
+         */
+        // TODO: Rename and change types and number of parameters
+        @JvmStatic
+        fun newInstance(param1: String, param2: String) =
+            LivesFragment().apply {
+                arguments = Bundle().apply {
+                    putString(ARG_PARAM1, param1)
+                    putString(ARG_PARAM2, param2)
+                }
+            }
+    }
+}

+ 60 - 0
app/src/main/java/com/sambath/sbc/screen/news/NewsFragment.kt

@@ -0,0 +1,60 @@
+package com.sambath.sbc.screen.news
+
+import android.os.Bundle
+import androidx.fragment.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.sambath.sbc.R
+
+// TODO: Rename parameter arguments, choose names that match
+// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
+private const val ARG_PARAM1 = "param1"
+private const val ARG_PARAM2 = "param2"
+
+/**
+ * A simple [Fragment] subclass.
+ * Use the [NewsFragment.newInstance] factory method to
+ * create an instance of this fragment.
+ */
+class NewsFragment : Fragment() {
+    // TODO: Rename and change types of parameters
+    private var param1: String? = null
+    private var param2: String? = null
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        arguments?.let {
+            param1 = it.getString(ARG_PARAM1)
+            param2 = it.getString(ARG_PARAM2)
+        }
+    }
+
+    override fun onCreateView(
+        inflater: LayoutInflater, container: ViewGroup?,
+        savedInstanceState: Bundle?
+    ): View? {
+        // Inflate the layout for this fragment
+        return inflater.inflate(R.layout.fragment_news, container, false)
+    }
+
+    companion object {
+        /**
+         * Use this factory method to create a new instance of
+         * this fragment using the provided parameters.
+         *
+         * @param param1 Parameter 1.
+         * @param param2 Parameter 2.
+         * @return A new instance of fragment NewsFragment.
+         */
+        // TODO: Rename and change types and number of parameters
+        @JvmStatic
+        fun newInstance(param1: String, param2: String) =
+            NewsFragment().apply {
+                arguments = Bundle().apply {
+                    putString(ARG_PARAM1, param1)
+                    putString(ARG_PARAM2, param2)
+                }
+            }
+    }
+}

+ 60 - 0
app/src/main/java/com/sambath/sbc/screen/notifications/NotificationsFragment.kt

@@ -0,0 +1,60 @@
+package com.sambath.sbc.screen.notifications
+
+import android.os.Bundle
+import androidx.fragment.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.sambath.sbc.R
+
+// TODO: Rename parameter arguments, choose names that match
+// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
+private const val ARG_PARAM1 = "param1"
+private const val ARG_PARAM2 = "param2"
+
+/**
+ * A simple [Fragment] subclass.
+ * Use the [NotificationsFragment.newInstance] factory method to
+ * create an instance of this fragment.
+ */
+class NotificationsFragment : Fragment() {
+    // TODO: Rename and change types of parameters
+    private var param1: String? = null
+    private var param2: String? = null
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        arguments?.let {
+            param1 = it.getString(ARG_PARAM1)
+            param2 = it.getString(ARG_PARAM2)
+        }
+    }
+
+    override fun onCreateView(
+        inflater: LayoutInflater, container: ViewGroup?,
+        savedInstanceState: Bundle?
+    ): View? {
+        // Inflate the layout for this fragment
+        return inflater.inflate(R.layout.fragment_notifications, container, false)
+    }
+
+    companion object {
+        /**
+         * Use this factory method to create a new instance of
+         * this fragment using the provided parameters.
+         *
+         * @param param1 Parameter 1.
+         * @param param2 Parameter 2.
+         * @return A new instance of fragment NotificationsFragment.
+         */
+        // TODO: Rename and change types and number of parameters
+        @JvmStatic
+        fun newInstance(param1: String, param2: String) =
+            NotificationsFragment().apply {
+                arguments = Bundle().apply {
+                    putString(ARG_PARAM1, param1)
+                    putString(ARG_PARAM2, param2)
+                }
+            }
+    }
+}

+ 10 - 6
app/src/main/res/layout/app_bar.xml

@@ -38,6 +38,7 @@
                 android:layout_height="wrap_content"
                 android:layout_marginStart="4dp"
                 android:textColor="@color/color_white"
+                android:visibility="gone"
                 app:layout_constraintBottom_toTopOf="@+id/tv_amount"
                 app:layout_constraintStart_toEndOf="@id/iv_logo"
                 app:layout_constraintTop_toTopOf="@id/iv_logo"
@@ -51,6 +52,7 @@
                 android:adjustViewBounds="true"
                 android:scaleType="fitXY"
                 android:src="@drawable/ic_person"
+                android:visibility="gone"
                 app:layout_constraintStart_toEndOf="@+id/tv_user_id"
                 app:layout_constraintTop_toTopOf="@+id/tv_user_id" />
 
@@ -67,7 +69,7 @@
                 android:text="2"
                 android:textColor="@color/color_white"
                 android:textStyle="bold"
-                android:visibility="invisible"
+                android:visibility="gone"
                 app:layout_constraintBottom_toBottomOf="@+id/iv_person"
                 app:layout_constraintStart_toStartOf="@id/iv_person"
                 app:layout_constraintTop_toTopOf="@id/iv_person" />
@@ -77,6 +79,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:textColor="@color/color_white"
+                android:visibility="gone"
                 app:layout_constraintBottom_toBottomOf="@+id/iv_logo"
                 app:layout_constraintStart_toStartOf="@id/tv_user_id"
                 app:layout_constraintTop_toBottomOf="@id/tv_user_id"
@@ -92,8 +95,8 @@
                 android:clickable="true"
                 android:focusable="true"
                 android:scaleType="fitXY"
-                android:visibility="gone"
                 android:src="@drawable/ic_auto_new"
+                android:visibility="gone"
                 app:layout_constraintBottom_toBottomOf="@+id/tv_amount"
                 app:layout_constraintStart_toEndOf="@+id/tv_amount"
                 app:layout_constraintTop_toTopOf="@+id/tv_amount" />
@@ -108,7 +111,7 @@
                 android:clickable="true"
                 android:focusable="true"
                 android:scaleType="fitXY"
-                android:src="@drawable/ic_setting"
+                android:src="@drawable/ic_user_white"
                 app:layout_constraintBottom_toBottomOf="@+id/iv_logo"
                 app:layout_constraintEnd_toEndOf="parent"
                 app:layout_constraintTop_toTopOf="@id/iv_logo"
@@ -118,7 +121,6 @@
                 android:id="@+id/iv_sound"
                 android:layout_width="24dp"
                 android:layout_height="wrap_content"
-                android:visibility="gone"
                 android:layout_marginEnd="8dp"
                 android:adjustViewBounds="true"
                 android:background="?attr/selectableItemBackgroundBorderless"
@@ -126,6 +128,7 @@
                 android:focusable="true"
                 android:scaleType="fitXY"
                 android:src="@drawable/ic_unmute"
+                android:visibility="gone"
                 app:layout_constraintBottom_toBottomOf="@+id/iv_logo"
                 app:layout_constraintEnd_toStartOf="@+id/iv_report"
                 app:layout_constraintTop_toTopOf="@id/iv_logo" />
@@ -139,9 +142,10 @@
                 android:clickable="true"
                 android:focusable="true"
                 android:text="CH1"
-                android:textStyle="bold"
-                android:textSize="16sp"
                 android:textColor="@color/color_white"
+                android:textSize="16sp"
+                android:textStyle="bold"
+                android:visibility="gone"
                 app:layout_constraintBottom_toBottomOf="@+id/iv_logo"
                 app:layout_constraintEnd_toStartOf="@+id/iv_report"
                 app:layout_constraintTop_toTopOf="@id/iv_logo" />

+ 14 - 0
app/src/main/res/layout/fragment_event.xml

@@ -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=".screen.event.EventFragment">
+
+    <!-- TODO: Update blank fragment layout -->
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:text="@string/hello_blank_fragment" />
+
+</FrameLayout>

+ 14 - 0
app/src/main/res/layout/fragment_fighter.xml

@@ -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=".screen.fighter.FighterFragment">
+
+    <!-- TODO: Update blank fragment layout -->
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:text="@string/hello_blank_fragment" />
+
+</FrameLayout>

+ 14 - 0
app/src/main/res/layout/fragment_lives.xml

@@ -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=".screen.lives.LivesFragment">
+
+    <!-- TODO: Update blank fragment layout -->
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:text="@string/hello_blank_fragment" />
+
+</FrameLayout>

+ 14 - 0
app/src/main/res/layout/fragment_news.xml

@@ -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=".screen.news.NewsFragment">
+
+    <!-- TODO: Update blank fragment layout -->
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:text="@string/hello_blank_fragment" />
+
+</FrameLayout>

+ 14 - 0
app/src/main/res/layout/fragment_notifications.xml

@@ -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=".screen.notifications.NotificationsFragment">
+
+    <!-- TODO: Update blank fragment layout -->
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:text="@string/hello_blank_fragment" />
+
+</FrameLayout>

+ 29 - 0
app/src/main/res/menu/bottom_nav_menu.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item
+        android:id="@+id/navigation_home"
+        android:icon="@drawable/ic_help"
+        android:title="@string/title_fighters" />
+
+    <item
+        android:id="@+id/navigation_dashboard"
+        android:icon="@drawable/ic_help"
+        android:title="@string/title_news" />
+
+    <item
+        android:id="@+id/navigation_live"
+        android:icon="@drawable/ic_help"
+        android:title="@string/title_live" />
+
+    <item
+        android:id="@+id/navigation_event"
+        android:icon="@drawable/ic_help"
+        android:title="@string/title_event" />
+
+    <item
+        android:id="@+id/navigation_shop"
+        android:icon="@drawable/ic_help"
+        android:title="@string/title_shop" />
+
+</menu>

+ 38 - 0
app/src/main/res/navigation/mobile_navigation.xml

@@ -0,0 +1,38 @@
+<?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"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/mobile_navigation"
+    app:startDestination="@+id/navigation_home">
+
+    <fragment
+        android:id="@+id/navigation_home"
+        android:name="com.sambath.sbc.screen.fighter.FighterFragment"
+        android:label="@string/title_fighters"
+        tools:layout="@layout/fragment_fighter" />
+
+    <fragment
+        android:id="@+id/navigation_dashboard"
+        android:name="com.sambath.sbc.screen.news.NewsFragment"
+        android:label="@string/title_news"
+        tools:layout="@layout/fragment_news" />
+
+    <fragment
+        android:id="@+id/navigation_live"
+        android:name="com.sambath.sbc.screen.lives.LivesFragment"
+        android:label="@string/title_live"
+        tools:layout="@layout/fragment_lives" />
+
+    <fragment
+        android:id="@+id/navigation_event"
+        android:name="com.sambath.sbc.screen.event.EventFragment"
+        android:label="@string/title_event"
+        tools:layout="@layout/fragment_event" />
+
+    <fragment
+        android:id="@+id/navigation_shop"
+        android:name="com.sambath.sbc.screen.notifications.NotificationsFragment"
+        android:label="@string/title_shop"
+        tools:layout="@layout/fragment_notifications" />
+
+</navigation>

+ 8 - 0
app/src/main/res/values/strings.xml

@@ -68,4 +68,12 @@
     <string name="hint_email">Email</string>
     <string name="hint_phone">Phone Number</string>
     <string name="hint_confirm_password">Confirm Password</string>
+
+    <string name="title_fighters">Fighters</string>
+    <string name="title_news">News</string>
+    <string name="title_event">Event</string>
+    <string name="title_shop">Shop</string>
+    <string name="title_live">Lives</string>
+    <!-- TODO: Remove or change this placeholder text -->
+    <string name="hello_blank_fragment">Hello blank fragment</string>
 </resources>