Skip to content
Snippets Groups Projects
Unverified Commit 94b786d9 authored by Simon Robinson's avatar Simon Robinson
Browse files

Use AppCompat button background resource rather than platform one

Fixes crash when using MediaButton style on pre-v21 devices
parent eeeec087
No related branches found
Tags v1.6.3
No related merge requests found
......@@ -6,8 +6,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 29
versionCode 18
versionName '1.6.2'
versionCode 19
versionName '1.6.3'
}
buildTypes {
......@@ -24,6 +24,6 @@ dependencies {
implementation "androidx.appcompat:appcompat:$appcompat_version"
// implementation "androidx.appcompat:appcompat-resources:$appcompat_version" // not needed for our use-case
implementation 'androidx.exifinterface:exifinterface:1.2.0'
implementation 'androidx.core:core:1.3.1' // for ContextCompat, ViewCompat and BlendModeColorFilterCompat
implementation 'androidx.exifinterface:exifinterface:1.3.0' // for detecting image orientation
implementation 'androidx.core:core:1.3.2' // for ContextCompat, ViewCompat and BlendModeColorFilterCompat
}
......@@ -4,7 +4,10 @@
<!-- based on @android:style/MediaButton, but without the @null background -->
<style name="MediaButton">
<!-- note: selectableItemBackground also works for the play/pause button, but borderless appearance is better -->
<item name="android:background">?android:selectableItemBackgroundBorderless</item>
<!-- TODO: must be very careful of ?android:attr/selectableItemBackgroundBorderless (native, API 21+) vs. -->
<!-- TODO: ?attr/selectableItemBackgroundBorderless (Appcompat, API 7+) - see: https://stackoverflow.com/a/41871126/ -->
<!-- TODO: for all new additions, need to test between versions -->
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
<item name="android:layout_width">71dip</item>
<item name="android:layout_height">52dip</item>
</style>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment