Skip to content

Commit

Permalink
[UI/#15] 메인 뷰 fragment 및 fcv, bnv 레이아웃 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
b1urrrr committed Jul 4, 2023
1 parent f305c39 commit 05b0435
Show file tree
Hide file tree
Showing 14 changed files with 166 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".presentation.MainActivity"
android:name=".presentation.main.MainActivity"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.yello.presentation
package com.yello.presentation.main

import android.os.Bundle
import com.example.ui.base.BindingActivity
import com.yello.R
import com.yello.databinding.ActivityMainBinding

class MainActivity : BindingActivity<ActivityMainBinding>(R.layout.activity_main) {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/com/yello/presentation/main/look/LookFragment.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.yello.presentation.main.look

import com.example.ui.base.BindingFragment
import com.yello.R
import com.yello.databinding.FragmentLookBinding

class LookFragment : BindingFragment<FragmentLookBinding>(R.layout.fragment_look) {

companion object {
@JvmStatic
fun newInstance() = LookFragment()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.yello.presentation.main.myyello

import com.example.ui.base.BindingFragment
import com.yello.R
import com.yello.databinding.FragmentMyYelloBinding

class MyYelloFragment : BindingFragment<FragmentMyYelloBinding>(R.layout.fragment_my_yello) {

companion object {
@JvmStatic
fun newInstance() = MyYelloFragment()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.yello.presentation.main.profile

import com.example.ui.base.BindingFragment
import com.yello.R
import com.yello.databinding.FragmentProfileBinding

class ProfileFragment : BindingFragment<FragmentProfileBinding>(R.layout.fragment_profile) {

companion object {
@JvmStatic
fun newInstance() = ProfileFragment()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.yello.presentation.main.recommend

import com.example.ui.base.BindingFragment
import com.yello.R
import com.yello.databinding.FragmentRecommendBinding

class RecommendFragment : BindingFragment<FragmentRecommendBinding>(R.layout.fragment_recommend) {

companion object {
@JvmStatic
fun newInstance() = RecommendFragment()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.yello.presentation.main.yello

import com.example.ui.base.BindingFragment
import com.yello.R
import com.yello.databinding.FragmentYelloBinding

class YelloFragment : BindingFragment<FragmentYelloBinding>(R.layout.fragment_yello) {

companion object {
@JvmStatic
fun newInstance() = YelloFragment()
}
}
22 changes: 16 additions & 6 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,30 @@
<layout 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"
tools:context=".presentation.MainActivity">
tools:context=".presentation.main.MainActivity">

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_main"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:layout_width="wrap_content"
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fcv_main"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/bnv_main"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:layout="@layout/fragment_yello" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bnv_main"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
16 changes: 16 additions & 0 deletions app/src/main/res/layout/fragment_look.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".presentation.main.look.LookFragment">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
</layout>
16 changes: 16 additions & 0 deletions app/src/main/res/layout/fragment_my_yello.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".presentation.main.myyello.MyYelloFragment">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
</layout>
16 changes: 16 additions & 0 deletions app/src/main/res/layout/fragment_profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".presentation.main.profile.ProfileFragment">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
</layout>
16 changes: 16 additions & 0 deletions app/src/main/res/layout/fragment_recommend.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".presentation.main.recommend.RecommendFragment">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
</layout>
16 changes: 16 additions & 0 deletions app/src/main/res/layout/fragment_yello.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".presentation.main.yello.YelloFragment">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
</layout>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<resources>
<string name="app_name">YELLO</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>

0 comments on commit 05b0435

Please sign in to comment.