android-edittext

Automatically passing focus betwen EditText

瘦欲@ 提交于 2019-12-11 05:39:04
问题 Since my question asking about separating characters that are typed in an EditText into groups or blocks didn't receive much attention, I've come here with another question on an alternative way to accomplish what I need. So, my idea is to have four EditText that have 4 char length. Now what I want is to change the focus as the user type, from an EdutText to another when the limit is reached. Example: Let's say we have EditText A, B, C, D; the first to gain focus is EditText A, then when the

Android- Help fixing Custom Alert Dialog with EditText

你说的曾经没有我的故事 提交于 2019-12-11 05:37:48
问题 Context : There is a custom Listview and each list item has a button in it. When you click the button an alertDialog appears with an edit text and submit button. This only happens on the first click, on subsequent clicks a Toast will simply appear with the number of times it has been clicked thus far. When you click the submit button a toast will appear displaying the text that was entered into the editText and the number of times they have clicked on it which will presumably always be 1

How to get the value from the listview

扶醉桌前 提交于 2019-12-11 05:30:09
问题 How to get the value from the ListView , i.e when an list item is clicked it sends the data from the ListView and set the value of ListView in an EditText . 回答1: Try this: listview.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Toast.makeText(<Your Class Name>.this, "posisiton: "+position+" "+"Id: "+id, Toast.LENGTH_SHORT).show(); } }); 回答2: Something like this: list.setOnItemSelectedListener(new

Change future text to bold in EditText in Android

空扰寡人 提交于 2019-12-11 05:16:55
问题 I am making a basic text editor app for Android and currently working on formatting the text. I have an EditText named text_area where the user types his text and a ToggleButton called bold that sets the text to bold. Initially, using the EditText.setTypeface method, all of the text in text_area would change to bold when the button is on. Using the answer provided in this question, I was able to change only the selected text to bold. What I really want to do though is that when the button is

dialog and edittext listener: crash at setEnabled

两盒软妹~` 提交于 2019-12-11 05:08:54
问题 Hello I am going crazy to understand where is the problem in this dialog. I am trying to create one dialog with inside an edittext .. If the edittext is empty the positive button must be disabled else enabled. I wrote this code. public class Example extends AlertDialog { AlertDialog.Builder builder; EditText mEditText; Context mContext; Button button; String text; protected Example(Context context) { super(context); // TODO Auto-generated constructor stub builder = new AlertDialog.Builder

Why my EditText view cannot bring up soft keyboard in Android even I force it to show?

岁酱吖の 提交于 2019-12-11 05:08:17
问题 I have an EditText view in a fragment and when showing that fragment, I need to let it get focus and the soft keyboard pops up to allow user type in directly, however, the EditText view seems can only get focus but not show the keyboard even though I manually force it to show. The user has to touch it to bring up the soft keyboard. I tried to get a minimum app to reproduce this, it's simply an activity with an EditText. Any idea? Activity package com.example.litaos.testeditview; import

How to hide auto show keyboard on layout gone

走远了吗. 提交于 2019-12-11 04:44:01
问题 i've a layout like: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@android:color/background_dark" android:weightSum="1" > <LinearLayout android:id="@+id/layout_splash" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_weight="0.3" >

How to get checkbox,EditText with ListView values in android while clicking a button?

妖精的绣舞 提交于 2019-12-11 04:37:33
问题 I m a new bee to Android world. I have a listview which has checkbox and EditText in it. When I display records in the listview, I will check the checkbox and enter text in the editText field. I will do in many rows in the same. I have a button called Save. Using this I want to save the details of listview with newly added text and checkbox value. I do not know how to get the values when i click the save button. Please guide me. Here is the code. main.xml: <?xml version="1.0" encoding="utf-8"

How to focus next edit text in listview

牧云@^-^@ 提交于 2019-12-11 04:36:23
问题 I have 2 EditText for each row in Listview. The rows maybe n numbers. I want to enter the value in 1st EditText in first row and then press next in soft keyboard. The focus should be go to 2nd EditText in 1st row. After than I will enter the value in 2nd EditText and press next in soft keyboard the focus should go to 2nd row 1st EditText. Herewith I attached my xml and adapter code. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

Soft keyboard not open in android [duplicate]

别等时光非礼了梦想. 提交于 2019-12-11 04:22:09
问题 This question already has answers here : Android: softkeyboard not showing up (5 answers) Closed 3 years ago . I am newbie to android and working on a demo app,In that i am having an activity contains an edittext at the top of the screen and want to show the keyboard on the start of that activity i have tried many ways but none of this works,Can anybudy help me to sort it ot? layout.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res