How to disable default scroll behavior of an EditText?

All we need is a simple explanation of the problem, which is provided below. The title of question might look similar to other questions but It’s not. I have several strange problem that I am not being able to solve it. I have a xml layout and the structure of that layout looks like below. … Read more

How can you listen to soft key events sent to a View with an InputConnection?

All we need is a simple explanation of the problem, which is provided below. I would like to create a custom text editor view in Android, with customizable key controls, meaning that I need to handle all software keyboard key events. To do this, I can extend View and override its onKeyDown event. However, I … Read more

Android EditText number pad keyboard with version like filter(TextWatcher)

All we need is a simple explanation of the problem, which is provided below. EditText should accept input like "1.0.1" means multiple "."s. and keyboard should be number pad(I know EditText‘s inputType should be numberDecimal). But numberDecimal only accepts single dot and the filter won’t work for this. How to solve this??? Let’s Solve it: … Read more

Custom drawable background for Android EditText

All we need is a simple explanation of the problem, which is provided below. I would like to create a custom drawable background for an EditText component in my Android layout. This should include a lower border spanning the entire length of the EditText, and 2 connected vertical lines at either end which take up … Read more

How can I specify the position of editText in CardView?

All we need is a simple explanation of the problem, which is provided below. <androidx.cardview.widget.CardView app:cardCornerRadius="5dp" app:cardElevation="8dp" android:layout_width="370dp" android:layout_height="450dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" android:descendantFocusability="beforeDescendants"> <EditText android:id="@+id/heightText" android:layout_width="140dp" android:layout_height="60dp" android:hint="Name" android:textAlignment="center" android:textStyle="bold" /> </androidx.cardview.widget.CardView> Here is the EditText code I placed inside the CardView. How can I change the location of the editText placed as in … Read more

set length character Emoji Edittext Android Kotlin

All we need is a simple explanation of the problem, which is provided below. i have 1 edittext maxLength = 30, but i can only type 6 character emoji dog => 1 emoji dog = 6 regular character. So please help me type 30 emoji dog. Thanks everyone. [enter image description here][1] Let’s Solve it: … Read more

EditText not showing the hint or the outline box until focused

All we need is a simple explanation of the problem, which is provided below. I saw that there are numerous threads raised on this topic but none of them seems to solve my issue. I have an EditText inside of InputLayout and it shows blank until focused. <com.google.android.material.textfield.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_marginTop="20dp" > <com.google.android.material.textfield.TextInputEditText android:id="@+id/etInput" … Read more

Animation yoyo keep run when typing Edittext

All we need is a simple explanation of the problem, which is provided below. when typing edit text yoyo animation keep run how to keep typing show animation Once ? text_send.addTextChangedListener(new TextWatcher() { @Override public void afterTextChanged(Editable s) {} @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void … Read more

How do I start typing my description box in EditText from the top line in Android Studio?

All we need is a simple explanation of the problem, which is provided below. I have added the picture to show that my current description box does not start from the first line when I start to type, how do I make it to start from the top left corner? <EditText android:id="@+id/et_message" android:layout_width="350dp" android:layout_height="150dp" android:layout_marginLeft="25dp" … Read more