Code Monkey home page Code Monkey logo

jetpack_compose_country_code_picker's People

Contributors

hbmartin avatar kalayciokan avatar togisoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jetpack_compose_country_code_picker's Issues

CAnt change text color

Is your feature request related to a problem? Please describe.
I'm not able to change the text color. It is black by default

Describe the solution you'd like
Any type of documentation would be helpful.

Describe alternatives you've considered
an option to change the textColorDefault, textColorError, textColorSuccess

Additional context
NIL

I cannot set TextField to according to my design.

I really liked this library but in my latest project I need to use it as text field that have single line not rounded border. I am unable to add Single line like

`

TextField(
value = password.value,
colors = TextFieldDefaults.textFieldColors(
backgroundColor = Color.White,
focusedIndicatorColor = brc_green_color,
cursorColor = brc_green_color,
disabledPlaceholderColor = brc_green_color,
unfocusedIndicatorColor = brc_green_color
),
onValueChange = {
if (passwordErrorState.value) {
passwordErrorState.value = false
}
password.value = it
},
isError = passwordErrorState.value,
modifier = Modifier.fillMaxWidth(),
label = {
Text(text = "Enter Password*")
},
trailingIcon = {
IconButton(onClick = {
passwordVisibility.value = !passwordVisibility.value
}) {

                }
            },
            visualTransformation = if (passwordVisibility.value) PasswordVisualTransformation() else VisualTransformation.None
        )

`

I want to use exactly like above text-field. can anyone help?

error

java.lang.NoSuchMethodError: No direct method (ZZLandroidx/compose/ui/window/SecureFlagPolicy;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V in class Landroidx/compose/ui/window/DialogProperties; or its super classes (declaration of 'androidx.compose.ui.window.DialogProperties' appears in /data/app/com.example.bikiya-9aKEJDChoFqll2l-k0MTTg==/base.apk)
at com.togitech.ccp.component.TogiCodePicker.TogiCodeDialog-9JTe1hw(TogiCodePicker.kt:98)

there is a problem with the dialog I think

Problem with material3

@togisoft Hello. I found the one more problem and I can explain what's going on in this. The app will crash at the time of selecting the country whenever Someone is using material-3 in their project. I am using material-3 and the dialog will not open instated app will throw an exception. Please check on this and help me to fix this issue. This is the one of the most Helpful library for those who are using jetpack-compose and wanted to use country picker.

Crash-Logs.

ava.lang.NoSuchMethodError: No direct method (ZZLandroidx/compose/ui/window/SecureFlagPolicy;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V in class Landroidx/compose/ui/window/DialogProperties; or its super classes (declaration of 'androidx.compose.ui.window.DialogProperties' appears in /data/app/~~W3R3pVvbD-MhAj1UnTZmXw==/com.biblereadingcommunity.android-a9Mz9NlveUtxGFYZ-_W3Ug==/base.apk!classes2.dex)
com.togitech.ccp.component.TogiCodePicker.TogiCodeDialog-9JTe1hw(TogiCodePicker.kt:98)
com.togitech.ccp.component.TogiCodePicker$TogiCodeDialog$5.invoke(:23)
com.togitech.ccp.component.TogiCodePicker$TogiCodeDialog$5.invoke(:8)
androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:145)
androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2375)
androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2643)
androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3260)
androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3238)
androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(:1)
androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3238)
androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3203)
androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:771)
androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1031)
androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:125)
androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:534)
androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:503)
androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34)
androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
android.view.Choreographer.doCallbacks(Choreographer.java:796)
android.view.Choreographer.doFrame(Choreographer.java:727)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
android.os.Handler.handleCallback(Handler.java:938)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:223)
android.app.ActivityThread.main(ActivityThread.java:7701)
java.lang.reflect.Method.invoke(Method.java:0)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

I am sure it is happening because of material-3 and I can't remove material-3 from my project.

Crashing app at the time of picking country code. (Only happening in android android 8.1.0)

Process: com.biblereadingcommunity.android, PID: 8039
java.util.NoSuchElementException: Collection contains no element matching the predicate.
at com.togitech.ccp.data.utils.TogiUtilsKt.getDefaultPhoneCode(TogiUtils.kt:42)
at com.biblereadingcommunity.android.loginAndRegister.LoginBRC$onCreate$1$2$phoneCode$2.invoke(LoginBRC.kt:239)
at com.biblereadingcommunity.android.loginAndRegister.LoginBRC$onCreate$1$2$phoneCode$2.invoke(LoginBRC.kt:239)
at androidx.compose.runtime.saveable.RememberSaveableKt.rememberSaveable(RememberSaveable.kt:87)
at com.biblereadingcommunity.android.loginAndRegister.LoginBRC$onCreate$1.invoke(LoginBRC.kt:239)
at com.biblereadingcommunity.android.loginAndRegister.LoginBRC$onCreate$1.invoke(LoginBRC.kt:184)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:402)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:248)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:247)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:177)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:123)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:122)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:114)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:157)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:156)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:156)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:140)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:74)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3186)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3176)
at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:252)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3176)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3112)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:573)
2022-11-11 11:18:06.981 8039-8039 AndroidRuntime pid-8039 E at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:811)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:508)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:140)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:998)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:131)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:182)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:360)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.java:202)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:138)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)
at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1085)
at android.view.View.dispatchAttachedToWindow(View.java:17453)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3329)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3336)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3336)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3336)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3336)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1696)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1420)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6835)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6626)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)

App is crashing on this line...
var phoneCode by rememberSaveable { mutableStateOf(getDefaultPhoneCode(context)) }

South Korea Hint Error

I'm currently living in South Korea, and the texthint should come out as 010-0000-0000, but there seems to be an issue that comes out as -2000-0000.

Library version 1.1.4

Device Samsung s8+
Android version 9

Support more customization of styling and colors, or split the code into smaller composables

Is your feature request related to a problem? Please describe.
The text field and dialog use hardcoded some colors, font size, font family and padding. It would be great to provide more options to be able to customize those.

Describe the solution you'd like
More options to specify styling for various pieces of the UI.

Alternatively, each composable can be broken down into smaller composables more, so that we can pick and choose which ones we can use, or supply a child composable to be used. E.g. SearchTextField is private and there is no way to customize it at all, other than to copy the code for TogiCodeDialog and make the changes.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Add night mode support

Please add night support to TextField .
add textfieldcolor parameter to TogiCountryCodePicker

remove default padding

would you please remove the default padding from the text field or will you give the option to change the default padding?

add text color implementation, cant be used with dark mode

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

APP crashed when i click on flag

when i click on the flag icon in the textfield my application crashes showing the error below:

java.lang.NoSuchMethodError: No direct method (ZZLandroidx/compose/ui/window/SecureFlagPolicy;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V in class Landroidx/compose/ui/window/DialogProperties; or its super classes (declaration of 'androidx.compose.ui.window.DialogProperties' appears in /data/data/com.scud.scuddriver/code_cache/.overlay/base.apk/classes15.dex)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.