Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mediautilities
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Gummi
mediautilities
Commits
94b786d9
Unverified
Commit
94b786d9
authored
4 years ago
by
Simon Robinson
Browse files
Options
Downloads
Patches
Plain Diff
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
Branches containing commit
Tags
v1.6.3
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MediaUtilities/build.gradle
+4
-4
4 additions, 4 deletions
MediaUtilities/build.gradle
MediaUtilities/src/main/res/values/styles.xml
+4
-1
4 additions, 1 deletion
MediaUtilities/src/main/res/values/styles.xml
with
8 additions
and
5 deletions
MediaUtilities/build.gradle
+
4
−
4
View file @
94b786d9
...
...
@@ -6,8 +6,8 @@ android {
defaultConfig
{
minSdkVersion
14
targetSdkVersion
29
versionCode
1
8
versionName
'1.6.
2
'
versionCode
1
9
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
}
This diff is collapsed.
Click to expand it.
MediaUtilities/src/main/res/values/styles.xml
+
4
−
1
View file @
94b786d9
...
...
@@ -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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment