Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Card Analysis Widget for more clean look. #17986

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AnkiDroid/src/main/res/layout/widget_card_analysis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:layout_height="wrap_content"
android:background="@drawable/widget_card_analysis_rounded_inner_background"
android:orientation="horizontal"
android:padding="20dp">
android:padding="16dp">

<TextView
android:id="@+id/deckNew_card_analysis_widget"
Expand Down Expand Up @@ -67,9 +67,9 @@
android:id="@+id/deckNameCardAnalysis"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="70dp"
android:layout_marginTop="64dp"
android:gravity="center"
android:padding="20dp"
android:padding="15dp"
android:paddingBottom="5dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="24sp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:layout_height="wrap_content"
android:background="@drawable/widget_card_analysis_rounded_inner_background"
android:orientation="horizontal"
android:padding="20dp">
android:padding="16dp">

<TextView
android:layout_width="0dp"
Expand Down Expand Up @@ -52,7 +52,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="20dp"
android:padding="15dp"
android:paddingBottom="5dp"
android:text="@string/deck1Name_deck_picker_widget"
android:textColor="?android:attr/textColorPrimary"
Expand Down
4 changes: 2 additions & 2 deletions AnkiDroid/src/main/res/xml/widget_provider_card_analysis.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- JPG type of file used in previewImage property because the SVG format is not supported on all devices.
<!-- JPG type of file used in previewImage property because the SVG and Vector format is not supported on all devices.
The widths and heights parameters are determined as follows:
The default is 3 cells in width and 2 in height.
The default size is 3 cells wide and 2 cells high, but the grid layout typically determines the final dimensions.
Following https://developer.android.com/develop/ui/views/appwidgets/layouts#anatomy_determining_size
we used the portrait mode cell size for the width and the landscape mode cell size for the height. Leading to:
* height between 102 and 315
Expand Down
Loading