Skip to content

Conversation

@scottyab
Copy link
Contributor

@scottyab scottyab commented Feb 23, 2021

I ran in a weird bug with TokenCompleteTextView.onRestoreInstanceState() and so ended up not wanting to use the restored objects in onRestoreInstanceState (we have the state in our viewmodel. However the even though I'm not using the prefix the setPrefix() in onRestoreInstanceState() the would clear the tokens I had already set in the TokenCompleteTextView in my activities onCreate(). Specifically when it called setText().

To resolve I've added the prefixEnabled property. This allows callers to disable the prefix behaviour and solve the issue I was seeing. However, there maybe an alternate way to solve this that doesn't involve and extra property. Open to suggestions.

Also, apologies for the additional formatting changes it seems my code formatter got carried away. I can correct this if there's approval for this PR to the merged.

import android.graphics.Typeface;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import androidx.annotation.NonNull;
import androidx.annotation.NonNull;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants