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

Not working with EditText #78

Open
arundaskv opened this issue Oct 6, 2016 · 1 comment
Open

Not working with EditText #78

arundaskv opened this issue Oct 6, 2016 · 1 comment

Comments

@arundaskv
Copy link

arundaskv commented Oct 6, 2016

Tried to use this with Edittext, since Edittext is extended from TextView, it is expected that the working will be fine. Any help ?
I need the same functionality to Views like EditText, RadioButton, CheckBox etc. Can you help me out!
Note : Working well with Buttons

@amicloud
Copy link

amicloud commented Nov 3, 2016

It works fine for me with EditText. Do you have maxLines set to anything? It's been a bit since I messed around with this and I can't check right now, but IIRC you must have maxLines set in order for AutoFit to do anything (makes sense).

Here is an EditText that I have working successfully in one of my apps. Please note, I always use AutoFitTextView by using the AutofitHelper.create(view) method, I do not use the custom view.

Hopefully you aren't still having this problem since this was asked 28 days ago, but if you are I hope that this helps.

<EditText
                android:id="@+id/player1Name"
                android:layout_width="0dp"
                android:layout_height="fill_parent"
                android:layout_margin="1dp"
                android:layout_weight="5"
                android:clickable="true"
                android:enabled="true"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:gravity="center"
                android:hint="@string/playerOne"
                android:lines="1"
                android:longClickable="false"
                android:maxLength="20"
                android:maxLines="1"
                android:padding="0dp"
                android:textColor="@color/material_white"
                android:textColorHint="@color/material_accent"
                android:textSize="20sp"
                android:theme="@style/AppTheme.TransparentCursorBackground" />

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

2 participants