diff --git a/.gitignore b/.gitignore index 050d011..bdd7259 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ .externalNativeBuild .cxx local.properties +*/release diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..607c7b0 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,30 @@ + + + + + + + Home + + + +
+

KvColorPalette-Android Mobile

+
+

App Version: 2025.1.0

+
+
+ +
+
+ + + \ No newline at end of file diff --git a/docs/privacy-policy.html b/docs/privacy-policy.html new file mode 100644 index 0000000..3f6ae3b --- /dev/null +++ b/docs/privacy-policy.html @@ -0,0 +1,148 @@ + + + + + + Privacy Policy + + + + +
+
+

Privacy Policy

+

+ KvApps built the KvColorPalette-Android library and app as a Free app. This service is + provided by KvApps at no cost and is intended for use as is. This is publishing as Open source project. +

+

+ This page is used to inform visitors regarding my policies with the collection, use, and disclosure of + Personal Information if anyone decided to use my Service. +

+

+ If you choose to use my Service, then you agree to the collection and use of information in relation to this + policy. + The Personal Information that I collect is used for providing and improving the Service. I will not use or + share + your information with anyone except as described in this Privacy Policy. +

+

+ The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are + accessible at + KvColorPalette unless otherwise defined in this Privacy Policy. +

+
+ +

Data/Information Collection and Use

+

+ As a reference application for KvColorPalette-Android library this app is not collecting any kind of data from the user. +

+ +
+ +

Log Data

+

+ I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and + information. This Log Data may include information such as your device Internet Protocol (“IP”) address, + device name, operating system version, the configuration of the app when utilizing my Service, the time and + date of your use of the Service, and other statistics. +

+
+ +

Cookies

+

+ Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These + are sent to your browser from the + websites that you visit and are stored on your device's internal memory. +

+

+ This Service does not use these “cookies” explicitly. However, the app may use third-party code and + libraries that use “cookies” to collect + information and improve their services. You have the option to either accept or refuse these cookies and + know when a cookie is being sent to your device. If you + choose to refuse our cookies, you may not be able to use some portions of this Service. +

+
+ +

Service Providers

+

+ I may employ third-party companies and individuals due to the following reasons: +

+ +

+ I want to inform users of this Service that these third parties have access to their Personal Information. + The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose + or use the information for any other purpose. +

+
+ +

Security

+

+ I value your trust in providing us your Personal Information, thus we are striving to use commercially + acceptable means of protecting it. But remember that no method of transmission over the internet, + or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security. +

+
+ +

Links to Other Sites

+

+ This Service may contain links to other sites. If you click on a third-party link, you will be directed to + that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review + the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, + privacy policies, or practices of any third-party sites or services. +

+
+ +

Children’s Privacy

+
+

+ These Services do not address anyone under the age of 13. I do not knowingly collect personally + identifiable information from children under 13 years of age. In the case + I discover that a child under 13 has provided me with personal information, I immediately delete this + from our servers. If you are a parent or guardian, and you are aware that your child has provided us with + personal information, please contact me so that I will be able to do the necessary actions. +

+
+
+ +

Changes to This Privacy Policy

+

+ I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically + for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. +

+

This policy is effective as of 2025-05-02

+
+ +

Contact Us

+

+ If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at kavimalw@gmail.com. or Contact-US +

