Skip to content

Commit 7f20a0e

Browse files
argon2rdavid-allison
authored andcommitted
fix: Card Browser Border and Header Height
* The header is made taller to make it accessible as a tappable element * The vertical border between columns is removed * There was design consensus that this looks better Fixes 17894 Fixes 17896
1 parent f8f2ec9 commit 7f20a0e

File tree

6 files changed

+21
-28
lines changed

6 files changed

+21
-28
lines changed

AnkiDroid/src/main/java/com/ichi2/anki/browser/BrowserMultiColumnAdapter.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ class BrowserMultiColumnAdapter(
102102
inflate(R.layout.browser_column_cell).apply {
103103
columnViews.add(this as TextView)
104104
}
105-
106-
if (index <= value) {
107-
inflate(R.layout.browser_column_divider)
108-
}
109105
}
110106

111107
columnViews.forEach { it.setupTextSize() }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:color="?attr/colorControlHighlight">
4+
<item android:id="@android:id/mask">
5+
<shape android:shape="rectangle">
6+
<solid android:color="@android:color/white" />
7+
</shape>
8+
</item>
9+
10+
<item android:gravity="bottom">
11+
<shape android:shape="rectangle">
12+
<size android:height="1dp" />
13+
<solid android:color="?attr/cardBrowserDivider" />
14+
</shape>
15+
</item>
16+
</ripple>

AnkiDroid/src/main/res/layout/browser_column_cell.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
android:layout_width="0dp"
1919
android:layout_height="match_parent"
2020
android:layout_weight="1"
21-
android:paddingStart="4dp"
21+
android:paddingStart="8dp"
2222
android:paddingVertical="1dp"
2323
android:layout_gravity="top"
2424
/>

AnkiDroid/src/main/res/layout/browser_column_divider.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

AnkiDroid/src/main/res/layout/browser_column_heading.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
<com.ichi2.ui.FixedTextView xmlns:android="http://schemas.android.com/apk/res/android"
1818
android:layout_width="0dp"
1919
android:layout_height="match_parent"
20+
android:minHeight="?minTouchTargetSize"
2021
android:layout_weight="1"
2122
android:textFontWeight="700"
22-
android:paddingStart="4dp"
23+
android:paddingStart="8dp"
2324
android:textAppearance="@style/TextAppearance.AppCompat.Widget.TextView.SpinnerItem"
24-
android:layout_gravity="center_vertical"
25+
android:gravity="center_vertical"
2526
/>

AnkiDroid/src/main/res/layout/card_browser.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<LinearLayout
1919
android:id="@+id/browser_column_headings"
2020
android:layout_width="match_parent"
21-
android:background="?attr/selectableItemBackground"
21+
android:background="@drawable/browser_heading_bottom_divider"
2222
android:orientation="horizontal"
2323
android:paddingVertical="2dp"
2424
android:layout_height="wrap_content"

0 commit comments

Comments
 (0)