Skip to content

Commit

Permalink
fix(browse): fix regression showing borders
Browse files Browse the repository at this point in the history
Fixes 17751
  • Loading branch information
david-allison committed Jan 7, 2025
1 parent 04fe0d0 commit a10adbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion AnkiDroid/src/main/java/com/ichi2/anki/CardBrowser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import androidx.appcompat.widget.SearchView
import androidx.appcompat.widget.ThemeUtils
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import anki.collection.OpChanges
Expand Down Expand Up @@ -391,7 +392,9 @@ open class CardBrowser :
// link the adapter to the main mCardsListView
cardsListView.adapter = cardsAdapter
cardsAdapter.stateRestorationPolicy = RecyclerView.Adapter.StateRestorationPolicy.PREVENT_WHEN_EMPTY
cardsListView.layoutManager = LinearLayoutManager(this)
val layoutManager = LinearLayoutManager(this)
cardsListView.layoutManager = layoutManager
cardsListView.addItemDecoration(DividerItemDecoration(cardsListView.context, layoutManager.orientation))

deckSpinnerSelection =
DeckSpinnerSelection(
Expand Down
2 changes: 0 additions & 2 deletions AnkiDroid/src/main/res/layout/card_browser.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/colorBackground"
android:divider="?attr/cardBrowserDivider"
android:overScrollFooter="@color/transparent"
android:dividerHeight="0.5dp"
android:clipToPadding="false"
android:paddingBottom="72dp"
android:drawSelectorOnTop="true"
Expand Down

0 comments on commit a10adbf

Please sign in to comment.