Skip to content

Commit

Permalink
[ADD/#8] follower 메인 메뉴 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
b1urrrr committed May 12, 2023
1 parent 2e8e9e5 commit e7d9d64
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.fragment.app.replace
import dagger.hilt.android.AndroidEntryPoint
import org.android.go.sopt.R
import org.android.go.sopt.databinding.ActivityMainBinding
import org.android.go.sopt.presentation.main.follower.FollowerFragment
import org.android.go.sopt.presentation.main.gallery.GalleryFragment
import org.android.go.sopt.presentation.main.home.HomeFragment
import org.android.go.sopt.presentation.main.profile.ProfileFragment
Expand All @@ -30,6 +31,7 @@ class MainActivity : BindingActivity<ActivityMainBinding>(R.layout.activity_main
R.id.menu_home -> navigateTo<HomeFragment>()
R.id.menu_gallery -> navigateTo<GalleryFragment>()
R.id.menu_search -> navigateTo<SearchFragment>()
R.id.menu_follower -> navigateTo<FollowerFragment>()
R.id.menu_profile -> navigateTo<ProfileFragment>()
}
true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.android.go.sopt.presentation.main.follower

import org.android.go.sopt.R
import org.android.go.sopt.databinding.FragmentFollowerBinding
import org.android.go.sopt.util.binding.BindingFragment

class FollowerFragment : BindingFragment<FragmentFollowerBinding>(R.layout.fragment_follower) {

companion object {
@JvmStatic
fun newInstance() = FollowerFragment()
}
}
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/ic_main_follower.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z"/>
</vector>
29 changes: 29 additions & 0 deletions app/src/main/res/layout/fragment_follower.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".presentation.main.follower.FollowerFragment">

<data>

</data>

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

<TextView
android:id="@+id/tv_follower_fragment"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center"
android:text="@string/follower_fragment"
android:textAppearance="?textAppearanceBodyLarge" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
4 changes: 4 additions & 0 deletions app/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
android:id="@+id/menu_search"
android:icon="@drawable/ic_main_search"
android:title="@string/main_search" />
<item
android:id="@+id/menu_follower"
android:icon="@drawable/ic_main_follower"
android:title="@string/main_follower" />
<item
android:id="@+id/menu_profile"
android:icon="@drawable/ic_main_profile"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<string name="main_home">홈</string>
<string name="main_gallery">갤러리</string>
<string name="main_search">검색</string>
<string name="main_follower">팔로워</string>
<string name="main_profile">프로필</string>

<!-- home -->
Expand All @@ -48,6 +49,9 @@
<!-- search -->
<string name="search_fragment">SEARCH FRAGMENT</string>

<!-- follower -->
<string name="follower_fragment">FOLLOWER FRAGMENT</string>

<!-- profile -->
<string name="profile_name">이름 : %s</string>
<string name="profile_specialty">특기 : %s</string>
Expand Down

0 comments on commit e7d9d64

Please sign in to comment.