mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-25 04:12:14 +00:00
Update: Bigger icons and better allignment/arrangement
This commit is contained in:
parent
63c075776f
commit
ce76bde673
214
build.gradle
214
build.gradle
@ -1,214 +0,0 @@
|
|||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
|
||||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
|
||||||
apply plugin: 'kotlin-android'
|
|
||||||
apply plugin: "kotlin-kapt"
|
|
||||||
|
|
||||||
android {
|
|
||||||
|
|
||||||
compileSdk = 31
|
|
||||||
defaultConfig {
|
|
||||||
archivesBaseName = 'droidify'
|
|
||||||
applicationId = 'com.looker.droidify'
|
|
||||||
minSdk = 23
|
|
||||||
targetSdk = 31
|
|
||||||
versionCode = 43
|
|
||||||
versionName = "0.4.3"
|
|
||||||
vectorDrawables.useSupportLibrary = true
|
|
||||||
|
|
||||||
javaCompileOptions {
|
|
||||||
annotationProcessorOptions {
|
|
||||||
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
|
|
||||||
arguments += ["room.incremental": "true"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets.all {
|
|
||||||
def javaDir = it.java.srcDirs.find { it.name == 'java' }
|
|
||||||
it.java.srcDirs += new File(javaDir.parentFile, 'kotlin')
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlinOptions {
|
|
||||||
freeCompilerArgs = ['-Xjvm-default=compatibility']
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
compose true
|
|
||||||
dataBinding true
|
|
||||||
}
|
|
||||||
|
|
||||||
composeOptions {
|
|
||||||
kotlinCompilerExtensionVersion "1.2.0-alpha01"
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
debug {
|
|
||||||
minifyEnabled = false
|
|
||||||
shrinkResources = false
|
|
||||||
applicationIdSuffix = ".debug"
|
|
||||||
versionNameSuffix = "-debug"
|
|
||||||
resValue "string", "application_name", "Droid-ify-Debug"
|
|
||||||
}
|
|
||||||
release {
|
|
||||||
minifyEnabled = true
|
|
||||||
shrinkResources = true
|
|
||||||
resValue "string", "application_name", "Droid-ify"
|
|
||||||
}
|
|
||||||
all {
|
|
||||||
crunchPngs = false
|
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard.pro")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
packagingOptions {
|
|
||||||
jniLibs {
|
|
||||||
excludes += ['/okhttp3/internal/publicsuffix/*']
|
|
||||||
}
|
|
||||||
resources {
|
|
||||||
excludes += ['/DebugProbesKt.bin', '/kotlin/**.kotlin_builtins', '/kotlin/**.kotlin_metadata', '/META-INF/**.kotlin_module', '/META-INF/**.pro', '/META-INF/**.version', '/okhttp3/internal/publicsuffix/*']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def keystorePropertiesFile = rootProject.file('keystore.properties')
|
|
||||||
lint {
|
|
||||||
ignore 'InvalidVectorPath'
|
|
||||||
warning 'InvalidPackage'
|
|
||||||
}
|
|
||||||
if (keystorePropertiesFile.exists()) {
|
|
||||||
def keystoreProperties = new Properties()
|
|
||||||
keystoreProperties.load(keystorePropertiesFile.newDataInputStream())
|
|
||||||
|
|
||||||
def signing = [
|
|
||||||
storeFile : keystoreProperties['store.file'],
|
|
||||||
storePassword: keystoreProperties['store.password'],
|
|
||||||
keyAlias : keystoreProperties['key.alias'],
|
|
||||||
keyPassword : keystoreProperties['key.password']
|
|
||||||
]
|
|
||||||
|
|
||||||
if (!signing.any { _, v -> v == null }) {
|
|
||||||
signingConfigs {
|
|
||||||
primary {
|
|
||||||
storeFile = file(signing.storeFile)
|
|
||||||
storePassword = signing.storePassword
|
|
||||||
keyAlias = signing.keyAlias
|
|
||||||
keyPassword = signing.keyPassword
|
|
||||||
v2SigningEnabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
debug.signingConfig = signingConfigs.primary
|
|
||||||
release.signingConfig = signingConfigs.primary
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
google()
|
|
||||||
mavenCentral()
|
|
||||||
maven { url "https://jitpack.io" }
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
|
|
||||||
// Core
|
|
||||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10'
|
|
||||||
implementation 'androidx.core:core-ktx:1.7.0'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
|
||||||
implementation 'androidx.appcompat:appcompat-resources:1.4.1'
|
|
||||||
implementation 'androidx.fragment:fragment-ktx:1.4.1'
|
|
||||||
implementation 'androidx.activity:activity-ktx:1.4.0'
|
|
||||||
implementation "androidx.preference:preference-ktx:1.2.0"
|
|
||||||
implementation "androidx.navigation:navigation-fragment-ktx:2.5.0-alpha03"
|
|
||||||
implementation "androidx.navigation:navigation-ui-ktx:2.5.0-alpha03"
|
|
||||||
|
|
||||||
// Material3
|
|
||||||
implementation 'com.google.android.material:material:1.6.0-alpha02'
|
|
||||||
|
|
||||||
// FastAdapter
|
|
||||||
implementation("com.mikepenz:fastadapter:5.6.0")
|
|
||||||
implementation("com.mikepenz:fastadapter-extensions-diff:5.6.0")
|
|
||||||
implementation("com.mikepenz:fastadapter-extensions-binding:5.6.0")
|
|
||||||
implementation("com.mikepenz:fastadapter-extensions-paged:5.6.0")
|
|
||||||
|
|
||||||
// Coil
|
|
||||||
implementation 'io.coil-kt:coil:1.4.0'
|
|
||||||
implementation "io.coil-kt:coil-compose:1.4.0"
|
|
||||||
|
|
||||||
// OkHttps
|
|
||||||
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.3'
|
|
||||||
|
|
||||||
// RxJava
|
|
||||||
implementation 'io.reactivex.rxjava3:rxjava:3.1.3'
|
|
||||||
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
|
|
||||||
|
|
||||||
implementation 'me.zhanghai.android.fastscroll:library:1.1.7'
|
|
||||||
|
|
||||||
// LibSu
|
|
||||||
implementation 'com.github.topjohnwu.libsu:core:3.1.2'
|
|
||||||
|
|
||||||
// JackSon
|
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-core:2.13.1'
|
|
||||||
|
|
||||||
// Markdown
|
|
||||||
implementation "org.jetbrains:markdown:0.2.4"
|
|
||||||
|
|
||||||
// Coroutines / Lifecycle
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
|
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0'
|
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0'
|
|
||||||
|
|
||||||
// Paging
|
|
||||||
implementation 'androidx.paging:paging-runtime-ktx:3.1.0'
|
|
||||||
|
|
||||||
// Room
|
|
||||||
implementation 'androidx.room:room-runtime:2.4.2'
|
|
||||||
implementation 'androidx.room:room-ktx:2.4.2'
|
|
||||||
implementation 'androidx.room:room-rxjava3:2.4.2'
|
|
||||||
kapt 'androidx.room:room-compiler:2.4.2'
|
|
||||||
|
|
||||||
// Compose
|
|
||||||
implementation "androidx.compose.runtime:runtime:1.2.0-alpha04"
|
|
||||||
implementation "androidx.compose.ui:ui:1.2.0-alpha04"
|
|
||||||
implementation "androidx.compose.ui:ui-tooling:1.2.0-alpha04"
|
|
||||||
implementation "androidx.compose.foundation:foundation:1.2.0-alpha04"
|
|
||||||
implementation "androidx.compose.runtime:runtime-livedata:1.2.0-alpha04"
|
|
||||||
implementation "androidx.compose.material3:material3:1.0.0-alpha06"
|
|
||||||
implementation "androidx.compose.material:material:1.2.0-alpha04"
|
|
||||||
implementation "com.google.android.material:compose-theme-adapter:1.1.5"
|
|
||||||
}
|
|
||||||
|
|
||||||
// using a task as a preBuild dependency instead of a function that takes some time insures that it runs
|
|
||||||
task detectAndroidLocals {
|
|
||||||
Set<String> langsList = new HashSet<>()
|
|
||||||
|
|
||||||
// in /res are (almost) all languages that have a translated string is saved. this is safer and saves some time
|
|
||||||
fileTree("src/main/res").visit { FileVisitDetails details ->
|
|
||||||
if (details.file.path.endsWith("strings.xml")
|
|
||||||
&& details.file.canonicalFile.getText('UTF-8').contains("<string")) {
|
|
||||||
def languageCode = details.file.parentFile.name.replace("values-", "")
|
|
||||||
languageCode = (languageCode == "values") ? "en" : languageCode
|
|
||||||
langsList.add(languageCode)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
def langsListString = "{${langsList.collect { "\"${it}\"" }.join(",")}}"
|
|
||||||
android.defaultConfig.buildConfigField "String[]", "DETECTED_LOCALES", langsListString
|
|
||||||
}
|
|
||||||
preBuild.dependsOn detectAndroidLocals
|
|
@ -47,7 +47,7 @@ fun ProductRow(
|
|||||||
}
|
}
|
||||||
|
|
||||||
ExpandableCard(
|
ExpandableCard(
|
||||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp),
|
modifier = Modifier.padding(horizontal = 8.dp, vertical = 8.dp),
|
||||||
onClick = { onUserClick(item) },
|
onClick = { onUserClick(item) },
|
||||||
expandedContent = { ExpandedItemContent(item = item) }
|
expandedContent = { ExpandedItemContent(item = item) }
|
||||||
) {
|
) {
|
||||||
@ -57,17 +57,17 @@ fun ProductRow(
|
|||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
NetworkImage(
|
NetworkImage(
|
||||||
modifier = Modifier.size(56.dp),
|
modifier = Modifier.size(64.dp),
|
||||||
data = imageData
|
data = imageData
|
||||||
)
|
)
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.requiredHeight(56.dp)
|
modifier = Modifier.requiredHeight(64.dp)
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.fillMaxHeight(0.6f),
|
.fillMaxHeight(0.4f),
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = item.name,
|
text = item.name,
|
||||||
@ -88,7 +88,8 @@ fun ProductRow(
|
|||||||
modifier = Modifier.fillMaxHeight(),
|
modifier = Modifier.fillMaxHeight(),
|
||||||
text = item.summary,
|
text = item.summary,
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
maxLines = 2
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -118,19 +119,20 @@ fun ProductColumn(
|
|||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(4.dp)
|
.padding(4.dp)
|
||||||
.sizeIn(minWidth = 72.dp, minHeight = 96.dp, maxWidth = 110.dp)
|
.requiredSize(80.dp, 116.dp)
|
||||||
.clip(shape = RoundedCornerShape(8.dp))
|
.clip(shape = RoundedCornerShape(8.dp))
|
||||||
.background(color = MaterialTheme.colorScheme.surface)
|
.background(color = MaterialTheme.colorScheme.surface)
|
||||||
.clickable(onClick = { onUserClick(item) })
|
.clickable(onClick = { onUserClick(item) }),
|
||||||
.padding(4.dp),
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
horizontalAlignment = Alignment.CenterHorizontally
|
verticalArrangement = Arrangement.Center
|
||||||
) {
|
) {
|
||||||
NetworkImage(
|
NetworkImage(
|
||||||
modifier = Modifier.size(56.dp),
|
modifier = Modifier.size(64.dp),
|
||||||
data = imageData
|
data = imageData
|
||||||
)
|
)
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
|
modifier = Modifier.padding(4.dp, 2.dp),
|
||||||
text = item.name,
|
text = item.name,
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
@ -138,6 +140,7 @@ fun ProductColumn(
|
|||||||
)
|
)
|
||||||
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
|
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
|
||||||
Text(
|
Text(
|
||||||
|
modifier = Modifier.padding(4.dp, 1.dp),
|
||||||
text = item.version,
|
text = item.version,
|
||||||
style = MaterialTheme.typography.labelSmall,
|
style = MaterialTheme.typography.labelSmall,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user