alphamu / PinEntryEditText

An EditText that looks like a pin entry field. It is highly customisable and even animated text.
Apache License 2.0
670 stars 137 forks source link

Unable to align the text in the center of the box #61

Open sachin-varshney opened 5 years ago

amirmuhsin commented 3 years ago

Am I missing something? Tried to play with bottomPadding, drawablePadding, pinTextBottomPadding and even includeFontPadding.

   <com.alimuzaffar.lib.pin.PinEntryEditText
                android:id="@+id/etPinEntry"
                android:layout_width="match_parent"
                android:layout_height="48dp"
                android:layout_gravity="center"
                android:layout_marginTop="@dimen/medium_padding"
                android:cursorVisible="true"
                android:drawablePadding="@dimen/medium_padding"
                android:fontFamily="@font/sf_bold"
                android:imeOptions="actionDone"
                android:importantForAutofill="no"
                android:includeFontPadding="false"
                android:inputType="number"
                android:maxLength="5"
                android:paddingLeft="@dimen/very_small_padding"
                android:paddingRight="@dimen/very_small_padding"
                android:textAllCaps="true"
                android:textColor="@color/blueberry"
                android:textIsSelectable="false"
                android:textSize="28dp"
                app:pinAnimationType="none"
                app:pinBackgroundDrawable="@drawable/selector_pin_bg"
                app:pinBackgroundIsSquare="false"
                app:pinLineStroke="0dp"
                app:pinLineStrokeSelected="0dp"
                app:pinTextBottomPadding="10dp" />

photo_2020-12-07_09-59-15