From 74c341e427223d1b4dabe9ed8888390dfcef835d Mon Sep 17 00:00:00 2001 From: Stevan Medic Date: Tue, 9 May 2023 17:14:23 +0200 Subject: [PATCH 1/4] Added options to style text better Fixed paddings Added basic french translations --- .idea/compiler.xml | 2 +- .idea/gradle.xml | 2 +- .idea/kotlinc.xml | 6 +++++ .idea/misc.xml | 2 +- .../java/com/togitech/togii/MainActivity.kt | 10 ++++++- .../togitech/ccp/component/TogiCodePicker.kt | 23 +++++++++------- .../ccp/component/TogiCountryCodePicker.kt | 26 ++++++++++++++++--- ccp/src/main/res/values-fr/strings.xml | 7 +++++ 8 files changed, 62 insertions(+), 16 deletions(-) create mode 100644 .idea/kotlinc.xml create mode 100644 ccp/src/main/res/values-fr/strings.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml index fb7f4a8..b589d56 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 2567ed1..371f4e1 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -7,7 +7,7 @@ - + diff --git a/app/build.gradle b/app/build.gradle index b507a5e..3d2a02d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -44,16 +44,19 @@ android { excludes += '/META-INF/{AL2.0,LGPL2.1}' } } + namespace 'com.togitech.togii' } dependencies { - implementation "androidx.core:core-ktx:$core_ktx_version" - implementation "androidx.compose.ui:ui:$compose_version" - implementation "androidx.compose.material:material:$compose_version" - implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" + implementation platform('androidx.compose:compose-bom:2022.10.00') + implementation 'androidx.compose.ui:ui' + implementation 'androidx.compose.material:material:1.4.3' + implementation 'androidx.compose.ui:ui-tooling-preview' + + implementation 'androidx.core:core-ktx:1.10.0' implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" - implementation "androidx.activity:activity-compose:$activity_compose_version" + implementation 'androidx.activity:activity-compose:1.7.1' implementation 'com.google.accompanist:accompanist-systemuicontroller:0.29.1-alpha' implementation project(path: ':ccp') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c42fc78..4fbadff 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + - + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 9eb5a07..cd0519b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,5 +20,4 @@ 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 -android.disableAutomaticComponentCreation=true \ No newline at end of file +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e2623f8..7287995 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Apr 14 12:41:17 CEST 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME From e93a3c495b694bd6c5dc803e7363d1ddff10d9e1 Mon Sep 17 00:00:00 2001 From: Stevan Medic Date: Wed, 10 May 2023 02:12:09 +0200 Subject: [PATCH 4/4] Added check for phone number validity --- .../java/com/togitech/ccp/component/TogiCountryCodePicker.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ccp/src/main/java/com/togitech/ccp/component/TogiCountryCodePicker.kt b/ccp/src/main/java/com/togitech/ccp/component/TogiCountryCodePicker.kt index 1020255..d1461fe 100644 --- a/ccp/src/main/java/com/togitech/ccp/component/TogiCountryCodePicker.kt +++ b/ccp/src/main/java/com/togitech/ccp/component/TogiCountryCodePicker.kt @@ -1,5 +1,6 @@ package com.togitech.ccp.component +import android.util.Log import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.KeyboardActions @@ -113,6 +114,7 @@ fun TogiCountryCodePicker( textFieldValue = it if (text != it) { onValueChange(it) + isPhoneNumber() } }, singleLine = true,