Skip to content

Commit

Permalink
kuring-93 [변경] 클래스/리소스 네이밍 변경 (campus -> konkuk_article)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeon-kyu committed Nov 19, 2023
1 parent 95e1893 commit 45cb289
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
}
}
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/menu/menu_bottom_navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:title="검색" />

<item
android:id="@+id/campus_screen"
android:id="@+id/konkuk_article_screen"
android:icon="@drawable/ic_campus"
android:title="건대 교지" />

Expand Down

0 comments on commit 45cb289

Please sign in to comment.