From 45cb289cfc948d71d072e1114356a3e63daede96 Mon Sep 17 00:00:00 2001 From: yeon-kyu Date: Fri, 17 Nov 2023 23:23:54 +0900 Subject: [PATCH] =?UTF-8?q?kuring-93=20[=EB=B3=80=EA=B2=BD]=20=ED=81=B4?= =?UTF-8?q?=EB=9E=98=EC=8A=A4/=EB=A6=AC=EC=86=8C=EC=8A=A4=20=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD=20(campus=20->=20konkuk?= =?UTF-8?q?=5Farticle)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ku_stacks/ku_ring/ui/main/MainActivity.kt | 4 ++-- .../java/com/ku_stacks/ku_ring/ui/main/MainPagerAdapter.kt | 6 +++--- .../KonkukArticleFragment.kt} | 4 ++-- app/src/main/res/menu/menu_bottom_navigation.xml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename app/src/main/java/com/ku_stacks/ku_ring/ui/main/{campus_onboarding/CampusFragment.kt => konkuk_article/KonkukArticleFragment.kt} (96%) diff --git a/app/src/main/java/com/ku_stacks/ku_ring/ui/main/MainActivity.kt b/app/src/main/java/com/ku_stacks/ku_ring/ui/main/MainActivity.kt index 4d4f087b7..dee34411e 100644 --- a/app/src/main/java/com/ku_stacks/ku_ring/ui/main/MainActivity.kt +++ b/app/src/main/java/com/ku_stacks/ku_ring/ui/main/MainActivity.kt @@ -25,7 +25,7 @@ class MainActivity : AppCompatActivity() { binding.mainBottomNavigation.selectedItemId = when (position) { 0 -> R.id.notice_screen 1 -> R.id.search_screen - 2 -> R.id.campus_screen + 2 -> R.id.konkuk_article_screen 3 -> R.id.setting_screen else -> throw IllegalStateException("no such main viewpager position") } @@ -77,7 +77,7 @@ class MainActivity : AppCompatActivity() { when (item.setChecked(true).itemId) { R.id.notice_screen -> binding.mainViewPager.setCurrentItem(0, false) R.id.search_screen -> binding.mainViewPager.setCurrentItem(1, false) - R.id.campus_screen -> binding.mainViewPager.setCurrentItem(2, false) + R.id.konkuk_article_screen -> binding.mainViewPager.setCurrentItem(2, false) R.id.setting_screen -> binding.mainViewPager.setCurrentItem(3, false) else -> return false } diff --git a/app/src/main/java/com/ku_stacks/ku_ring/ui/main/MainPagerAdapter.kt b/app/src/main/java/com/ku_stacks/ku_ring/ui/main/MainPagerAdapter.kt index 86dbf6a01..5debedbb3 100644 --- a/app/src/main/java/com/ku_stacks/ku_ring/ui/main/MainPagerAdapter.kt +++ b/app/src/main/java/com/ku_stacks/ku_ring/ui/main/MainPagerAdapter.kt @@ -4,7 +4,7 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.lifecycle.Lifecycle import androidx.viewpager2.adapter.FragmentStateAdapter -import com.ku_stacks.ku_ring.ui.main.campus_onboarding.CampusFragment +import com.ku_stacks.ku_ring.ui.main.konkuk_article.KonkukArticleFragment import com.ku_stacks.ku_ring.ui.main.notice.NoticesParentFragment import com.ku_stacks.ku_ring.ui.main.search.SearchFragment import com.ku_stacks.ku_ring.ui.main.setting.SettingFragment @@ -13,11 +13,11 @@ class MainPagerAdapter(fm: FragmentManager, lc: Lifecycle) : FragmentStateAdapte private val items = arrayOf( { NoticesParentFragment() }, { SearchFragment() }, - { CampusFragment() }, + { KonkukArticleFragment() }, { SettingFragment() } ) override fun getItemCount() = items.size override fun createFragment(position: Int): Fragment = items[position].invoke() -} \ No newline at end of file +} diff --git a/app/src/main/java/com/ku_stacks/ku_ring/ui/main/campus_onboarding/CampusFragment.kt b/app/src/main/java/com/ku_stacks/ku_ring/ui/main/konkuk_article/KonkukArticleFragment.kt similarity index 96% rename from app/src/main/java/com/ku_stacks/ku_ring/ui/main/campus_onboarding/CampusFragment.kt rename to app/src/main/java/com/ku_stacks/ku_ring/ui/main/konkuk_article/KonkukArticleFragment.kt index e268d183e..be26a8bc5 100644 --- a/app/src/main/java/com/ku_stacks/ku_ring/ui/main/campus_onboarding/CampusFragment.kt +++ b/app/src/main/java/com/ku_stacks/ku_ring/ui/main/konkuk_article/KonkukArticleFragment.kt @@ -1,4 +1,4 @@ -package com.ku_stacks.ku_ring.ui.main.campus_onboarding +package com.ku_stacks.ku_ring.ui.main.konkuk_article import android.content.Intent import android.os.Bundle @@ -15,7 +15,7 @@ import dagger.hilt.android.AndroidEntryPoint import timber.log.Timber @AndroidEntryPoint -class CampusFragment : Fragment() { +class KonkukArticleFragment : Fragment() { private lateinit var binding: FragmentKonkukArticleBinding diff --git a/app/src/main/res/menu/menu_bottom_navigation.xml b/app/src/main/res/menu/menu_bottom_navigation.xml index 3004de452..5e0e38359 100644 --- a/app/src/main/res/menu/menu_bottom_navigation.xml +++ b/app/src/main/res/menu/menu_bottom_navigation.xml @@ -12,7 +12,7 @@ android:title="검색" />