Skip to content

Commit

Permalink
refactor: rename pager
Browse files Browse the repository at this point in the history
Renaming these two pager ids so that android-studio should know both are different pager
  • Loading branch information
SanjaySargam authored and david-allison committed Jul 26, 2024
1 parent ece272e commit 28733a5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ open class CardTemplateEditor : AnkiActivity(), DeckSelectionListener {
}

slidingTabLayout = findViewById(R.id.sliding_tabs)
viewPager = findViewById(R.id.pager)
viewPager = findViewById(R.id.card_template_editor_pager)
setNavigationBarColor(R.attr.appBarColor)

// Disable the home icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class SetDueDateDialog : DialogFragment() {
viewModel.isValidFlow.collect { isValid -> positiveButton.isEnabled = isValid }
}
// setup viewpager + tabs
val viewPager = findViewById<ViewPager2>(R.id.pager)!!
val viewPager = findViewById<ViewPager2>(R.id.set_due_date_pager)!!
viewPager.adapter = DueDateStateAdapter(this@SetDueDateDialog)
val tabLayout = findViewById<TabLayout>(R.id.tab_layout)!!
TabLayoutMediator(tabLayout, viewPager) { tab: TabLayout.Tab, position: Int ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
app:tabGravity="start"
app:tabMode="scrollable" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/pager"
android:id="@+id/card_template_editor_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
Expand Down
2 changes: 1 addition & 1 deletion AnkiDroid/src/main/res/layout/dialog_set_due_date.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</com.google.android.material.tabs.TabLayout>

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/pager"
android:id="@+id/set_due_date_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
Expand Down

0 comments on commit 28733a5

Please sign in to comment.