maksim88 / passwordedittext Goto Github PK
View Code? Open in Web Editor NEWA custom EditText with a switchable icon which shows or hides the password
Home Page: http://maksim88.github.io/PasswordEditText/
License: MIT License
A custom EditText with a switchable icon which shows or hides the password
Home Page: http://maksim88.github.io/PasswordEditText/
License: MIT License
I am using PasswordEditText under TextInputLayout. Here it is my part of code.
`<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<com.maksim88.passwordedittext.PasswordEditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:fontFamily="sans-serif"
android:hint="Password"
android:drawableLeft="@drawable/ic_key"
android:inputType="textPassword"
android:padding="8dp"
android:textSize="18sp"
android:typeface="normal"
/>
</android.support.design.widget.TextInputLayout>`
Hi!, first for all, thanks for answer,
I have a PasswordEditText with an "Info" icon that opens a modal with special information.
Is there any configuration that I can use two show both icons (info and pass reveal) together?
Have a nice day!
Let the user decide whether the button to show/hide the password is toggleable ( state saved)
or the password is just shown when the user holds the button and disappears when the finger leaves the screen.
I went in and check your PasswordEditText class. It imports import android.support.design.widget.TextInputEditText;
which is not resolvable. I thought it's supposed to be android.support.design.widget.TextInputEditText
instead?
More of the stacktrace:
E/AndroidRuntime: FATAL EXCEPTION: main
android.view.InflateException: Binary XML file line #73: Error inflating class com.maksim88.passwordedittext.PasswordEditText
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:757)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.inflate(CalligraphyLayoutInflater.java:60)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
Hi! Great library. The Edit Text styling isn't 'materialized' on devices running KitKat though.
Hi!, first for all, thanks for answer,
I have a PasswordEditText with an "Info" icon that opens a modal with special information.
Is there any configuration that I can use two show both icons (info and pass reveal) together?
Have a nice day!
You should not use generic names for your attributes as this simply may conflict with other existing libs (yes, these shall be fixed too). Make it unique like by adding pet_
prefix to it or so.
Before clicking on the icon the show/hide the password, the PasswordEditText
and TextInputLayout
work as expected and is able to show an error. However after clicking on the icon TextInputLayout.setError("error")
doesn't work anymore.
Due to:
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState savedState = (SavedState) state;
super.onRestoreInstanceState(savedState.getSuperState());
passwordVisible = savedState.isShowingIcon();
handlePasswordInputVisibility();
showPasswordVisibilityIndicator(true);
}
When switching between fragments that has the PasswordEditText, the indicator is always shown even if there is no text in the EditText.
A solution would be to comment this line out.
@maksim88 It's possible to use inputtype like numberpassword on PasswordEditText, i've tried that, but it dind't works!
every time after switching show/hide status, one paste action is triggered. I'm not sure whether this is a common issue.
the temp solution is to add android:longClickable="false" for edittext.
Hi Maksim,
I really liked your Password Text Field, but i got a problem using it, once I have called the method setError("some error message"), the show/hide icon, becomes invisible, do you have any idea how to fix that?
Thanks, and congratulations for this project.
The repo is polluted by .idea/
folders that should not be here, but worse, your library also provides ic_launcher
files, conflicting with any app that tries to incorporate your PasswordEditText
While I understand this may be a bit painful, I suggest to flag this library as obsolete visible way, (i.e. by adding more info in README) as same feature is now provided by TextInputLayout
.
The point here is that abandoning non-standard libs in favors of standard ones is beneficial for everyone (but author of the former :). And since I do not expect you to work on your lib much, it'd be nice to tell the potential users that this dependency can be avoided in favor of standard libs.
Anyway, thanks for the lib I was using for so long :)
Could you help me with a problem?
I'm trying to publish an library test build to jitpack, but I didn't figure out what's going wrong, I got the error: No releases found. Try a commit or -SNAPSHOT
Do you know how can I manage this.
(Yeah, I know, this is not a PasswordEditText related question, but I would be glad if you could help me)
i think like in subject, when open ex. log activity, password should be hidden.
i add two lines into your project:
141 passwordVisible = true;
142 togglePasswordIconVisibility();
When I first used it, it was ok but now, it creating a problem in Rendering.
First I thought it might be problem In Studio 2.3 beta version. But after debugging it more, I got the issue.
As I removed this lib. everything works fine now. I think there must be some issue in library. Please check it.
drawableLeft and drawablePadding will dismiss when input value.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.