android-edittext

Prevent EditText from focussing after rotation

雨燕双飞 提交于 2019-12-07 10:00:28
问题 I've implemented a simple EditText that provides a Done button to hide the keyboard and upon rotating to landscape it does not present a full screen dialog for the EditText. But there's a problem. When I tap Done to dismiss the keyboard then I rotate the device to landscape, the keyboard appears. If I dismiss it again then rotate to portrait the keyboard appears yet again. How can I preserve the keyboard visibility state upon rotation - if it was hidden before rotation then don't present it

select some text in the edittext on drag

若如初见. 提交于 2019-12-07 09:48:26
问题 I want to select some text in the edittext,but I do not know how to do it. I need such method: when the user touch the screen then drag and off the screen,the text that dragged will be selected.(my English is poor,so do not mind it,thanks) textView = (EditText) findViewById(R.id.textvie1); InputStream inputStream=getResources().openRawResource(value+0x7f040000); String string = reader.getString(inputStream);textView.setMovementMethod(new ScrollingMovementMethod()); textView.setText(string);

EditTexts inside ExpandableListView

…衆ロ難τιáo~ 提交于 2019-12-07 09:46:29
问题 Hi I'm trying to make an activity that displays an ExpandableListView as shown in the figure. When you click on the group it expands and shows a LinearLayout with a textview and an editext. Right know the problem I have is that when a click on the EditText it doesn't get focus and I have to tap twice on it in order to make it get focus and display the keyboard, and then when I enter text I see nothing initially while I'm typing and then when I hide the Keyboard the EditText is updated with

EditText TextChangeListener issue

我的未来我决定 提交于 2019-12-07 07:58:59
问题 I have an edit text meant for searching purpose. I have added searchET.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { // TODO Auto-generated method stub } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { // TODO Auto-generated method stub } @Override public void afterTextChanged(Editable s) { // TODO Auto-generated method stub //intent to another page where i show my

Is possible to change the summary of EditTextPreference dynamically in Android?

隐身守侯 提交于 2019-12-07 07:32:51
问题 I set up a preferenceScreen to edit the settings in my application. I would like to insert an EditTextPreference that contains a Title like "set your name" and a summary containing the name entered. Is that possible? thank you in advance! 回答1: Sure, here is a short example: EditTextPreference etp = (EditTextPreference) findPreference("the_pref_key"); etp.setSummary("New summary"); This requires that you display your preferences either from a PreferenceActivity or from a PreferenceFragment ,

EditText in TextInputLayout lagging

。_饼干妹妹 提交于 2019-12-07 07:23:54
问题 I have two views using TextInputLayout . The first one is a login view which has only 2 input fields and the second one is a register view which has many input fields. I am using TextInputLayout and EditText / AppCompatEditText with custom themes for my inputs. The problem is, when i click on my EditText 's in my Register screen i get a kind of lag/spikes on the default TextInputLayout animation. I don't get the lag in my LoginScreen but the code I'm using is quite the same, so i suppose the

adMob banner covers text view when soft keyboard pops up

允我心安 提交于 2019-12-07 06:43:17
问题 I have been having troubles keeping an adMob banner from rolling up along the soft keyboard and covering my text views.... This is the link to what I am trying to achieve in Android: http://bit.ly/myfoodcalc I know my layout is a little bit complex, too many nested views (maybe), etc. I have tryed changing things on the Manifest without success. For you to understand it better here is son pseudo XML (and the full XML later on the post)... <ScrollView> <Linear layout> <ImageView> <TableView>

android EditText lagging when typing text

[亡魂溺海] 提交于 2019-12-07 04:42:34
问题 Im developing some sort of chat application, all goes wellm but im stuck with one problem. EditText lags, my android keyboard gets freezed on second or some whenever I type some letter in edittext. O din't really know what code to provide, because it's just a simple EditText box. Here's how i make it: linforbutton.add(new LinearLayout(this)); //linear layout on the bottom os creen for edittext and button RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.FILL

EditText does not accept digits as input

允我心安 提交于 2019-12-07 04:38:02
问题 The EditText view with id="price" has an inputType="numberDecimal" that does not accept any digits but will only accept one decimal point. The other EditText view with id="store" has no inputType set but has two issues. If the view has no input then entering a digit from the keyboard doesn't do anything. The only way to have a digit be accepted is if it immediately follows either a letter or another digit. I am using the default Android keyboard. The layout is being inflated in the

Scrollview inside a viewpager fragment doesnt scroll when keyboard is shown

本小妞迷上赌 提交于 2019-12-07 04:25:03
问题 I have an activity which has a layout content as follows: <?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.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:minHeight="?attr/actionBarSize" style="