+
+ +
+ + + \ No newline at end of file diff --git a/docs/static/css/styles.css b/docs/static/css/styles.css new file mode 100644 index 0000000..b41e020 --- /dev/null +++ b/docs/static/css/styles.css @@ -0,0 +1,161 @@ +body { + font-family: 'Verdana', sans-serif; + margin: 0; + padding: 1em; +} + +h1 { + text-align: center; + color: #2196F3; + margin: 0px 0px 30px 0px; +} + +h2 { + text-align: start; + color: #2196F3; + margin: 10px 30px; +} + +p { + margin: 20px 30px; + text-align: justify; + text-justify: distribute-all-lines; +} + +ul { + margin: 20px 30px 20px 20px; +} + +.container { + display: grid; + grid-template-columns: 2fr 1fr; +} + +.content { + grid-column: 1 / 2; + padding: 40px 20px 40px 20px; + border-width: 1px; /* width of the border */ + border-style: solid; /* style of the border */ + border-color: #2196F3; + border-radius: 10px; /* round the border with 10px radius */ +} + +.content-center { + display: flex; + align-items: center; /* Vertically center the content */ + justify-content: center; /* Horizontally center the content (optional) */ +} + +.content-end { + grid-column: 2 / 3; + padding: 0px 0px 0px 20px; +} + +.menu { + grid-column: 2 / 3; +} + +.grid-container { + display: grid; + margin: 20px 30px; + grid-template-columns: repeat(3, 1fr); + grid-auto-rows: minmax(100px, auto); + justify-content: space-evenly; + justify-items: center; + align-content: space-evenly; + align-items: center; +} + +.img-background { + padding: 20px; + background-color: #2196F3; + border-radius: 20px; +} + +.caption-text { + color: #2196F3; + text-align: justify; + text-justify: distribute-all-lines; +} + +nav { + background-color: #f5f5f5; /* background color of the nav container */ + padding: 15px; /* padding around the container */ + margin: 0px 20px; +} + +nav ul { + list-style: none; /* remove bullet points from list items */ + margin: 0; /* remove margins from the list */ + padding: 0; /* remove padding from the list */ + text-align: start; /* center the list items */ +} + +nav a { + color: #333; /* text color of the links */ + text-decoration: none; /* remove underline from the links */ + font-size: 18px; /* font size of the links */ +} + +nav a:hover { + color: #0099cc; /* change the text color on hover */ +} + +.footer-content { + padding: 10px 0px 10px 0px; +} + +.footer-para { + text-align: center; +} + +/* Style inputs with type="text", select elements and textareas */ +input[type=text], select, textarea { + width: 100%; /* Full width */ + padding: 12px; /* Some padding */ + border: 1px solid #ccc; /* Gray border */ + border-radius: 4px; /* Rounded borders */ + box-sizing: border-box; /* Make sure that padding and width stays in place */ + margin-top: 6px; /* Add a top margin */ + margin-bottom: 16px; /* Bottom margin */ + resize: vertical /* Allow the user to vertically resize the textarea (not horizontally) */ +} + +/* Style the submit button with a specific background color etc */ +input[type=submit] { + background-color: #2196F3; + color: white; + padding: 12px 20px; + border: none; + border-radius: 4px; + cursor: pointer; +} + +/* When moving the mouse over the submit button, add a darker green color */ +input[type=submit]:hover { + background-color: #45a049; +} + +.contact-info { + display: flex; + flex-direction: column; + gap: 20px; +} + +.info-item { + display: flex; + align-items: center; +} + +.icon { + font-size: 32px; + margin-right: 20px; +} + +.info-item span { + font-size: 24px; +} + +.info-item strong { + font-weight: bold; +} diff --git a/docs/static/favicon.ico b/docs/static/favicon.ico new file mode 100644 index 0000000..c1b9298 Binary files /dev/null and b/docs/static/favicon.ico differ diff --git a/gradle.properties b/gradle.properties index 20e2a01..c36041d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,4 +20,9 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true + +# App Properties +appVersionCode = 20250506 +appVersionName = 2025.1.0 +kvColorPaletteApplicationId = com.kavi.droid.color.palette.app \ No newline at end of file diff --git a/ui-app/build.gradle.kts b/ui-app/build.gradle.kts index 4953bf3..6f13078 100644 --- a/ui-app/build.gradle.kts +++ b/ui-app/build.gradle.kts @@ -5,27 +5,30 @@ plugins { alias(libs.plugins.kotlin.serialization) } +// App Properties +val appVersionCode: String by project +val appVersionName: String by project +val kvColorPaletteApplicationId: String by project + android { - namespace = "com.kavi.droid.color.palette.app" + namespace = kvColorPaletteApplicationId compileSdk = libs.versions.compilerSdkVersion.get().toInt() defaultConfig { - applicationId = "com.kavi.droid.color.palette.app" + applicationId = kvColorPaletteApplicationId minSdk = libs.versions.minSdkVersion.get().toInt() targetSdk = libs.versions.targetSdkVersion.get().toInt() - versionCode = 1 - versionName = "1.0" + versionCode = appVersionCode.toInt() + versionName = appVersionName testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) + isMinifyEnabled = true + isDebuggable = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") } } compileOptions { diff --git a/ui-app/proguard-rules.pro b/ui-app/proguard-rules.pro index 481bb43..86dc136 100644 --- a/ui-app/proguard-rules.pro +++ b/ui-app/proguard-rules.pro @@ -18,4 +18,20 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +# Keep `Companion` object fields of serializable classes. +# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects. +-if @kotlinx.serialization.Serializable class ** +-keepclassmembers class <1> { + static <1>$Companion Companion; +} + +# Keep `serializer()` on companion objects (both default and named) of serializable classes. +-if @kotlinx.serialization.Serializable class ** { + static **$* *; +} +-keepclassmembers class <2>$<3> { + kotlinx.serialization.KSerializer serializer(...); +} + diff --git a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/common/ThemeCommonComposable.kt b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/common/ThemeCommonComposable.kt index 488425e..8127424 100644 --- a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/common/ThemeCommonComposable.kt +++ b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/common/ThemeCommonComposable.kt @@ -3,6 +3,7 @@ package com.kavi.droid.color.palette.app.ui.common import androidx.compose.foundation.Canvas import androidx.compose.foundation.background import androidx.compose.foundation.border +import androidx.compose.foundation.horizontalScroll import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -13,6 +14,8 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.material3.MaterialTheme @@ -67,7 +70,8 @@ fun ThemeColorRow(givenColor: Color) { elevation = 10.dp, shape = RoundedCornerShape(8.dp) ) - .background(Color.White), + .background(Color.White) + .wrapContentWidth(), verticalAlignment = Alignment.CenterVertically ) { Box (modifier = Modifier @@ -86,8 +90,8 @@ fun ThemeColorRow(givenColor: Color) { ) } - Column(modifier = Modifier - .fillMaxWidth(), + Column(modifier = Modifier, + //.fillMaxWidth(), verticalArrangement = Arrangement.Center, ) { val appThemeColorSet = KvColorPalette.instance.generateThemeColorSchemePalette( @@ -98,9 +102,8 @@ fun ThemeColorRow(givenColor: Color) { Row( modifier = Modifier - .fillMaxWidth() - .padding(top = 4.dp, start = 8.dp, end = 8.dp, bottom = 4.dp), - //horizontalArrangement = Arrangement.Center + .padding(top = 4.dp, start = 8.dp, end = 16.dp, bottom = 4.dp) + .horizontalScroll(rememberScrollState()), ) { ColorCircle(appThemeColorSet.lightColorScheme.primary, colorLetter = "P") ColorCircle(appThemeColorSet.lightColorScheme.secondary, colorLetter = "S") @@ -113,9 +116,8 @@ fun ThemeColorRow(givenColor: Color) { Row( modifier = Modifier - .fillMaxWidth() - .padding(top = 4.dp, start = 8.dp, end = 8.dp, bottom = 4.dp), - //horizontalArrangement = Arrangement.Center + .padding(top = 4.dp, start = 8.dp, end = 16.dp, bottom = 4.dp) + .horizontalScroll(rememberScrollState()), ) { ColorCircle(appThemeColorSet.darkColorScheme.primary, colorLetter = "P") ColorCircle(appThemeColorSet.darkColorScheme.secondary, colorLetter = "S", letterColor = Color.Black) diff --git a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/AlphaPalettePager.kt b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/AlphaPalettePager.kt index d419059..a1168ec 100644 --- a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/AlphaPalettePager.kt +++ b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/AlphaPalettePager.kt @@ -14,6 +14,7 @@ import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview @@ -51,6 +52,7 @@ fun AlphaPalettePager() { modifier = Modifier .fillMaxWidth() .padding(top = 8.dp, start = 16.dp, end = 16.dp, bottom = 8.dp), + horizontalAlignment = Alignment.CenterHorizontally ) { AlphaPaletteColorRow(givenColor = MatPackage.MatRed, selectedColor = selectedColor) { color -> selectedColor = color } AlphaPaletteColorRow(givenColor = MatPackage.MatRose, selectedColor = selectedColor) { color -> selectedColor = color } diff --git a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/LightnessPalettePager.kt b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/LightnessPalettePager.kt index 9e8c9c8..be2d491 100644 --- a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/LightnessPalettePager.kt +++ b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/LightnessPalettePager.kt @@ -13,6 +13,7 @@ import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview @@ -50,6 +51,7 @@ fun LightnessPalettePager() { modifier = Modifier .fillMaxWidth() .padding(top = 8.dp, start = 16.dp, end = 16.dp, bottom = 8.dp), + horizontalAlignment = Alignment.CenterHorizontally ) { LightnessPaletteColorRow(givenColor = MatPackage.MatRed, selectedColor = selectedColor) { color -> selectedColor = color } LightnessPaletteColorRow(givenColor = MatPackage.MatRose, selectedColor = selectedColor) { color -> selectedColor = color } diff --git a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/PalettePager.kt b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/PalettePager.kt index 58859df..cc1ec75 100644 --- a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/PalettePager.kt +++ b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/PalettePager.kt @@ -13,6 +13,7 @@ import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp @@ -49,6 +50,7 @@ fun PalettePager() { modifier = Modifier .fillMaxWidth() .padding(top = 8.dp, start = 16.dp, end = 16.dp, bottom = 8.dp), + horizontalAlignment = Alignment.CenterHorizontally ) { PaletteColorRow(givenColor = MatPackage.MatRed, selectedColor = selectedColor) { color -> selectedColor = color } PaletteColorRow(givenColor = MatPackage.MatRose, selectedColor = selectedColor) { color -> selectedColor = color } diff --git a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/SaturationPalettePager.kt b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/SaturationPalettePager.kt index a7a3658..184be86 100644 --- a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/SaturationPalettePager.kt +++ b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/palette/pager/SaturationPalettePager.kt @@ -13,6 +13,7 @@ import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview @@ -50,6 +51,7 @@ fun SaturationPalettePager() { modifier = Modifier .fillMaxWidth() .padding(top = 8.dp, start = 16.dp, end = 16.dp, bottom = 8.dp), + horizontalAlignment = Alignment.CenterHorizontally ) { SaturationPaletteColorRow(givenColor = MatPackage.MatRed, selectedColor = selectedColor) { color -> selectedColor = color } SaturationPaletteColorRow(givenColor = MatPackage.MatRose, selectedColor = selectedColor) { color -> selectedColor = color } diff --git a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/theme/ThemeColorGenTab.kt b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/theme/ThemeColorGenTab.kt index ac3bac1..5c088c2 100644 --- a/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/theme/ThemeColorGenTab.kt +++ b/ui-app/src/main/kotlin/com/kavi/droid/color/palette/app/ui/dashboard/theme/ThemeColorGenTab.kt @@ -47,7 +47,8 @@ fun ThemeColorGenTab(navController: NavHostController, modifier: Modifier) { modifier = Modifier .fillMaxWidth() .fillMaxHeight() - .verticalScroll(rememberScrollState()) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally ) { ThemeColorRow(MatPackage.MatRed.color) ThemeColorRow(MatPackage.MatOrange.color)