-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesigned UI. Create separate accent colour for dark theme [Android 10 only]. Resolves #2 Customise Hue, saturation and lightness of chosen colours. Reduced app size (42816ce). Overlay is now installed as a normal app on Oreo [Untested]. Added support for Oxygen OS [Untested]. Accents can be deleted by swiping from either side. Added colour preview from Styles and wallpapers app. New Info screen with links and app version. Fragment transition animations from Android 10.
- Loading branch information
Showing
55 changed files
with
2,426 additions
and
738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,70 @@ | ||
package app.akilesh.qacc | ||
|
||
import android.os.Build | ||
import android.os.Build.VERSION.SDK_INT | ||
import android.os.Build.VERSION_CODES.Q | ||
import app.akilesh.qacc.model.Colour | ||
import com.topjohnwu.superuser.Shell | ||
|
||
object Const { | ||
|
||
//Credits to AEX | ||
val presetColors = listOf( | ||
Colour("#FFC107", "Amber"), | ||
Colour("#448AFF", "Blue"), | ||
Colour("#607D8B", "Blue Grey"), | ||
Colour("#795548", "Brown"), | ||
Colour("#FF1744", "Candy Red"), | ||
Colour("#00BCD4", "Cyan"), | ||
Colour("#FF5722", "Deep Orange"), | ||
Colour("#7C4DFF", "Deep Purple"), | ||
Colour("#47AE84", "Elegant Green"), | ||
Colour("#21EF8B", "Extended Green"), | ||
Colour("#9E9E9E", "Grey"), | ||
Colour("#536DFE", "Indigo"), | ||
Colour("#9ABC98", "Jade Green"), | ||
Colour("#03A9F4", "Light Blue"), | ||
Colour("#8BC34A", "Light Green"), | ||
Colour("#CDDC39", "Lime"), | ||
Colour("#FF9800", "Orange"), | ||
Colour("#A1B6ED", "Pale Blue"), | ||
Colour("#F05361", "Pale Red"), | ||
Colour("#FF4081", "Pink"), | ||
Colour("#FF5252", "Red"), | ||
Colour("#009688", "Teal"), | ||
Colour("#FFEB3B", "Yellow") | ||
) | ||
object Colors { | ||
val presets = listOf( | ||
Colour("#FFC107", "Amber"), | ||
Colour("#448AFF", "Blue"), | ||
Colour("#607D8B", "Blue Grey"), | ||
Colour("#795548", "Brown"), | ||
Colour("#FF1744", "Candy Red"), | ||
Colour("#00BCD4", "Cyan"), | ||
Colour("#FF5722", "Deep Orange"), | ||
Colour("#7C4DFF", "Deep Purple"), | ||
Colour("#47AE84", "Elegant Green"), | ||
Colour("#21EF8B", "Extended Green"), | ||
Colour("#9E9E9E", "Grey"), | ||
Colour("#536DFE", "Indigo"), | ||
Colour("#9ABC98", "Jade Green"), | ||
Colour("#03A9F4", "Light Blue"), | ||
Colour("#8BC34A", "Light Green"), | ||
Colour("#CDDC39", "Lime"), | ||
Colour("#FF9800", "Orange"), | ||
Colour("#A1B6ED", "Pale Blue"), | ||
Colour("#F05361", "Pale Red"), | ||
Colour("#FF4081", "Pink"), | ||
Colour("#FF5252", "Red"), | ||
Colour("#009688", "Teal"), | ||
Colour("#FFEB3B", "Yellow") | ||
) | ||
|
||
} | ||
|
||
object Links { | ||
const val telegramGroup = "https://t.me/AccentColourCreator" | ||
const val xdaThread = | ||
"https://forum.xda-developers.com/android/apps-games/app-magisk-module-qacc-custom-accent-t4011747" | ||
const val githubRepo = "https://github.com/Akilesh-T/ACC" | ||
const val telegramChannel = "https://t.me/ACC_Releases" | ||
const val githubReleases = "$githubRepo/releases/latest" | ||
} | ||
|
||
val overlayPath = if (SDK_INT == Q) "/data/adb/modules/qacc-mobile/system/product/overlay" | ||
else "/data/adb/modules/qacc-mobile/system/vendor/overlay" | ||
|
||
const val prefix = "com.android.theme.color.custom." | ||
|
||
val isOOS = Shell.sh("getprop ro.oxygen.version").exec().out.component1().isNotBlank() | ||
|
||
fun getAssetFiles(): MutableList<String> { | ||
|
||
val assetFiles = mutableListOf<String>() | ||
|
||
val arch = if (listOf(Build.SUPPORTED_64_BIT_ABIS).isNotEmpty()) "arm64" else "arm" | ||
if (arch == "arm64") | ||
assetFiles.addAll(listOf("aapt64", "zipalign64")) | ||
else | ||
assetFiles.addAll(listOf("aapt", "zipalign")) | ||
|
||
return assetFiles | ||
} | ||
|
||
} |
Oops, something went wrong.