android: Fix color of lists and buttons on older platforms

This adds a workaround for an issue on older platforms where the list is
not properly styled with colorAccent.  Similarly applies to borderless buttons.
This commit is contained in:
Tobias Brunner
2016-04-27 14:24:27 +02:00
parent 2a68938b2e
commit 90172b66c4
3 changed files with 34 additions and 0 deletions
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 Tobias Brunner
HSR Hochschule fuer Technik Rapperswil
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_pressed="true"
android:drawable="@color/pressed" />
<item
android:state_activated="true"
android:drawable="@color/accent" />
<item
android:drawable="@android:color/transparent" />
</selector>
@@ -16,6 +16,8 @@
<resources>
<style name="ApplicationTheme" parent="ApplicationTheme.Base">
<item name="android:activatedBackgroundIndicator">@drawable/activated_background</item>
<item name="android:selectableItemBackground">@drawable/activated_background</item>
</style>
<style name="AlertDialogTheme" parent="AlertDialogTheme.Base">
@@ -39,4 +39,7 @@
<color
name="panel_separator">#5a5a5a</color>
<color
name="pressed">#5a5a5a</color>
</resources>