diff --git a/app/src/main/java/com/sigmai/stylemento/feature/coordinator/CoordinatorFragment.kt b/app/src/main/java/com/sigmai/stylemento/feature/coordinator/CoordinatorHostFragment.kt similarity index 91% rename from app/src/main/java/com/sigmai/stylemento/feature/coordinator/CoordinatorFragment.kt rename to app/src/main/java/com/sigmai/stylemento/feature/coordinator/CoordinatorHostFragment.kt index 79e88c93..cb2a4847 100644 --- a/app/src/main/java/com/sigmai/stylemento/feature/coordinator/CoordinatorFragment.kt +++ b/app/src/main/java/com/sigmai/stylemento/feature/coordinator/CoordinatorHostFragment.kt @@ -7,7 +7,7 @@ import android.view.ViewGroup import androidx.fragment.app.Fragment import com.sigmai.stylemento.R -class CoordinatorFragment : Fragment() { +class CoordinatorHostFragment : Fragment() { override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, diff --git a/app/src/main/java/com/sigmai/stylemento/feature/login/LoginFragment.kt b/app/src/main/java/com/sigmai/stylemento/feature/login/LoginFragment.kt index 4860d550..d0062907 100644 --- a/app/src/main/java/com/sigmai/stylemento/feature/login/LoginFragment.kt +++ b/app/src/main/java/com/sigmai/stylemento/feature/login/LoginFragment.kt @@ -24,7 +24,7 @@ class LoginFragment : BaseFragment() { binding.viewModel = viewModel viewModel.startNext.observe(this, Observer { - findNavController().navigate(LoginFragmentDirections.actionLoginToSignup()) + findNavController().navigate(R.id.action_login_to_signup) }) } } \ No newline at end of file diff --git a/app/src/main/java/com/sigmai/stylemento/feature/main/MainFragment.kt b/app/src/main/java/com/sigmai/stylemento/feature/main/MainFragment.kt index 80803e1f..6dafb4bb 100644 --- a/app/src/main/java/com/sigmai/stylemento/feature/main/MainFragment.kt +++ b/app/src/main/java/com/sigmai/stylemento/feature/main/MainFragment.kt @@ -10,6 +10,11 @@ import com.sigmai.stylemento.global.base.BaseFragment class MainFragment : BaseFragment() { override val layoutResourceId = R.layout.fragment_main + private val outlinedIcons = arrayListOf(R.drawable.ic_tab_outlined_notification, R.drawable.ic_tab_outlined_coordinator, + R.drawable.ic_tab_outlined_home, R.drawable.ic_tab_outlined_chat, R.drawable.ic_tab_outlined_my_page) + private val filledIcons = arrayListOf(R.drawable.ic_tab_filled_notification, R.drawable.ic_tab_filled_coordinator, + R.drawable.ic_tab_filled_home, R.drawable.ic_tab_filled_chat, R.drawable.ic_tab_fillted_my_page) + override fun initState() { super.initState() @@ -23,7 +28,7 @@ class MainFragment : BaseFragment() { viewPager?.adapter = pagerAdapter TabLayoutMediator(tabs!!, viewPager!!) { tab, position -> - tab.text = "TAB" + tab.setIcon(outlinedIcons[position]) }.attach() } } \ No newline at end of file diff --git a/app/src/main/java/com/sigmai/stylemento/feature/main/MainPagerAdapter.kt b/app/src/main/java/com/sigmai/stylemento/feature/main/MainPagerAdapter.kt index d8319ae7..7285d2a1 100644 --- a/app/src/main/java/com/sigmai/stylemento/feature/main/MainPagerAdapter.kt +++ b/app/src/main/java/com/sigmai/stylemento/feature/main/MainPagerAdapter.kt @@ -3,15 +3,19 @@ package com.sigmai.stylemento.feature.main import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.viewpager2.adapter.FragmentStateAdapter +import com.sigmai.stylemento.feature.coordinator.CoordinatorHostFragment import com.sigmai.stylemento.feature.home.HomeFragment import com.sigmai.stylemento.feature.home.HomeHostFragment class MainPagerAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) { - override fun getItemCount(): Int = 2 + override fun getItemCount(): Int = 5 override fun createFragment(position: Int): Fragment { return when(position) { 0 -> HomeHostFragment() 1 -> HomeHostFragment() + 2 -> HomeHostFragment() + 3 -> HomeHostFragment() + 4 -> HomeHostFragment() else -> HomeHostFragment() } }