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

Use a popup theme to style the picker on Android #16103

Merged
merged 4 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions android/app/src/main/res/drawable/picker_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/card_highlight_bg" />
<corners android:radius="12dp" />
</shape>
redstar504 marked this conversation as resolved.
Show resolved Hide resolved
Binary file added android/app/src/main/res/font/expneuebold.otf
Binary file not shown.
1 change: 1 addition & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
<color name="accent">#03D47C</color>
<color name="dark">#0b1b34</color>
<color name="gray4">#7D8B8F</color>
<color name="card_highlight_bg">#07271F</color>
</resources>
15 changes: 15 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<item name="android:statusBarColor">#061B09</item>
<item name="colorAccent">@color/accent</item>
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="popupTheme">@style/AppTheme.Popup</item>
<item name="android:spinnerDropDownItemStyle">@style/TextViewSpinnerDropDownItem</item>
</style>

<!-- Themes unique to the boot splash page -->
Expand All @@ -18,4 +20,17 @@
<item name="android:fitsSystemWindows">true</item>
</style>

<!-- Themes used by the Picker -->
<style name="AppTheme.Popup" parent="Base.ThemeOverlay.AppCompat">
<item name="colorBackgroundFloating">@null</item>
<item name="android:background">@drawable/picker_background</item>
<item name="android:textColor">@color/white</item>
</style>

<style name="TextViewSpinnerDropDownItem" parent="Widget.AppCompat.DropDownItem.Spinner">
<item name="android:textColor">@color/white</item>
<item name="android:textSize">16dp</item>
<item name="android:fontFamily">@font/expneuebold</item>
</style>

</resources>