Browse Source

SwipeRefreshLayout: use a lighter color on dark theme

merge-requests/1535/head
Nicolas Pomepuy 4 years ago
parent
commit
60931c47bc
  1. 1
      application/resources/src/main/res/values/attrs.xml
  2. 2
      application/vlc-android/res/values/styles.xml
  3. 2
      application/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt

1
application/resources/src/main/res/values/attrs.xml

@ -78,6 +78,7 @@
<attr name="tips_item_background" format="color" />
<attr name="about_text_primary" format="color" />
<attr name="widget_preview_rounded_bg" format="reference" />
<attr name="swipe_refresh_background" format="reference|color" />
<!--Main Icons-->
<attr name="gridview_progressbar" format="reference" />

2
application/vlc-android/res/values/styles.xml

@ -72,6 +72,7 @@
<item name="fast_scroller_bubble">@drawable/fastscroller_bubble</item>
<item name="fast_scroller_handle">@drawable/fastscroller_handle</item>
<item name="primary_focus">@color/orange_800_transparent_20</item>
<item name="swipe_refresh_background">?attr/background_default</item>
<item name="gridview_progressbar">@drawable/gridview_progressbar</item>
<item name="progress_mini_player">@drawable/progress_mini_player</item>
@ -219,6 +220,7 @@
<item name="fast_scroller_bubble">@drawable/fastscroller_bubble_black</item>
<item name="fast_scroller_handle">@drawable/fastscroller_handle_black</item>
<item name="primary_focus">@color/orange_500_transparent_20</item>
<item name="swipe_refresh_background">?attr/background_default_darker</item>
<item name="gridview_progressbar">@drawable/gridview_progressbar_w</item>
<item name="progress_mini_player">@drawable/progress_mini_player_black</item>

2
application/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt

@ -56,7 +56,7 @@ abstract class BaseFragment : Fragment(), ActionMode.Callback {
super.onViewCreated(view, savedInstanceState)
view.findViewById<SwipeRefreshLayout>(R.id.swipeLayout)?.let {
swipeRefreshLayout = it
val a: TypedArray = requireActivity().obtainStyledAttributes(TypedValue().data, intArrayOf(R.attr.colorPrimary, R.attr.background_default))
val a: TypedArray = requireActivity().obtainStyledAttributes(TypedValue().data, intArrayOf(R.attr.colorPrimary, R.attr.swipe_refresh_background))
val color = a.getColor(0, 0)
val bColor = a.getColor(1, Color.WHITE)
a.recycle()

Loading…
Cancel
Save