Skip to main content

Posts

Showing posts with the label android-edittext

android fragments edittext button focus

being new to android app development, I encounter a problem regarding the interaction of android fragments, edittexts, focus and buttons. I have one fragment activity with several tabs. Most tabs have one fragment each. But in one tab, I have a ListFragment and a fragment with edittexts and buttons, which I call edit fragment. When the user selects a list item, the content of the edit fragment is shown in the current tab. When trying to edit a text there, more precisely, when hitting a different key than the backspace key, the new char is not shown, but the first button below gets the focus. Why? And how can I avoid this behavior? Earlier, I had a different activity for the edit fragment and the editing worked perfectly. But for other reasons and because it is recommended, I have only one activity now. Thank you for help! The xml for project_details1: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.andr