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

SomeTimes hint text not showing #34

Open
matghazaryan opened this issue Dec 13, 2014 · 7 comments
Open

SomeTimes hint text not showing #34

matghazaryan opened this issue Dec 13, 2014 · 7 comments

Comments

@matghazaryan
Copy link

screenshot 2014-12-13 17 23 19

When I try to write something and hide keyboard the hint not showing. Could you please fix this issue?

For example if we set text input type as password and background as shape.
Here is my code

  <com.wrapp.floatlabelededittext.FloatLabeledEditText
        android:layout_width="match_parent"
        android:layout_height="@dimen/activity_edit_text_height"
        android:layout_marginBottom="@dimen/activity_small_margin"
        android:background="@drawable/edit_text_bg"
        float:fletPadding="5dp">

        <EditText
            android:id="@+id/login_email"
            android:inputType="textEmailAddress"
            android:gravity="bottom"
            android:layout_gravity="bottom"
            android:hint="@string/your_email_address"
            style="@style/ncv_edit_text_style"/>
    </com.wrapp.floatlabelededittext.FloatLabeledEditText>

    <com.wrapp.floatlabelededittext.FloatLabeledEditText
        android:layout_width="match_parent"
        android:layout_height="@dimen/activity_edit_text_height"
        android:background="@drawable/edit_text_bg"
        float:fletPadding="5dp">

        <EditText
            android:id="@+id/login_password"
            android:inputType="textPassword"
            android:hint="@string/password"
            android:gravity="bottom"
            android:imeOptions="actionDone"
            android:layout_gravity="bottom"
            style="@style/ncv_edit_text_style"/>
    </com.wrapp.floatlabelededittext.FloatLabeledEditText>

style.xml <style name="ncv_edit_text_style">
match_parent
@dimen/activity_edit_text_height
@color/text_color_black
@color/text_color_black
@dimen/activity_text_size_small
@drawable/edit_text_bg
@dimen/activity_edit_text_inner_padding
@dimen/activity_edit_text_inner_padding
@dimen/activity_edit_text_inner_padding
bottom
</style>

edit_text_bg

<solid android:color="@color/ncv_edit_text_solid_color"/>
@stepango
Copy link

Same behaviour with password fields and/or custom background. Partially fixed by using standard android animations instead of NineOldAndroid.

@PsyGik
Copy link

PsyGik commented Jan 2, 2015

+1. Bug found using this layout also:

<com.wrapp.floatlabelededittext.FloatLabeledEditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Username" />
</com.wrapp.floatlabelededittext.FloatLabeledEditText>

Steps to reproduce:
1.Open keyboard
2.Enter some text
3.Hide keyboard

device-2015-01-02-155040
device-2015-01-02-155102
The Hint disappears.

@heinrisch
Copy link
Contributor

I am not able to reproduce this, it might be something like this: http://stackoverflow.com/questions/17994263/edittext-gettext-tostring-sometimes-returns

Could you try replacing:
setShowHint(!TextUtils.isEmpty(s));
with
setShowHint(!TextUtils.isEmpty(mEditText.getText()));?

@philipesteiff
Copy link

Hint disappear when close keyboard.

 <com.wrapp.floatlabelededittext.FloatLabeledEditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <EditText
                    android:id="@+id/edit_food_creation_total_fats"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="@dimen/vertical_space_small"
                    android:hint="@string/total_fat_text"
                    android:inputType="numberDecimal"
                    android:textColorHint="@color/edit_text_hint_color_dark" />

 </com.wrapp.floatlabelededittext.FloatLabeledEditText>

@philipesteiff
Copy link

When I use setText() on onCreate, hint text not showing too :/

@dsanchezbsf
Copy link

Same here, and I cant access to the setShowHint(boolean)

@mathieudebrito
Copy link

+1

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

7 participants