Merge remote-tracking branch 'origin/dev' into dev-alpha
# Conflicts: # app/build.gradle # app/src/main/assets/contributors.json # build.gradle
This commit is contained in:
commit
6c0f1941af
41 changed files with 333 additions and 305 deletions
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
* text=auto eol=lf
|
||||||
|
|
||||||
|
*.bat text eol=crlf
|
||||||
|
*.jar binary
|
44
.github/workflows/android.yml
vendored
44
.github/workflows/android.yml
vendored
|
@ -7,28 +7,28 @@ on:
|
||||||
branches: [ dev ]
|
branches: [ dev ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
check:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: set up JDK 11
|
- uses: gradle/wrapper-validation-action@v1
|
||||||
uses: actions/setup-java@v2
|
- uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
distribution: 'zulu'
|
||||||
distribution: 'temurin'
|
java-version: 17
|
||||||
cache: gradle
|
- uses: gradle/gradle-build-action@v2
|
||||||
|
- name: Lint Android
|
||||||
|
run: ./gradlew lint
|
||||||
|
|
||||||
- name: Generate temporary keystore
|
build:
|
||||||
run: keytool -genkey -v -storetype pkcs12 -keystore store.p12 -storepass android -alias android -keyalg RSA -keysize 2048 -validity 10000 -dname CN=CI
|
runs-on: ubuntu-latest
|
||||||
- name: Write retro.properties
|
steps:
|
||||||
run: |
|
- uses: actions/checkout@v3
|
||||||
cat >retro.properties <<EOF
|
- uses: actions/setup-java@v3
|
||||||
storeFile=$PWD/store.p12
|
with:
|
||||||
keyAlias=android
|
java-version: '17'
|
||||||
storePassword=android
|
distribution: 'zulu'
|
||||||
keyPassword=android
|
- uses: gradle/gradle-build-action@v2
|
||||||
EOF
|
- name: Build
|
||||||
- name: Build with Gradle
|
run: ./gradlew app:assemble
|
||||||
run: ./gradlew build
|
|
||||||
|
|
276
README.md
276
README.md
|
@ -1,138 +1,138 @@
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://retromusic.app">
|
<a href="https://retromusic.app">
|
||||||
<img src="app\src\main\ic_launcher-web.png" height="128">
|
<img src="app\src\main\ic_launcher-web.png" height="128">
|
||||||
<h1 align="center">Retro Music Player 🎵</h1>
|
<h1 align="center">Retro Music Player 🎵</h1>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/RetroMusicPlayer/RetroMusicPlayer" style="text-decoration:none" area-label="Android">
|
<a href="https://github.com/RetroMusicPlayer/RetroMusicPlayer" style="text-decoration:none" area-label="Android">
|
||||||
<img src="https://img.shields.io/badge/Platform-Android-green.svg">
|
<img src="https://img.shields.io/badge/Platform-Android-green.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/RetroMusicPlayer/RetroMusicPlayer/actions/workflows/android.yml" style="text-decoration:none" area-label="Build Status">
|
<a href="https://github.com/RetroMusicPlayer/RetroMusicPlayer/actions/workflows/android.yml" style="text-decoration:none" area-label="Build Status">
|
||||||
<img src="https://github.com/RetroMusicPlayer/RetroMusicPlayer/actions/workflows/android.yml/badge.svg">
|
<img src="https://github.com/RetroMusicPlayer/RetroMusicPlayer/actions/workflows/android.yml/badge.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/RetroMusicPlayer/RetroMusicPlayer" style="text-decoration:none" area-label="Min API: 21">
|
<a href="https://github.com/RetroMusicPlayer/RetroMusicPlayer" style="text-decoration:none" area-label="Min API: 21">
|
||||||
<img src="https://img.shields.io/badge/minSdkVersion-21-green.svg">
|
<img src="https://img.shields.io/badge/minSdkVersion-21-green.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://play.google.com/store/apps/details?id=code.name.monkey.retromusic" style="text-decoration:none" area-label="Play Store">
|
<a href="https://play.google.com/store/apps/details?id=code.name.monkey.retromusic" style="text-decoration:none" area-label="Play Store">
|
||||||
<img src="https://img.shields.io/badge/Download-Google_Play-green.svg">
|
<img src="https://img.shields.io/badge/Download-Google_Play-green.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/RetroMusicPlayer/RetroMusicPlayer/blob/master/LICENSE.md" style="text-decoration:none" area-label="License: GPL v3">
|
<a href="https://github.com/RetroMusicPlayer/RetroMusicPlayer/blob/master/LICENSE.md" style="text-decoration:none" area-label="License: GPL v3">
|
||||||
<img src="https://img.shields.io/badge/License-GPL%20v3-blue.svg">
|
<img src="https://img.shields.io/badge/License-GPL%20v3-blue.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://twitter.com/retromusicapp" style="text-decoration:none" area-label="Twitter Follow">
|
<a href="https://twitter.com/retromusicapp" style="text-decoration:none" area-label="Twitter Follow">
|
||||||
<img src="https://img.shields.io/twitter/follow/retromusicapp?style=social">
|
<img src="https://img.shields.io/twitter/follow/retromusicapp?style=social">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://crowdin.com/project/retromusicplayer" style="text-decoration:none" area-label="Crowdin">
|
<a href="https://crowdin.com/project/retromusicplayer" style="text-decoration:none" area-label="Crowdin">
|
||||||
<img src="https://badges.crowdin.net/retromusicplayer/localized.svg">
|
<img src="https://badges.crowdin.net/retromusicplayer/localized.svg">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
## 🆕 Material You Design Music Player for Android music lovers
|
## 🆕 Material You Design Music Player for Android music lovers
|
||||||
|
|
||||||
## ⚠ Join [@retromusiclog](https://telegram.me/retromusiclog) on Telegram for important updates.
|
## ⚠ Join [@retromusiclog](https://telegram.me/retromusiclog) on Telegram for important updates.
|
||||||
___
|
___
|
||||||
|
|
||||||
## 📱 Screenshots
|
## 📱 Screenshots
|
||||||
### App Themes
|
### App Themes
|
||||||
| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg" width="200"/> | <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg" width="200"/> | <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/4.jpg" width="200"/> |
|
| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg" width="200"/> | <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/3.jpg" width="200"/> | <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/4.jpg" width="200"/> |
|
||||||
|:---:|:---:|:---:|
|
|:---:|:---:|:---:|
|
||||||
|Clearly white| Kinda dark | Just black|
|
|Clearly white| Kinda dark | Just black|
|
||||||
|
|
||||||
### Player screen
|
### Player screen
|
||||||
| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg" width="200"/>| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/5.jpg" width="200"/>| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg" width="200"/>| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/7.jpg" width="200"/>| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/8.jpg" width="200"/>|
|
| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg" width="200"/>| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/5.jpg" width="200"/>| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/6.jpg" width="200"/>| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/7.jpg" width="200"/>| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/8.jpg" width="200"/>|
|
||||||
|:---:|:---:|:---:|:---:|:---:|
|
|:---:|:---:|:---:|:---:|:---:|
|
||||||
| Home | Songs | Albums | Artists | Settings |
|
| Home | Songs | Albums | Artists | Settings |
|
||||||
|
|
||||||
### Synced lyrics screen (Over Cover)
|
### Synced lyrics screen (Over Cover)
|
||||||
| <img src="screenshots/synced_over_light.jpg" width="200"/>| <img src="screenshots/synced_over_dark.jpg" width="200"/>| <img src="screenshots/synced_over_black.jpg" width="200"/>|
|
| <img src="screenshots/synced_over_light.jpg" width="200"/>| <img src="screenshots/synced_over_dark.jpg" width="200"/>| <img src="screenshots/synced_over_black.jpg" width="200"/>|
|
||||||
|:---:|:---:|:---:|
|
|:---:|:---:|:---:|
|
||||||
| Synced Over Cover light | Synced Over Cover dark | Synced Over Cover black |
|
| Synced Over Cover light | Synced Over Cover dark | Synced Over Cover black |
|
||||||
|
|
||||||
### Synced lyrics screen (Replace Cover)
|
### Synced lyrics screen (Replace Cover)
|
||||||
| <img src="screenshots/synced_replace_light.jpg" width="200"/>| <img src="screenshots/synced_replace_dark.jpg" width="200"/>| <img src="screenshots/synced_replace_black.jpg" width="200"/>|
|
| <img src="screenshots/synced_replace_light.jpg" width="200"/>| <img src="screenshots/synced_replace_dark.jpg" width="200"/>| <img src="screenshots/synced_replace_black.jpg" width="200"/>|
|
||||||
|:---:|:---:|:---:|
|
|:---:|:---:|:---:|
|
||||||
| Synced Replace Cover light | Synced Replace Cover dark | Synced Replace Cover black |
|
| Synced Replace Cover light | Synced Replace Cover dark | Synced Replace Cover black |
|
||||||
|
|
||||||
### 10+ Now playing themes
|
### 10+ Now playing themes
|
||||||
| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg" width="200"/> |<img src="screenshots/fit.jpg" width="200"/>| <img src="screenshots/flat.jpg" width="200"/> | <img src="screenshots/color.jpg" width="200"/> | <img src="screenshots/material.jpg" width="200"/> |
|
| <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg" width="200"/> |<img src="screenshots/fit.jpg" width="200"/>| <img src="screenshots/flat.jpg" width="200"/> | <img src="screenshots/color.jpg" width="200"/> | <img src="screenshots/material.jpg" width="200"/> |
|
||||||
|:-----: |:-----: |:-----: |:-----: |:-----: |
|
|:-----: |:-----: |:-----: |:-----: |:-----: |
|
||||||
| Normal | Fit | Flat | Color | Material |
|
| Normal | Fit | Flat | Color | Material |
|
||||||
|
|
||||||
| <img src="screenshots/classic.jpg" width="200"/> |<img src="screenshots/adaptive.jpg" width="200"/>| <img src="screenshots/blur.jpg" width="200"/> | <img src="screenshots/tiny.jpg" width="200"/> | <img src="screenshots/peek.jpg" width="200"/> |
|
| <img src="screenshots/classic.jpg" width="200"/> |<img src="screenshots/adaptive.jpg" width="200"/>| <img src="screenshots/blur.jpg" width="200"/> | <img src="screenshots/tiny.jpg" width="200"/> | <img src="screenshots/peek.jpg" width="200"/> |
|
||||||
|:-----: |:-----: |:-----: |:-----: |:-----: |
|
|:-----: |:-----: |:-----: |:-----: |:-----: |
|
||||||
| Classic | Adaptive | Blur | Tiny | Peek |
|
| Classic | Adaptive | Blur | Tiny | Peek |
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
## 🧭 Navigation never made easier
|
## 🧭 Navigation never made easier
|
||||||
Self-explanatory interface without overloaded menus.
|
Self-explanatory interface without overloaded menus.
|
||||||
|
|
||||||
## 🎨 Colorful
|
## 🎨 Colorful
|
||||||
You can choose between three different main themes: Clearly White, Kinda
|
You can choose between three different main themes: Clearly White, Kinda
|
||||||
Dark and Just Black for AMOLED displays. Select your favorite accent
|
Dark and Just Black for AMOLED displays. Select your favorite accent
|
||||||
color from a color palette.
|
color from a color palette.
|
||||||
|
|
||||||
## 🏠 Home
|
## 🏠 Home
|
||||||
Where you can view your recently/top played artists, albums and
|
Where you can view your recently/top played artists, albums and
|
||||||
favorite songs. No other music player has this feature.
|
favorite songs. No other music player has this feature.
|
||||||
|
|
||||||
## 📦 Included Features
|
## 📦 Included Features
|
||||||
- Base 3 themes (Clearly White, Kinda Dark and Just Black)
|
- Base 3 themes (Clearly White, Kinda Dark and Just Black)
|
||||||
- Chromecast support
|
- Chromecast support
|
||||||
- Choose from 10+ now playing themes
|
- Choose from 10+ now playing themes
|
||||||
- Driving Mode
|
- Driving Mode
|
||||||
- Headset/Bluetooth support
|
- Headset/Bluetooth support
|
||||||
- Music duration filter
|
- Music duration filter
|
||||||
- Android auto support
|
- Android auto support
|
||||||
- Wallpaper accent picker on Android 8.1+
|
- Wallpaper accent picker on Android 8.1+
|
||||||
- Material You support on Android 12+
|
- Material You support on Android 12+
|
||||||
- Monet themed icon support on Android 13+
|
- Monet themed icon support on Android 13+
|
||||||
- Folder support - Play songs by folder
|
- Folder support - Play songs by folder
|
||||||
- Gapless playback
|
- Gapless playback
|
||||||
- Volume controls
|
- Volume controls
|
||||||
- Carousel effect for album covers
|
- Carousel effect for album covers
|
||||||
- Home screen widgets
|
- Home screen widgets
|
||||||
- Lock screen playback controls
|
- Lock screen playback controls
|
||||||
- Lyrics screen (download and sync with music)
|
- Lyrics screen (download and sync with music)
|
||||||
- Sleep timer
|
- Sleep timer
|
||||||
- Easy drag to sort playlist & play queue
|
- Easy drag to sort playlist & play queue
|
||||||
- Tag editor
|
- Tag editor
|
||||||
- Create, edit and import playlists
|
- Create, edit and import playlists
|
||||||
- Playing queue with reorder
|
- Playing queue with reorder
|
||||||
- User profile
|
- User profile
|
||||||
- 30+ languages support (help translate the project: [Crowdin](https://crowdin.com/project/retromusicplayer)
|
- 30+ languages support (help translate the project: [Crowdin](https://crowdin.com/project/retromusicplayer)
|
||||||
- Browse and play your music by songs, albums, artists, playlists and
|
- Browse and play your music by songs, albums, artists, playlists and
|
||||||
genre
|
genre
|
||||||
- Smart Auto Playlists - Recently played, most played and history
|
- Smart Auto Playlists - Recently played, most played and history
|
||||||
- Build your playlist on the go
|
- Build your playlist on the go
|
||||||
|
|
||||||
We are trying our best to bring you the best user experience. The app is regularly being updated for bug fixes and new features.
|
We are trying our best to bring you the best user experience. The app is regularly being updated for bug fixes and new features.
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
|
|
||||||
## ❓ FAQ
|
## ❓ FAQ
|
||||||
Please read the FAQ [here](https://retromusic.app/faq.html)
|
Please read the FAQ [here](https://retromusic.app/faq.html)
|
||||||
|
|
||||||
In any case, you find or notice any bugs please report them by creating an issue or by contacting us in the [Telegram help & feedback group](https://t.me/retromusicapp).
|
In any case, you find or notice any bugs please report them by creating an issue or by contacting us in the [Telegram help & feedback group](https://t.me/retromusicapp).
|
||||||
If you have any feature suggestions, please create an issue with detailed information or by contacting us in the [Telegram suggestions group](https://t.me/retro_music_suggestion).
|
If you have any feature suggestions, please create an issue with detailed information or by contacting us in the [Telegram suggestions group](https://t.me/retro_music_suggestion).
|
||||||
|
|
||||||
## 🔗 Social links
|
## 🔗 Social links
|
||||||
**Telegram:** https://t.me/retromusicapp <br>
|
**Telegram:** https://t.me/retromusicapp <br>
|
||||||
**Instagram:** https://instagram.com/retromusicapp <br>
|
**Instagram:** https://instagram.com/retromusicapp <br>
|
||||||
**Crowdin**: https://crowdin.com/project/retromusicplayer <br>
|
**Crowdin**: https://crowdin.com/project/retromusicplayer <br>
|
||||||
**Pinterest:** https://pinterest.com/retromusicapp <br>
|
**Pinterest:** https://pinterest.com/retromusicapp <br>
|
||||||
**Twitter:** https://twitter.com/retromusicapp <br>
|
**Twitter:** https://twitter.com/retromusicapp <br>
|
||||||
|
|
||||||
## 🗂️ License
|
## 🗂️ License
|
||||||
|
|
||||||
Retro Music Player is released under the GNU General Public License v3.0
|
Retro Music Player is released under the GNU General Public License v3.0
|
||||||
(GPLv3), which can be found [here](LICENSE.md)
|
(GPLv3), which can be found [here](LICENSE.md)
|
||||||
|
|
||||||
|
|
||||||
>Please note: Retro Music Player is an offline music player app. It
|
>Please note: Retro Music Player is a local music player app. It
|
||||||
>doesn't support music downloading or online music streaming.
|
>doesn't support music downloading or online music streaming.
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
|
apply plugin: 'com.google.devtools.ksp'
|
||||||
apply plugin: "androidx.navigation.safeargs.kotlin"
|
apply plugin: "androidx.navigation.safeargs.kotlin"
|
||||||
apply plugin: 'kotlin-parcelize'
|
apply plugin: 'kotlin-parcelize'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk 32
|
compileSdk 32
|
||||||
|
namespace "code.name.monkey.retromusic"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 21
|
minSdk 21
|
||||||
|
@ -13,29 +15,33 @@ android {
|
||||||
|
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
applicationId "code.name.monkey.retromusic"
|
applicationId namespace
|
||||||
versionCode 10598
|
versionCode 10597
|
||||||
versionName '6.0.3-beta'
|
versionName '6.0.2-beta'
|
||||||
|
|
||||||
buildConfigField("String", "GOOGLE_PLAY_LICENSING_KEY", "\"${getProperty(getProperties('../public.properties'), 'GOOGLE_PLAY_LICENSE_KEY')}\"")
|
buildConfigField("String", "GOOGLE_PLAY_LICENSING_KEY", "\"${getProperty(getProperties('../public.properties'), 'GOOGLE_PLAY_LICENSE_KEY')}\"")
|
||||||
}
|
}
|
||||||
signingConfigs {
|
def signingProperties = getProperties('retro.properties')
|
||||||
release {
|
def releaseSigning
|
||||||
Properties properties = getProperties('retro.properties')
|
if (signingProperties != null) {
|
||||||
storeFile file(getProperty(properties, 'storeFile'))
|
releaseSigning = signingConfigs.create("release") {
|
||||||
keyAlias getProperty(properties, 'keyAlias')
|
storeFile file(getProperty(signingProperties, 'storeFile'))
|
||||||
storePassword getProperty(properties, 'storePassword')
|
keyAlias getProperty(signingProperties, 'keyAlias')
|
||||||
keyPassword getProperty(properties, 'keyPassword')
|
storePassword getProperty(signingProperties, 'storePassword')
|
||||||
|
keyPassword getProperty(signingProperties, 'keyPassword')
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
releaseSigning = signingConfigs.debug
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
signingConfig signingConfigs.release
|
signingConfig releaseSigning
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
|
signingConfig releaseSigning
|
||||||
applicationIdSuffix '.debug'
|
applicationIdSuffix '.debug'
|
||||||
versionNameSuffix ' DEBUG'
|
versionNameSuffix ' DEBUG'
|
||||||
}
|
}
|
||||||
|
@ -50,7 +56,7 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures{
|
buildFeatures {
|
||||||
viewBinding true
|
viewBinding true
|
||||||
}
|
}
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
|
@ -59,6 +65,7 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lint {
|
lint {
|
||||||
|
abortOnError true
|
||||||
warning 'ImpliedQuantity', 'Instantiatable', 'MissingQuantity', 'MissingTranslation'
|
warning 'ImpliedQuantity', 'Instantiatable', 'MissingQuantity', 'MissingTranslation'
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
@ -68,23 +75,28 @@ android {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "1.8"
|
jvmTarget = "1.8"
|
||||||
}
|
}
|
||||||
|
dependenciesInfo {
|
||||||
|
includeInApk = false
|
||||||
|
includeInBundle = false
|
||||||
|
}
|
||||||
configurations.all {
|
configurations.all {
|
||||||
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
|
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def getProperties(String fileName) {
|
def getProperties(String fileName) {
|
||||||
final Properties properties = new Properties()
|
Properties properties = new Properties()
|
||||||
def file = rootProject.file(fileName)
|
def file = rootProject.file(fileName)
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
file.withInputStream { stream -> properties.load(stream) }
|
file.withInputStream { stream -> properties.load(stream) }
|
||||||
|
} else {
|
||||||
|
properties = null
|
||||||
}
|
}
|
||||||
return properties
|
return properties
|
||||||
}
|
}
|
||||||
|
|
||||||
static def getProperty(Properties properties, String name) {
|
static def getProperty(Properties properties, String name) {
|
||||||
return properties.getProperty(name) ?: "$name missing"
|
return properties?.getProperty(name) ?: "$name missing"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -94,12 +106,12 @@ dependencies {
|
||||||
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
||||||
implementation 'androidx.annotation:annotation:1.4.0'
|
implementation 'androidx.annotation:annotation:1.4.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.3.0-beta01'
|
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||||
implementation "androidx.preference:preference-ktx:$preference_version"
|
implementation "androidx.preference:preference-ktx:$preference_version"
|
||||||
implementation "androidx.core:core-ktx:$core_version"
|
implementation "androidx.core:core-ktx:$core_version"
|
||||||
implementation 'androidx.palette:palette-ktx:1.0.0'
|
implementation 'androidx.palette:palette-ktx:1.0.0'
|
||||||
|
|
||||||
implementation 'androidx.mediarouter:mediarouter:1.3.1'
|
implementation 'androidx.mediarouter:mediarouter:1.3.0'
|
||||||
//Cast Dependencies
|
//Cast Dependencies
|
||||||
normalImplementation 'com.google.android.gms:play-services-cast-framework:21.0.1'
|
normalImplementation 'com.google.android.gms:play-services-cast-framework:21.0.1'
|
||||||
//WebServer by NanoHttpd
|
//WebServer by NanoHttpd
|
||||||
|
@ -112,13 +124,13 @@ dependencies {
|
||||||
def room_version = '2.5.0-alpha02'
|
def room_version = '2.5.0-alpha02'
|
||||||
implementation "androidx.room:room-runtime:$room_version"
|
implementation "androidx.room:room-runtime:$room_version"
|
||||||
implementation "androidx.room:room-ktx:$room_version"
|
implementation "androidx.room:room-ktx:$room_version"
|
||||||
kapt "androidx.room:room-compiler:$room_version"
|
ksp "androidx.room:room-compiler:$room_version"
|
||||||
|
|
||||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
|
||||||
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
|
||||||
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
|
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
|
||||||
|
|
||||||
implementation "androidx.core:core-splashscreen:1.0.0"
|
implementation "androidx.core:core-splashscreen:1.0.0-rc01"
|
||||||
|
|
||||||
normalImplementation 'com.google.android.play:feature-delivery:2.0.0'
|
normalImplementation 'com.google.android.play:feature-delivery:2.0.0'
|
||||||
normalImplementation 'com.google.android.play:review:2.0.0'
|
normalImplementation 'com.google.android.play:review:2.0.0'
|
||||||
|
@ -135,11 +147,9 @@ dependencies {
|
||||||
implementation "com.afollestad.material-dialogs:input:$material_dialog_version"
|
implementation "com.afollestad.material-dialogs:input:$material_dialog_version"
|
||||||
implementation "com.afollestad.material-dialogs:color:$material_dialog_version"
|
implementation "com.afollestad.material-dialogs:color:$material_dialog_version"
|
||||||
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
implementation 'com.afollestad:material-cab:2.0.1'
|
||||||
|
|
||||||
def kotlin_coroutines_version = '1.6.4'
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
|
|
||||||
|
|
||||||
def koin_version = '3.2.0'
|
def koin_version = '3.2.0'
|
||||||
implementation "io.insert-koin:koin-core:$koin_version"
|
implementation "io.insert-koin:koin-core:$koin_version"
|
||||||
|
@ -159,6 +169,7 @@ dependencies {
|
||||||
|
|
||||||
implementation "dev.chrisbanes.insetter:insetter:0.6.1"
|
implementation "dev.chrisbanes.insetter:insetter:0.6.1"
|
||||||
|
|
||||||
|
implementation 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5'
|
||||||
implementation 'com.github.Adonai:jaudiotagger:2.3.15'
|
implementation 'com.github.Adonai:jaudiotagger:2.3.15'
|
||||||
normalImplementation 'com.anjlab.android.iab.v3:library:2.0.3'
|
normalImplementation 'com.anjlab.android.iab.v3:library:2.0.3'
|
||||||
implementation 'com.r0adkll:slidableactivity:2.1.0'
|
implementation 'com.r0adkll:slidableactivity:2.1.0'
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
package="code.name.monkey.retromusic">
|
|
||||||
|
|
||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.BLUETOOTH"
|
android:name="android.permission.BLUETOOTH"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
{
|
{
|
||||||
"name": "Milind Goel",
|
"name": "Milind Goel",
|
||||||
"summary": "Support Representative & Moderator",
|
"summary": "Support Representative & Moderator",
|
||||||
"link": "https://milindgoel15.github.io",
|
"link": "https://milindgoel.vercel.app",
|
||||||
"image": "milind.png"
|
"image": "milind.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,7 @@ class App : Application() {
|
||||||
// default theme
|
// default theme
|
||||||
if (!ThemeStore.isConfigured(this, 3)) {
|
if (!ThemeStore.isConfigured(this, 3)) {
|
||||||
ThemeStore.editTheme(this)
|
ThemeStore.editTheme(this)
|
||||||
.accentColorRes(R.color.md_deep_purple_A200)
|
.accentColorRes(code.name.monkey.appthemehelper.R.color.md_deep_purple_A200)
|
||||||
.coloredNavigationBar(true)
|
.coloredNavigationBar(true)
|
||||||
.commit()
|
.commit()
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,17 +18,17 @@ class ErrorActivity : AppCompatActivity() {
|
||||||
private val reportPrefix = "bug_report-"
|
private val reportPrefix = "bug_report-"
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.customactivityoncrash_default_error_activity)
|
setContentView(cat.ereza.customactivityoncrash.R.layout.customactivityoncrash_default_error_activity)
|
||||||
|
|
||||||
val restartButton =
|
val restartButton =
|
||||||
findViewById<Button>(R.id.customactivityoncrash_error_activity_restart_button)
|
findViewById<Button>(cat.ereza.customactivityoncrash.R.id.customactivityoncrash_error_activity_restart_button)
|
||||||
|
|
||||||
val config = CustomActivityOnCrash.getConfigFromIntent(intent)
|
val config = CustomActivityOnCrash.getConfigFromIntent(intent)
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
restartButton.setText(R.string.customactivityoncrash_error_activity_restart_app)
|
restartButton.setText(cat.ereza.customactivityoncrash.R.string.customactivityoncrash_error_activity_restart_app)
|
||||||
restartButton.setOnClickListener {
|
restartButton.setOnClickListener {
|
||||||
CustomActivityOnCrash.restartApplication(
|
CustomActivityOnCrash.restartApplication(
|
||||||
this@ErrorActivity,
|
this@ErrorActivity,
|
||||||
|
@ -36,11 +36,11 @@ class ErrorActivity : AppCompatActivity() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val moreInfoButton =
|
val moreInfoButton =
|
||||||
findViewById<Button>(R.id.customactivityoncrash_error_activity_more_info_button)
|
findViewById<Button>(cat.ereza.customactivityoncrash.R.id.customactivityoncrash_error_activity_more_info_button)
|
||||||
|
|
||||||
moreInfoButton.setOnClickListener { //We retrieve all the error data and show it
|
moreInfoButton.setOnClickListener { //We retrieve all the error data and show it
|
||||||
MaterialAlertDialogBuilder(this@ErrorActivity)
|
MaterialAlertDialogBuilder(this@ErrorActivity)
|
||||||
.setTitle(R.string.customactivityoncrash_error_activity_error_details_title)
|
.setTitle(cat.ereza.customactivityoncrash.R.string.customactivityoncrash_error_activity_error_details_title)
|
||||||
.setMessage(
|
.setMessage(
|
||||||
CustomActivityOnCrash.getAllErrorDetailsFromIntent(
|
CustomActivityOnCrash.getAllErrorDetailsFromIntent(
|
||||||
this@ErrorActivity,
|
this@ErrorActivity,
|
||||||
|
@ -48,7 +48,7 @@ class ErrorActivity : AppCompatActivity() {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.setPositiveButton(
|
.setPositiveButton(
|
||||||
R.string.customactivityoncrash_error_activity_error_details_close,
|
cat.ereza.customactivityoncrash.R.string.customactivityoncrash_error_activity_error_details_close,
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
.setNeutralButton(
|
.setNeutralButton(
|
||||||
|
@ -70,7 +70,7 @@ class ErrorActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
val errorActivityDrawableId = config.errorDrawable
|
val errorActivityDrawableId = config.errorDrawable
|
||||||
val errorImageView =
|
val errorImageView =
|
||||||
findViewById<ImageView>(R.id.customactivityoncrash_error_activity_image)
|
findViewById<ImageView>(cat.ereza.customactivityoncrash.R.id.customactivityoncrash_error_activity_image)
|
||||||
if (errorActivityDrawableId != null) {
|
if (errorActivityDrawableId != null) {
|
||||||
errorImageView.setImageResource(
|
errorImageView.setImageResource(
|
||||||
errorActivityDrawableId
|
errorActivityDrawableId
|
||||||
|
|
|
@ -50,8 +50,8 @@ public class SAFGuideActivity extends IntroActivity {
|
||||||
? R.string.saf_guide_slide1_description_before_o
|
? R.string.saf_guide_slide1_description_before_o
|
||||||
: R.string.saf_guide_slide1_description)
|
: R.string.saf_guide_slide1_description)
|
||||||
.image(R.drawable.saf_guide_1)
|
.image(R.drawable.saf_guide_1)
|
||||||
.background(R.color.md_deep_purple_300)
|
.background(code.name.monkey.appthemehelper.R.color.md_deep_purple_300)
|
||||||
.backgroundDark(R.color.md_deep_purple_400)
|
.backgroundDark(code.name.monkey.appthemehelper.R.color.md_deep_purple_400)
|
||||||
.layout(R.layout.fragment_simple_slide_large_image)
|
.layout(R.layout.fragment_simple_slide_large_image)
|
||||||
.build());
|
.build());
|
||||||
addSlide(
|
addSlide(
|
||||||
|
@ -59,8 +59,8 @@ public class SAFGuideActivity extends IntroActivity {
|
||||||
.title(R.string.saf_guide_slide2_title)
|
.title(R.string.saf_guide_slide2_title)
|
||||||
.description(R.string.saf_guide_slide2_description)
|
.description(R.string.saf_guide_slide2_description)
|
||||||
.image(R.drawable.saf_guide_2)
|
.image(R.drawable.saf_guide_2)
|
||||||
.background(R.color.md_deep_purple_500)
|
.background(code.name.monkey.appthemehelper.R.color.md_deep_purple_500)
|
||||||
.backgroundDark(R.color.md_deep_purple_600)
|
.backgroundDark(code.name.monkey.appthemehelper.R.color.md_deep_purple_600)
|
||||||
.layout(R.layout.fragment_simple_slide_large_image)
|
.layout(R.layout.fragment_simple_slide_large_image)
|
||||||
.build());
|
.build());
|
||||||
addSlide(
|
addSlide(
|
||||||
|
@ -68,8 +68,8 @@ public class SAFGuideActivity extends IntroActivity {
|
||||||
.title(R.string.saf_guide_slide3_title)
|
.title(R.string.saf_guide_slide3_title)
|
||||||
.description(R.string.saf_guide_slide3_description)
|
.description(R.string.saf_guide_slide3_description)
|
||||||
.image(R.drawable.saf_guide_3)
|
.image(R.drawable.saf_guide_3)
|
||||||
.background(R.color.md_deep_purple_700)
|
.background(code.name.monkey.appthemehelper.R.color.md_deep_purple_700)
|
||||||
.backgroundDark(R.color.md_deep_purple_800)
|
.backgroundDark(code.name.monkey.appthemehelper.R.color.md_deep_purple_800)
|
||||||
.layout(R.layout.fragment_simple_slide_large_image)
|
.layout(R.layout.fragment_simple_slide_large_image)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ class SongFileAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadFileImage(file: File, holder: ViewHolder) {
|
private fun loadFileImage(file: File, holder: ViewHolder) {
|
||||||
val iconColor = ATHUtil.resolveColor(activity, R.attr.colorControlNormal)
|
val iconColor = ATHUtil.resolveColor(activity, androidx.appcompat.R.attr.colorControlNormal)
|
||||||
if (file.isDirectory) {
|
if (file.isDirectory) {
|
||||||
holder.image?.let {
|
holder.image?.let {
|
||||||
it.setColorFilter(iconColor, PorterDuff.Mode.SRC_IN)
|
it.setColorFilter(iconColor, PorterDuff.Mode.SRC_IN)
|
||||||
|
@ -104,7 +104,7 @@ class SongFileAdapter(
|
||||||
holder.imageTextContainer?.setCardBackgroundColor(
|
holder.imageTextContainer?.setCardBackgroundColor(
|
||||||
ATHUtil.resolveColor(
|
ATHUtil.resolveColor(
|
||||||
activity,
|
activity,
|
||||||
R.attr.colorSurface
|
com.google.android.material.R.attr.colorSurface
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -119,7 +119,7 @@ class AlbumCoverPagerAdapter(
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
MaterialAlertDialogBuilder(
|
MaterialAlertDialogBuilder(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
R.style.ThemeOverlay_MaterialComponents_Dialog_Alert
|
com.google.android.material.R.style.ThemeOverlay_MaterialComponents_Dialog_Alert
|
||||||
).apply {
|
).apply {
|
||||||
setTitle(song.title)
|
setTitle(song.title)
|
||||||
setMessage(if (data.isNullOrEmpty()) "No lyrics found" else data)
|
setMessage(if (data.isNullOrEmpty()) "No lyrics found" else data)
|
||||||
|
|
|
@ -40,29 +40,29 @@ class AppWidgetText : BaseAppWidget() {
|
||||||
appWidgetView.setImageViewBitmap(
|
appWidgetView.setImageViewBitmap(
|
||||||
R.id.button_next,
|
R.id.button_next,
|
||||||
context.getTintedDrawable(R.drawable.ic_skip_next, ContextCompat.getColor(
|
context.getTintedDrawable(R.drawable.ic_skip_next, ContextCompat.getColor(
|
||||||
context, R.color.md_white_1000
|
context, code.name.monkey.appthemehelper.R.color.md_white_1000
|
||||||
)).toBitmap()
|
)).toBitmap()
|
||||||
)
|
)
|
||||||
appWidgetView.setImageViewBitmap(
|
appWidgetView.setImageViewBitmap(
|
||||||
R.id.button_prev,
|
R.id.button_prev,
|
||||||
context.getTintedDrawable(R.drawable.ic_skip_previous, ContextCompat.getColor(
|
context.getTintedDrawable(R.drawable.ic_skip_previous, ContextCompat.getColor(
|
||||||
context, R.color.md_white_1000
|
context, code.name.monkey.appthemehelper.R.color.md_white_1000
|
||||||
)
|
)
|
||||||
).toBitmap()
|
).toBitmap()
|
||||||
)
|
)
|
||||||
appWidgetView.setImageViewBitmap(
|
appWidgetView.setImageViewBitmap(
|
||||||
R.id.button_toggle_play_pause,
|
R.id.button_toggle_play_pause,
|
||||||
context.getTintedDrawable(R.drawable.ic_play_arrow_white_32dp, ContextCompat.getColor(
|
context.getTintedDrawable(R.drawable.ic_play_arrow_white_32dp, ContextCompat.getColor(
|
||||||
context, R.color.md_white_1000
|
context, code.name.monkey.appthemehelper.R.color.md_white_1000
|
||||||
)
|
)
|
||||||
).toBitmap()
|
).toBitmap()
|
||||||
)
|
)
|
||||||
|
|
||||||
appWidgetView.setTextColor(
|
appWidgetView.setTextColor(
|
||||||
R.id.title, ContextCompat.getColor(context, R.color.md_white_1000)
|
R.id.title, ContextCompat.getColor(context, code.name.monkey.appthemehelper.R.color.md_white_1000)
|
||||||
)
|
)
|
||||||
appWidgetView.setTextColor(
|
appWidgetView.setTextColor(
|
||||||
R.id.text, ContextCompat.getColor(context, R.color.md_white_1000)
|
R.id.text, ContextCompat.getColor(context, code.name.monkey.appthemehelper.R.color.md_white_1000)
|
||||||
)
|
)
|
||||||
|
|
||||||
linkButtons(context, appWidgetView)
|
linkButtons(context, appWidgetView)
|
||||||
|
@ -127,7 +127,7 @@ class AppWidgetText : BaseAppWidget() {
|
||||||
appWidgetView.setImageViewBitmap(
|
appWidgetView.setImageViewBitmap(
|
||||||
R.id.button_toggle_play_pause,
|
R.id.button_toggle_play_pause,
|
||||||
service.getTintedDrawable(playPauseRes, ContextCompat.getColor(
|
service.getTintedDrawable(playPauseRes, ContextCompat.getColor(
|
||||||
service, R.color.md_white_1000)
|
service, code.name.monkey.appthemehelper.R.color.md_white_1000)
|
||||||
).toBitmap()
|
).toBitmap()
|
||||||
)
|
)
|
||||||
appWidgetView.setImageViewBitmap(
|
appWidgetView.setImageViewBitmap(
|
||||||
|
@ -136,7 +136,7 @@ class AppWidgetText : BaseAppWidget() {
|
||||||
R.drawable.ic_skip_next,
|
R.drawable.ic_skip_next,
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
service,
|
service,
|
||||||
R.color.md_white_1000
|
code.name.monkey.appthemehelper.R.color.md_white_1000
|
||||||
)
|
)
|
||||||
).toBitmap()
|
).toBitmap()
|
||||||
)
|
)
|
||||||
|
@ -145,7 +145,7 @@ class AppWidgetText : BaseAppWidget() {
|
||||||
service.getTintedDrawable(
|
service.getTintedDrawable(
|
||||||
R.drawable.ic_skip_previous,
|
R.drawable.ic_skip_previous,
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
service, R.color.md_white_1000
|
service, code.name.monkey.appthemehelper.R.color.md_white_1000
|
||||||
)
|
)
|
||||||
).toBitmap()
|
).toBitmap()
|
||||||
)
|
)
|
||||||
|
|
|
@ -52,7 +52,7 @@ fun Int.ripAlpha(): Int {
|
||||||
fun Dialog.colorControlNormal() = resolveColor(android.R.attr.colorControlNormal)
|
fun Dialog.colorControlNormal() = resolveColor(android.R.attr.colorControlNormal)
|
||||||
|
|
||||||
fun Toolbar.backgroundTintList() {
|
fun Toolbar.backgroundTintList() {
|
||||||
val surfaceColor = ATHUtil.resolveColor(context, R.attr.colorSurface, Color.BLACK)
|
val surfaceColor = ATHUtil.resolveColor(context, com.google.android.material.R.attr.colorSurface, Color.BLACK)
|
||||||
val colorStateList = ColorStateList.valueOf(surfaceColor)
|
val colorStateList = ColorStateList.valueOf(surfaceColor)
|
||||||
backgroundTintList = colorStateList
|
backgroundTintList = colorStateList
|
||||||
}
|
}
|
||||||
|
@ -61,13 +61,13 @@ fun Context.accentColor() = ThemeStore.accentColor(this)
|
||||||
|
|
||||||
fun Fragment.accentColor() = ThemeStore.accentColor(requireContext())
|
fun Fragment.accentColor() = ThemeStore.accentColor(requireContext())
|
||||||
|
|
||||||
fun Context.surfaceColor() = resolveColor(R.attr.colorSurface, Color.WHITE)
|
fun Context.surfaceColor() = resolveColor(com.google.android.material.R.attr.colorSurface, Color.WHITE)
|
||||||
|
|
||||||
fun Fragment.surfaceColor() = resolveColor(R.attr.colorSurface, Color.WHITE)
|
fun Fragment.surfaceColor() = resolveColor(com.google.android.material.R.attr.colorSurface, Color.WHITE)
|
||||||
|
|
||||||
fun Context.surfaceColor(fallBackColor: Int) = resolveColor(R.attr.colorSurface, fallBackColor)
|
fun Context.surfaceColor(fallBackColor: Int) = resolveColor(com.google.android.material.R.attr.colorSurface, fallBackColor)
|
||||||
|
|
||||||
fun Fragment.surfaceColor(fallBackColor: Int) = resolveColor(R.attr.colorSurface, fallBackColor)
|
fun Fragment.surfaceColor(fallBackColor: Int) = resolveColor(com.google.android.material.R.attr.colorSurface, fallBackColor)
|
||||||
|
|
||||||
fun Context.textColorSecondary() = resolveColor(android.R.attr.textColorSecondary)
|
fun Context.textColorSecondary() = resolveColor(android.R.attr.textColorSecondary)
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ class RestoreActivity : AppCompatActivity() {
|
||||||
DynamicColors.applyToActivityIfAvailable(
|
DynamicColors.applyToActivityIfAvailable(
|
||||||
this,
|
this,
|
||||||
DynamicColorsOptions.Builder()
|
DynamicColorsOptions.Builder()
|
||||||
.setThemeOverlay(R.style.ThemeOverlay_Material3_DynamicColors_DayNight)
|
.setThemeOverlay(com.google.android.material.R.style.ThemeOverlay_Material3_DynamicColors_DayNight)
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ class BlurPlaybackControlsFragment :
|
||||||
override fun setColor(color: MediaNotificationProcessor) {
|
override fun setColor(color: MediaNotificationProcessor) {
|
||||||
lastPlaybackControlsColor = Color.WHITE
|
lastPlaybackControlsColor = Color.WHITE
|
||||||
lastDisabledPlaybackControlsColor =
|
lastDisabledPlaybackControlsColor =
|
||||||
ContextCompat.getColor(requireContext(), R.color.md_grey_500)
|
ContextCompat.getColor(requireContext(), code.name.monkey.appthemehelper.R.color.md_grey_500)
|
||||||
|
|
||||||
binding.title.setTextColor(lastPlaybackControlsColor)
|
binding.title.setTextColor(lastPlaybackControlsColor)
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class MD3PlayerFragment : AbsPlayerFragment(R.layout.fragment_md3_player) {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toolbarIconColor(): Int {
|
override fun toolbarIconColor(): Int {
|
||||||
return ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal)
|
return ATHUtil.resolveColor(requireContext(), androidx.appcompat.R.attr.colorControlNormal)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onColorChanged(color: MediaNotificationProcessor) {
|
override fun onColorChanged(color: MediaNotificationProcessor) {
|
||||||
|
@ -63,7 +63,7 @@ class MD3PlayerFragment : AbsPlayerFragment(R.layout.fragment_md3_player) {
|
||||||
|
|
||||||
ToolbarContentTintHelper.colorizeToolbar(
|
ToolbarContentTintHelper.colorizeToolbar(
|
||||||
binding.playerToolbar,
|
binding.playerToolbar,
|
||||||
ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal),
|
ATHUtil.resolveColor(requireContext(), androidx.appcompat.R.attr.colorControlNormal),
|
||||||
requireActivity()
|
requireActivity()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ class MD3PlayerFragment : AbsPlayerFragment(R.layout.fragment_md3_player) {
|
||||||
|
|
||||||
ToolbarContentTintHelper.colorizeToolbar(
|
ToolbarContentTintHelper.colorizeToolbar(
|
||||||
binding.playerToolbar,
|
binding.playerToolbar,
|
||||||
ATHUtil.resolveColor(requireContext(), R.attr.colorControlNormal),
|
ATHUtil.resolveColor(requireContext(), androidx.appcompat.R.attr.colorControlNormal),
|
||||||
requireActivity()
|
requireActivity()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ import com.bumptech.glide.request.transition.Transition
|
||||||
abstract class SingleColorTarget(view: ImageView) : BitmapPaletteTarget(view) {
|
abstract class SingleColorTarget(view: ImageView) : BitmapPaletteTarget(view) {
|
||||||
|
|
||||||
private val defaultFooterColor: Int
|
private val defaultFooterColor: Int
|
||||||
get() = ATHUtil.resolveColor(view.context, R.attr.colorControlNormal)
|
get() = ATHUtil.resolveColor(view.context, androidx.appcompat.R.attr.colorControlNormal)
|
||||||
|
|
||||||
abstract fun onColorReady(color: Int)
|
abstract fun onColorReady(color: Int)
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ abstract class SingleColorTarget(view: ImageView) : BitmapPaletteTarget(view) {
|
||||||
onColorReady(
|
onColorReady(
|
||||||
ColorUtil.getColor(
|
ColorUtil.getColor(
|
||||||
resource.palette,
|
resource.palette,
|
||||||
ATHUtil.resolveColor(view.context, R.attr.colorPrimary)
|
ATHUtil.resolveColor(view.context, androidx.appcompat.R.attr.colorPrimary)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,14 +124,14 @@ class PlayingNotificationClassic(
|
||||||
super.onLoadFailed(errorDrawable)
|
super.onLoadFailed(errorDrawable)
|
||||||
update(
|
update(
|
||||||
null,
|
null,
|
||||||
resolveColor(context, R.attr.colorSurface, Color.WHITE)
|
resolveColor(context, com.google.android.material.R.attr.colorSurface, Color.WHITE)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLoadCleared(placeholder: Drawable?) {
|
override fun onLoadCleared(placeholder: Drawable?) {
|
||||||
update(
|
update(
|
||||||
null,
|
null,
|
||||||
resolveColor(context, R.attr.colorSurface, Color.WHITE)
|
resolveColor(context, com.google.android.material.R.attr.colorSurface, Color.WHITE)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ class PlayingNotificationClassic(
|
||||||
if (!VersionUtils.hasS()) {
|
if (!VersionUtils.hasS()) {
|
||||||
if (!PreferenceUtil.isColoredNotification) {
|
if (!PreferenceUtil.isColoredNotification) {
|
||||||
bgColorFinal =
|
bgColorFinal =
|
||||||
resolveColor(context, R.attr.colorSurface, Color.WHITE)
|
resolveColor(context, com.google.android.material.R.attr.colorSurface, Color.WHITE)
|
||||||
}
|
}
|
||||||
setBackgroundColor(bgColorFinal)
|
setBackgroundColor(bgColorFinal)
|
||||||
setNotificationContent(ColorUtil.isColorLight(bgColorFinal))
|
setNotificationContent(ColorUtil.isColorLight(bgColorFinal))
|
||||||
|
|
|
@ -35,7 +35,6 @@ import java.util.List;
|
||||||
import code.name.monkey.appthemehelper.ThemeStore;
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||||
import code.name.monkey.appthemehelper.util.VersionUtils;
|
import code.name.monkey.appthemehelper.util.VersionUtils;
|
||||||
import code.name.monkey.retromusic.R;
|
|
||||||
|
|
||||||
public class RetroColorUtil {
|
public class RetroColorUtil {
|
||||||
public static int desaturateColor(int color, float ratio) {
|
public static int desaturateColor(int color, float ratio) {
|
||||||
|
@ -224,7 +223,7 @@ public class RetroColorUtil {
|
||||||
|
|
||||||
public static int getMD3AccentColor(@NotNull Context context) {
|
public static int getMD3AccentColor(@NotNull Context context) {
|
||||||
if (VersionUtils.hasS()) {
|
if (VersionUtils.hasS()) {
|
||||||
return ContextCompat.getColor(context, R.color.m3_accent_color);
|
return ContextCompat.getColor(context, code.name.monkey.appthemehelper.R.color.m3_accent_color);
|
||||||
} else {
|
} else {
|
||||||
return ThemeStore.Companion.accentColor(context);
|
return ThemeStore.Companion.accentColor(context);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@ import java.util.List;
|
||||||
|
|
||||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||||
import code.name.monkey.retromusic.R;
|
|
||||||
|
|
||||||
/** A class the processes media notifications and extracts the right text and background colors. */
|
/** A class the processes media notifications and extracts the right text and background colors. */
|
||||||
public class MediaNotificationProcessor {
|
public class MediaNotificationProcessor {
|
||||||
|
@ -454,7 +453,7 @@ public class MediaNotificationProcessor {
|
||||||
public int getMightyColor() {
|
public int getMightyColor() {
|
||||||
boolean isDarkBg =
|
boolean isDarkBg =
|
||||||
ColorUtil.INSTANCE.isColorLight(
|
ColorUtil.INSTANCE.isColorLight(
|
||||||
ATHUtil.INSTANCE.resolveColor(context, R.attr.colorSurface));
|
ATHUtil.INSTANCE.resolveColor(context, com.google.android.material.R.attr.colorSurface));
|
||||||
if (isDarkBg) {
|
if (isDarkBg) {
|
||||||
if (isColorLight(backgroundColor)) {
|
if (isColorLight(backgroundColor)) {
|
||||||
return primaryTextColor;
|
return primaryTextColor;
|
||||||
|
|
|
@ -38,8 +38,6 @@ import androidx.core.content.ContextCompat;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class to process legacy (Holo) notifications to make them look like material
|
* Helper class to process legacy (Holo) notifications to make them look like material
|
||||||
* notifications.
|
* notifications.
|
||||||
|
@ -62,7 +60,7 @@ public class NotificationColorUtil {
|
||||||
|
|
||||||
private NotificationColorUtil(Context context) {
|
private NotificationColorUtil(Context context) {
|
||||||
mGrayscaleIconMaxSize =
|
mGrayscaleIconMaxSize =
|
||||||
context.getResources().getDimensionPixelSize(R.dimen.notification_large_icon_width);
|
context.getResources().getDimensionPixelSize(androidx.core.R.dimen.notification_large_icon_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NotificationColorUtil getInstance(Context context) {
|
public static NotificationColorUtil getInstance(Context context) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ class ColorIconsImageView @JvmOverloads constructor(
|
||||||
val desaturatedColor = RetroColorUtil.desaturateColor(color, 0.4f)
|
val desaturatedColor = RetroColorUtil.desaturateColor(color, 0.4f)
|
||||||
backgroundTintList = ColorStateList.valueOf(desaturatedColor)
|
backgroundTintList = ColorStateList.valueOf(desaturatedColor)
|
||||||
imageTintList =
|
imageTintList =
|
||||||
ColorStateList.valueOf(ATHUtil.resolveColor(context, R.attr.colorSurface))
|
ColorStateList.valueOf(ATHUtil.resolveColor(context, com.google.android.material.R.attr.colorSurface))
|
||||||
} else {
|
} else {
|
||||||
val finalColor = MaterialColors.harmonize(
|
val finalColor = MaterialColors.harmonize(
|
||||||
color,
|
color,
|
||||||
|
|
|
@ -32,8 +32,6 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.graphics.drawable.DrawableCompat;
|
import androidx.core.graphics.drawable.DrawableCompat;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R;
|
|
||||||
|
|
||||||
public class PopupBackground extends Drawable {
|
public class PopupBackground extends Drawable {
|
||||||
|
|
||||||
private final int mPaddingEnd;
|
private final int mPaddingEnd;
|
||||||
|
@ -52,8 +50,8 @@ public class PopupBackground extends Drawable {
|
||||||
mPaint.setColor(color);
|
mPaint.setColor(color);
|
||||||
mPaint.setStyle(Paint.Style.FILL);
|
mPaint.setStyle(Paint.Style.FILL);
|
||||||
Resources resources = context.getResources();
|
Resources resources = context.getResources();
|
||||||
mPaddingStart = resources.getDimensionPixelOffset(R.dimen.afs_md2_popup_padding_start);
|
mPaddingStart = resources.getDimensionPixelOffset(me.zhanghai.android.fastscroll.R.dimen.afs_md2_popup_padding_start);
|
||||||
mPaddingEnd = resources.getDimensionPixelOffset(R.dimen.afs_md2_popup_padding_end);
|
mPaddingEnd = resources.getDimensionPixelOffset(me.zhanghai.android.fastscroll.R.dimen.afs_md2_popup_padding_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void pathArcTo(
|
private static void pathArcTo(
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
package="code.name.monkey.retromusic">
|
|
||||||
|
|
||||||
<uses-permission android:name="com.android.vending.BILLING" />
|
<uses-permission android:name="com.android.vending.BILLING" />
|
||||||
|
|
||||||
|
|
1
appthemehelper/.gitignore
vendored
1
appthemehelper/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
/build
|
|
|
@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
android {
|
android {
|
||||||
compileSdk 32
|
compileSdk 32
|
||||||
|
namespace "code.name.monkey.appthemehelper"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 21
|
minSdk 21
|
||||||
|
@ -26,6 +27,4 @@ dependencies {
|
||||||
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
||||||
implementation "com.google.android.material:material:$mdc_version"
|
implementation "com.google.android.material:material:$mdc_version"
|
||||||
implementation "androidx.preference:preference-ktx:$preference_version"
|
implementation "androidx.preference:preference-ktx:$preference_version"
|
||||||
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<manifest package="code.name.monkey.appthemehelper" />
|
<manifest />
|
||||||
|
|
|
@ -223,7 +223,7 @@ private constructor(private val mContext: Context) : ThemeStorePrefKeys, ThemeSt
|
||||||
fun primaryColor(context: Context): Int {
|
fun primaryColor(context: Context): Int {
|
||||||
return prefs(context).getInt(
|
return prefs(context).getInt(
|
||||||
ThemeStorePrefKeys.KEY_PRIMARY_COLOR,
|
ThemeStorePrefKeys.KEY_PRIMARY_COLOR,
|
||||||
resolveColor(context, R.attr.colorPrimary, Color.parseColor("#455A64"))
|
resolveColor(context, androidx.appcompat.R.attr.colorPrimary, Color.parseColor("#455A64"))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ private constructor(private val mContext: Context) : ThemeStorePrefKeys, ThemeSt
|
||||||
} else {
|
} else {
|
||||||
prefs(context).getInt(
|
prefs(context).getInt(
|
||||||
ThemeStorePrefKeys.KEY_ACCENT_COLOR,
|
ThemeStorePrefKeys.KEY_ACCENT_COLOR,
|
||||||
resolveColor(context, R.attr.colorAccent, Color.parseColor("#263238"))
|
resolveColor(context, androidx.appcompat.R.attr.colorAccent, Color.parseColor("#263238"))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return if (isWindowBackgroundDark(context) && desaturatedColor) ColorUtil.desaturateColor(
|
return if (isWindowBackgroundDark(context) && desaturatedColor) ColorUtil.desaturateColor(
|
||||||
|
@ -254,7 +254,7 @@ private constructor(private val mContext: Context) : ThemeStorePrefKeys, ThemeSt
|
||||||
fun wallpaperColor(context: Context, isDarkMode: Boolean): Int {
|
fun wallpaperColor(context: Context, isDarkMode: Boolean): Int {
|
||||||
return prefs(context).getInt(
|
return prefs(context).getInt(
|
||||||
if (isDarkMode) ThemeStorePrefKeys.KEY_WALLPAPER_COLOR_DARK else ThemeStorePrefKeys.KEY_WALLPAPER_COLOR_LIGHT,
|
if (isDarkMode) ThemeStorePrefKeys.KEY_WALLPAPER_COLOR_DARK else ThemeStorePrefKeys.KEY_WALLPAPER_COLOR_LIGHT,
|
||||||
resolveColor(context, R.attr.colorAccent, Color.parseColor("#263238"))
|
resolveColor(context, androidx.appcompat.R.attr.colorAccent, Color.parseColor("#263238"))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import android.view.Menu;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import code.name.monkey.appthemehelper.ATHActivity;
|
import code.name.monkey.appthemehelper.ATHActivity;
|
||||||
import code.name.monkey.appthemehelper.R;
|
|
||||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
||||||
|
|
||||||
|
@ -16,7 +15,7 @@ public class ATHToolbarActivity extends ATHActivity {
|
||||||
|
|
||||||
public static int getToolbarBackgroundColor(@Nullable Toolbar toolbar) {
|
public static int getToolbarBackgroundColor(@Nullable Toolbar toolbar) {
|
||||||
if (toolbar != null) {
|
if (toolbar != null) {
|
||||||
return ATHUtil.INSTANCE.resolveColor(toolbar.getContext(), R.attr.colorSurface);
|
return ATHUtil.INSTANCE.resolveColor(toolbar.getContext(), com.google.android.material.R.attr.colorSurface);
|
||||||
}
|
}
|
||||||
return Color.BLACK;
|
return Color.BLACK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,12 +42,12 @@ class ATESeekBarPreference @JvmOverloads constructor(
|
||||||
|
|
||||||
override fun onBindViewHolder(view: PreferenceViewHolder) {
|
override fun onBindViewHolder(view: PreferenceViewHolder) {
|
||||||
super.onBindViewHolder(view)
|
super.onBindViewHolder(view)
|
||||||
val seekBar = view.findViewById(R.id.seekbar) as SeekBar
|
val seekBar = view.findViewById(androidx.preference.R.id.seekbar) as SeekBar
|
||||||
TintHelper.setTintAuto(
|
TintHelper.setTintAuto(
|
||||||
seekBar, // Set MD3 accent if MD3 is enabled or in-app accent otherwise
|
seekBar, // Set MD3 accent if MD3 is enabled or in-app accent otherwise
|
||||||
ThemeStore.accentColor(context), false
|
ThemeStore.accentColor(context), false
|
||||||
)
|
)
|
||||||
(view.findViewById(R.id.seekbar_value) as TextView).apply {
|
(view.findViewById(androidx.preference.R.id.seekbar_value) as TextView).apply {
|
||||||
appendUnit(editableText)
|
appendUnit(editableText)
|
||||||
doAfterTextChanged {
|
doAfterTextChanged {
|
||||||
appendUnit(it)
|
appendUnit(it)
|
||||||
|
|
|
@ -29,8 +29,6 @@ import androidx.preference.DialogPreference;
|
||||||
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
|
|
||||||
import code.name.monkey.appthemehelper.R;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karim Abou Zeid (kabouzeid)
|
* @author Karim Abou Zeid (kabouzeid)
|
||||||
*/
|
*/
|
||||||
|
@ -64,7 +62,7 @@ public class ATEPreferenceDialogFragment extends DialogFragment implements Dialo
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
FragmentActivity context = this.getActivity();
|
FragmentActivity context = this.getActivity();
|
||||||
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context,
|
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context,
|
||||||
R.style.ThemeOverlay_MaterialComponents_Dialog_Alert)
|
com.google.android.material.R.style.ThemeOverlay_MaterialComponents_Dialog_Alert)
|
||||||
.setTitle(this.mPreference.getDialogTitle())
|
.setTitle(this.mPreference.getDialogTitle())
|
||||||
.setIcon(this.mPreference.getDialogIcon())
|
.setIcon(this.mPreference.getDialogIcon())
|
||||||
.setMessage(this.mPreference.getDialogMessage())
|
.setMessage(this.mPreference.getDialogMessage())
|
||||||
|
|
|
@ -14,8 +14,8 @@ object MaterialValueHelper {
|
||||||
@ColorInt
|
@ColorInt
|
||||||
fun getPrimaryTextColor(context: Context?, dark: Boolean): Int {
|
fun getPrimaryTextColor(context: Context?, dark: Boolean): Int {
|
||||||
return if (dark) {
|
return if (dark) {
|
||||||
ContextCompat.getColor(context!!, R.color.primary_text_default_material_light)
|
ContextCompat.getColor(context!!, androidx.appcompat.R.color.primary_text_default_material_light)
|
||||||
} else ContextCompat.getColor(context!!, R.color.primary_text_default_material_dark)
|
} else ContextCompat.getColor(context!!, androidx.appcompat.R.color.primary_text_default_material_dark)
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("PrivateResource")
|
@SuppressLint("PrivateResource")
|
||||||
|
@ -23,8 +23,8 @@ object MaterialValueHelper {
|
||||||
@ColorInt
|
@ColorInt
|
||||||
fun getSecondaryTextColor(context: Context?, dark: Boolean): Int {
|
fun getSecondaryTextColor(context: Context?, dark: Boolean): Int {
|
||||||
return if (dark) {
|
return if (dark) {
|
||||||
ContextCompat.getColor(context!!, R.color.secondary_text_default_material_light)
|
ContextCompat.getColor(context!!, androidx.appcompat.R.color.secondary_text_default_material_light)
|
||||||
} else ContextCompat.getColor(context!!, R.color.secondary_text_default_material_dark)
|
} else ContextCompat.getColor(context!!, androidx.appcompat.R.color.secondary_text_default_material_dark)
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("PrivateResource")
|
@SuppressLint("PrivateResource")
|
||||||
|
@ -32,8 +32,8 @@ object MaterialValueHelper {
|
||||||
@ColorInt
|
@ColorInt
|
||||||
fun getPrimaryDisabledTextColor(context: Context?, dark: Boolean): Int {
|
fun getPrimaryDisabledTextColor(context: Context?, dark: Boolean): Int {
|
||||||
return if (dark) {
|
return if (dark) {
|
||||||
ContextCompat.getColor(context!!, R.color.primary_text_disabled_material_light)
|
ContextCompat.getColor(context!!, androidx.appcompat.R.color.primary_text_disabled_material_light)
|
||||||
} else ContextCompat.getColor(context!!, R.color.primary_text_disabled_material_dark)
|
} else ContextCompat.getColor(context!!, androidx.appcompat.R.color.primary_text_disabled_material_dark)
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("PrivateResource")
|
@SuppressLint("PrivateResource")
|
||||||
|
@ -41,7 +41,7 @@ object MaterialValueHelper {
|
||||||
@ColorInt
|
@ColorInt
|
||||||
fun getSecondaryDisabledTextColor(context: Context?, dark: Boolean): Int {
|
fun getSecondaryDisabledTextColor(context: Context?, dark: Boolean): Int {
|
||||||
return if (dark) {
|
return if (dark) {
|
||||||
ContextCompat.getColor(context!!, R.color.secondary_text_disabled_material_light)
|
ContextCompat.getColor(context!!, androidx.appcompat.R.color.secondary_text_disabled_material_light)
|
||||||
} else ContextCompat.getColor(context!!, R.color.secondary_text_disabled_material_dark)
|
} else ContextCompat.getColor(context!!, androidx.appcompat.R.color.secondary_text_disabled_material_dark)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,7 +265,7 @@ public final class TintHelper {
|
||||||
// Ripples for the above views (e.g. when you tap and hold a switch or checkbox)
|
// Ripples for the above views (e.g. when you tap and hold a switch or checkbox)
|
||||||
RippleDrawable rd = (RippleDrawable) view.getBackground();
|
RippleDrawable rd = (RippleDrawable) view.getBackground();
|
||||||
@SuppressLint("PrivateResource") final int unchecked = ContextCompat.getColor(view.getContext(),
|
@SuppressLint("PrivateResource") final int unchecked = ContextCompat.getColor(view.getContext(),
|
||||||
isDark ? R.color.ripple_material_dark : R.color.ripple_material_light);
|
isDark ? androidx.appcompat.R.color.ripple_material_dark : androidx.appcompat.R.color.ripple_material_light);
|
||||||
final int checked = ColorUtil.INSTANCE.adjustAlpha(color, 0.4f);
|
final int checked = ColorUtil.INSTANCE.adjustAlpha(color, 0.4f);
|
||||||
final ColorStateList sl = new ColorStateList(
|
final ColorStateList sl = new ColorStateList(
|
||||||
new int[][]{
|
new int[][]{
|
||||||
|
@ -373,7 +373,7 @@ public final class TintHelper {
|
||||||
private static int getDefaultRippleColor(@NonNull Context context, boolean useDarkRipple) {
|
private static int getDefaultRippleColor(@NonNull Context context, boolean useDarkRipple) {
|
||||||
// Light ripple is actually translucent black, and vice versa
|
// Light ripple is actually translucent black, and vice versa
|
||||||
return ContextCompat.getColor(context, useDarkRipple ?
|
return ContextCompat.getColor(context, useDarkRipple ?
|
||||||
R.color.ripple_material_light : R.color.ripple_material_dark);
|
androidx.appcompat.R.color.ripple_material_light : androidx.appcompat.R.color.ripple_material_dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
|
|
@ -39,7 +39,6 @@ import androidx.core.graphics.drawable.DrawableCompat;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import code.name.monkey.appthemehelper.R;
|
|
||||||
import code.name.monkey.appthemehelper.ThemeStore;
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
|
|
||||||
public final class ToolbarContentTintHelper {
|
public final class ToolbarContentTintHelper {
|
||||||
|
@ -122,7 +121,7 @@ public final class ToolbarContentTintHelper {
|
||||||
public static void setOverflowButtonColor(@NonNull Activity activity,
|
public static void setOverflowButtonColor(@NonNull Activity activity,
|
||||||
final @ColorInt int color) {
|
final @ColorInt int color) {
|
||||||
final String overflowDescription = activity
|
final String overflowDescription = activity
|
||||||
.getString(R.string.abc_action_menu_overflow_description);
|
.getString(androidx.appcompat.R.string.abc_action_menu_overflow_description);
|
||||||
final ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();
|
final ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();
|
||||||
final ViewTreeObserver viewTreeObserver = decorView.getViewTreeObserver();
|
final ViewTreeObserver viewTreeObserver = decorView.getViewTreeObserver();
|
||||||
viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
|
@ -283,7 +282,7 @@ public final class ToolbarContentTintHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void colorBackButton(@NonNull Toolbar toolbar) {
|
public static void colorBackButton(@NonNull Toolbar toolbar) {
|
||||||
int color = ATHUtil.INSTANCE.resolveColor(toolbar.getContext(), R.attr.colorControlNormal);
|
int color = ATHUtil.INSTANCE.resolveColor(toolbar.getContext(), androidx.appcompat.R.attr.colorControlNormal);
|
||||||
final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||||
for (int i = 0; i < toolbar.getChildCount(); i++) {
|
for (int i = 0; i < toolbar.getChildCount(); i++) {
|
||||||
final View backButton = toolbar.getChildAt(i);
|
final View backButton = toolbar.getChildAt(i);
|
||||||
|
@ -564,7 +563,7 @@ public final class ToolbarContentTintHelper {
|
||||||
private static void setOverflowButtonColor(final Activity activity,
|
private static void setOverflowButtonColor(final Activity activity,
|
||||||
final PorterDuffColorFilter colorFilter) {
|
final PorterDuffColorFilter colorFilter) {
|
||||||
final String overflowDescription = activity
|
final String overflowDescription = activity
|
||||||
.getString(R.string.abc_action_menu_overflow_description);
|
.getString(androidx.appcompat.R.string.abc_action_menu_overflow_description);
|
||||||
final ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();
|
final ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();
|
||||||
final ViewTreeObserver viewTreeObserver = decorView.getViewTreeObserver();
|
final ViewTreeObserver viewTreeObserver = decorView.getViewTreeObserver();
|
||||||
viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
|
@ -596,9 +595,9 @@ public final class ToolbarContentTintHelper {
|
||||||
private static void tintShareIconIfPresent(int color, MenuItem item) {
|
private static void tintShareIconIfPresent(int color, MenuItem item) {
|
||||||
if (item.getActionView() != null) {
|
if (item.getActionView() != null) {
|
||||||
final View actionView = item.getActionView();
|
final View actionView = item.getActionView();
|
||||||
final View expandActivitiesButton = actionView.findViewById(R.id.expand_activities_button);
|
final View expandActivitiesButton = actionView.findViewById(com.google.android.material.R.id.expand_activities_button);
|
||||||
if (expandActivitiesButton != null) {
|
if (expandActivitiesButton != null) {
|
||||||
final ImageView image = expandActivitiesButton.findViewById(R.id.image);
|
final ImageView image = expandActivitiesButton.findViewById(com.google.android.material.R.id.image);
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
final Drawable drawable = image.getDrawable();
|
final Drawable drawable = image.getDrawable();
|
||||||
final Drawable wrapped = DrawableCompat.wrap(drawable);
|
final Drawable wrapped = DrawableCompat.wrap(drawable);
|
||||||
|
|
27
build.gradle
27
build.gradle
|
@ -2,13 +2,12 @@
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
kotlin_version = '1.7.10'
|
lifecycle_version='2.5.0'
|
||||||
lifecycle_version = '2.5.1'
|
navigation_version = '2.5.0'
|
||||||
navigation_version = '2.5.1'
|
mdc_version = '1.7.0-alpha02'
|
||||||
mdc_version = '1.7.0-alpha03'
|
|
||||||
preference_version = '1.2.0'
|
preference_version = '1.2.0'
|
||||||
appcompat_version = '1.5.0-rc01'
|
appcompat_version = '1.4.2'
|
||||||
core_version = '1.8.0'
|
core_version='1.8.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -17,13 +16,27 @@ buildscript {
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.2.1'
|
classpath 'com.android.tools.build:gradle:7.2.1'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
|
||||||
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
|
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugins {
|
plugins {
|
||||||
|
id 'com.google.devtools.ksp' version '1.7.10-1.0.6' apply false
|
||||||
id "com.github.ben-manes.versions" version "0.42.0"
|
id "com.github.ben-manes.versions" version "0.42.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def isNonStable = { String version ->
|
||||||
|
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
|
||||||
|
def regex = /^[0-9,.v-]+(-r)?$/
|
||||||
|
return !stableKeyword && !(version ==~ regex)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named("dependencyUpdates").configure {
|
||||||
|
rejectVersionIf {
|
||||||
|
isNonStable(it.candidate.version)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
|
@ -1,21 +1,15 @@
|
||||||
# Project-wide Gradle settings.
|
android.injected.testOnly=false
|
||||||
# IDE (e.g. Android Studio) users:
|
|
||||||
# Gradle settings configured through the IDE *will override*
|
|
||||||
# any settings specified in this file.
|
|
||||||
# For more details on how to configure your build environment visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
|
||||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
||||||
org.gradle.parallel=true
|
|
||||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
|
||||||
# Android operating system, and which are packaged with your app"s APK
|
|
||||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
# Automatically convert third-party libraries to use AndroidX
|
kapt.verbose=true
|
||||||
android.enableJetifier=false
|
kotlin.code.style=official
|
||||||
# Kotlin code style for this project: "official" or "obsolete":
|
org.gradle.caching=true
|
||||||
kotlin.code.style=official
|
org.gradle.configureondemand=true
|
||||||
|
org.gradle.jvmargs=-Xmx4g -XX:+UseParallelGC -Dfile.encoding=UTF-8
|
||||||
|
org.gradle.parallel=true
|
||||||
|
|
||||||
|
# https://developer.android.com/studio/build/optimize-your-build#use-non-transitive-r-classes
|
||||||
|
android.nonTransitiveRClass=true
|
||||||
|
# https://blog.jetbrains.com/kotlin/2022/07/a-new-approach-to-incremental-compilation-in-kotlin/
|
||||||
|
kotlin.incremental.useClasspathSnapshot=true
|
||||||
|
# https://docs.gradle.org/7.5/userguide/configuration_cache.html
|
||||||
|
org.gradle.unsafe.configuration-cache=true
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
6
gradlew
vendored
6
gradlew
vendored
|
@ -205,6 +205,12 @@ set -- \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
# Use "xargs" to parse quoted args.
|
||||||
#
|
#
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
|
14
gradlew.bat
vendored
14
gradlew.bat
vendored
|
@ -14,7 +14,7 @@
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
exit /b 1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
// https://docs.gradle.com/enterprise/gradle-plugin/
|
||||||
|
plugins {
|
||||||
|
id "com.gradle.enterprise" version "3.10.3"
|
||||||
|
}
|
||||||
|
|
||||||
|
gradleEnterprise {
|
||||||
|
buildScan {
|
||||||
|
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||||
|
termsOfServiceAgree = "yes"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -6,4 +18,5 @@ dependencyResolutionManagement {
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include ':app', ':appthemehelper'
|
include ':app', ':appthemehelper'
|
Loading…
Add table
Add a link
Reference in a new issue