Skip to content

Commit d2df887

Browse files
committed
Fix: Card Browser Border and Header Height.
1 parent b0d7b48 commit d2df887

File tree

5 files changed

+31
-7
lines changed

5 files changed

+31
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class BrowserMultiColumnAdapter(
103103
columnViews.add(this as TextView)
104104
}
105105

106-
if (index <= value) {
106+
if (index < value) {
107107
inflate(R.layout.browser_column_divider)
108108
}
109109
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item>
4+
<shape android:shape="rectangle">
5+
<solid android:color="@android:color/transparent" />
6+
</shape>
7+
</item>
8+
9+
<item android:gravity="bottom">
10+
<shape android:shape="rectangle">
11+
<size android:height="1dp" />
12+
<solid android:color="?attr/cardBrowserDivider" />
13+
</shape>
14+
</item>
15+
</layer-list>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<!-- 0.5 appears badly aliased on Emulators -->
5+
<size android:height="20dp" android:width="0.6dp"/>
6+
<solid android:color="?attr/cardBrowserDivider" />
7+
</shape>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616

1717
<com.ichi2.ui.FixedTextView xmlns:android="http://schemas.android.com/apk/res/android"
1818
android:layout_width="0dp"
19-
android:layout_height="match_parent"
19+
android:layout_height="48dp"
2020
android:layout_weight="1"
2121
android:textFontWeight="700"
2222
android:paddingStart="4dp"
2323
android:textAppearance="@style/TextAppearance.AppCompat.Widget.TextView.SpinnerItem"
24-
android:layout_gravity="center_vertical"
24+
android:layout_gravity="center"
25+
android:gravity="center"
2526
/>

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
<LinearLayout
1919
android:id="@+id/browser_column_headings"
2020
android:layout_width="match_parent"
21-
android:background="?attr/selectableItemBackground"
21+
android:layout_height="wrap_content"
22+
android:background="@drawable/browser_heading_bottom_divider"
2223
android:orientation="horizontal"
2324
android:paddingVertical="2dp"
24-
android:layout_height="wrap_content"
25-
android:longClickable="true">
26-
25+
android:longClickable="true"
26+
android:divider="@drawable/browser_heading_divider"
27+
android:showDividers="middle">
2728
</LinearLayout>
2829

2930
<com.google.android.material.progressindicator.LinearProgressIndicator

0 commit comments

Comments
 (0)