Skip to main content

All Questions

Tagged with
0 votes
0 answers
33 views

Android: outer EditText border stroke

I'm using the following XML shape to add a coloured border to any EditText of my app to indicate it is focused: <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> ...
Diego Perez's user avatar
  • 2,588
1 vote
0 answers
281 views

EditText loses focus on text change even though I have not set it to lose focus

I'm a noob in Android Development, trying to learn it. The issue is that I have an edit text that appears upon clicking a button and gains focus and also opens up the keypad. I have used a TextWatcher ...
Mohamed Sulaimaan's user avatar
0 votes
0 answers
15 views

nextFocusDown won't show keyboard if next edittext inputType="textPassword"

<EditText android:id="@+id/account" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true&...
GHH's user avatar
  • 1,939
0 votes
2 answers
222 views

Android remove focus of TextEdit when Enter is pressed

I have some TextEdit inside a LinearLayout and I want to remove the cursor after I hit enter on them. Code <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:...
Andy's user avatar
  • 320
0 votes
1 answer
93 views

Android-Studio, EditText inside RecyclerView inside CustomDialog focus issue

I have a problem with the focus. Everytime I click in the EditText I can write 1 character and then it loses the focus. I´ve searched and I found some solutions if my EditText is inside a RecyclerView,...
Adrián Mon Maroto's user avatar
0 votes
1 answer
31 views

Second EditText Skipped

<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:...
FELIX XAVIER DHAS DEVA DHASON's user avatar
0 votes
1 answer
198 views

android EditText focus behavior [duplicate]

I thought this would be a simple thing to implement, but apparently not. I have a Fragment with 2 editTexts and 1 TextView. all have custom Drawables for background. Here's the behavior I'm looking ...
Fixitman Mike's user avatar
0 votes
1 answer
1k views

TextInputLayout clear focus when edittext is empty

I want to clear focus on TexInputLayout when editText is empty. How can I set that property on my app? when Application is running, the editText looks like: After I enter something the editText looks ...
Abdullah 's user avatar
0 votes
1 answer
47 views

EditText and Focus in Android Studio

I need to insert a focus shift from one editText to another editText after a certain logic in my application. example: in a credit card number editText have a listener when the length of the value ...
Fernando Amaral's user avatar
3 votes
0 answers
443 views

EditText loosing cursor focus inside ViewPager2

I have a simple ViewPager2 composed by 2 Fragment fragmentsList.add(new FakeFragment()); fragmentsList.add(new TextFragment()); viewPagerAdapter = new ViewPagerAdapter(this, ...
nicover 's user avatar
  • 2,418
0 votes
1 answer
25 views

How do I clear the focus on an editext? Other StackOverflow posts haven't helped much

I've looked at other StackOverflow posts, but many of them don't work, or the comments say that they don't work. I'm wondering how I can clear the focus on an edittext. I was hoping that when I close ...
ojbqa's user avatar
  • 27
0 votes
1 answer
115 views

Unable to show keyboard when returning to the same activity - PinEntryEditText

I followed this example (https://medium.com/@ali.muzaffar/building-a-pinentryedittext-in-android-5f2eddcae5d3) to create a PinEntryEditText in my app. What I want, is to display the keyboard every ...
Alec's user avatar
  • 347
0 votes
0 answers
73 views

Clear Focus of EditText when clicking on a button

Everyone, I would like to achieve the following in my Android App: I would like to create a view in which there are several input fields. An associated toolbar contains a save button. If I have ...
Vincent Kesel's user avatar
1 vote
2 answers
96 views

How to change the focus when user validate the EditText

in my case, the user have to give hours and mins, but I can't find how to give the focus to the mins whey I enter the hours with one caracter. The hours can be one or two caracters so I want to do ...
NeoKerd's user avatar
  • 219
2 votes
1 answer
2k views

Android - onFocusChange doesn't work the first time

When I touch an EditText I want my scrollView to scrolls some px. The problem is that it only works when I touch the respective EditText the second time and if the focus was on another editText. Here'...
Pedro Relvas's user avatar

15 30 50 per page
1
2 3 4 5
20