Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

float:fletImeOptions="actionNext" doesn't work #25

Closed
nelo686 opened this issue Oct 17, 2014 · 6 comments
Closed

float:fletImeOptions="actionNext" doesn't work #25

nelo686 opened this issue Oct 17, 2014 · 6 comments

Comments

@nelo686
Copy link

nelo686 commented Oct 17, 2014

I'm not really sure if it's a problem or not, but I'm not be able to use actionNext properly in my xml. Here is the code I use, I tried different things but I wasn't successful.

    <!-- Email TextField -->
    <com.wrapp.floatlabelededittext.FloatLabeledEditText
        android:id="@+id/loginEmail"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="@dimen/login_box_top_margin"
        android:layout_marginLeft="@dimen/login_box_left_margin"
        android:layout_marginRight="@dimen/login_box_right_margin"
        float:fletHintTextColor="#333333"
        float:fletTextColor="#000000"
        float:fletFloatingHint="username"
        float:fletImeOptions="actionNext"
        float:fletSingleLine="true"/>

    <!-- Password TextField -->
    <com.wrapp.floatlabelededittext.FloatLabeledEditText
        android:id="@+id/loginPassword"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/login_box_left_margin"
        android:layout_marginRight="@dimen/login_box_right_margin"
        float:fletHintTextColor="#333333"
        float:fletTextColor="#000000"
        float:fletFloatingHint="Password"
        float:fletInputType="textPassword"/>

    <!-- Login Button -->
    <Button
        android:id="@+id/btnLogin"
        android:layout_width="230dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="15dp"
        android:layout_marginLeft="@dimen/login_box_left_margin"
        android:layout_marginRight="@dimen/login_box_right_margin"
        android:layout_marginBottom="@dimen/login_box_bottom_margin"
        android:text="@string/loginBtnLogin"
        android:textColor="#FFFFFF"/>

I will appreciate your support.
Thanks!

@wackytobaccy
Copy link

Why was this closed? I'm running into the same issue.

@heinrisch
Copy link
Contributor

This uses the old implementation which is deprecated. The same bug should not be present in the latest version.

@nelo686
Copy link
Author

nelo686 commented Nov 23, 2014

Yes, @heinrisch is right. With the last version you can implement it as an usual EditText. After many tries I found the code that works for me.

    <com.wrapp.floatlabelededittext.FloatLabeledEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/login_box_top_margin"
        android:layout_marginLeft="@dimen/login_box_left_margin"
        android:layout_marginRight="@dimen/login_box_right_margin"
        float:fletHintTextColor="#333333"
        float:fletTextColor="#000000">

        <EditText
            android:id="@+id/loginUser"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:hint="username"
            android:singleLine="true"
            android:inputType="text"
            android:nextFocusDown="@+id/loginPassword"/>
    </com.wrapp.floatlabelededittext.FloatLabeledEditText>`

Cheers!

@wackytobaccy
Copy link

@nelo686 Thank you, that worked! Curiously enough, the other lines you have:

        float:fletHintTextColor="#333333"
        float:fletTextColor="#000000">

Don't work for me (they aren't defined by the library). How do you change the EditText line color and floating label color (do I have to use NinePatch, or can it be done with this library)? I can change the actual entered text color by changing the textColor of the EditText, but this doesn't change the floating label color.

@heinrisch
Copy link
Contributor

Those two attributes are not supported. These are the new once: https://github.com/wrapp/floatlabelededittext/blob/master/library/res/values/attrs.xml
To style the hint text you have to define your own text style and apply it with fletTextAppearance.

The edit text is separate from the library now so any edittext styling is done as you normally would.

@nelo686
Copy link
Author

nelo686 commented Nov 24, 2014

@25cf I know, I did a couple of changes from the @heinrisch code. ;)

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

No branches or pull requests

3 participants