java - editText.getText().toString() retrieves the String all uppercase -
i want edittext.gettext().tostring()
normal string inserted edittext instead i'm getting uppercase no matter what.
relevant xml:
<linearlayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > <textview android:id="@+id/first_name_id" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/first_name_text" android:textsize="20sp" /> <edittext android:id="@+id/first_name_edit_text_id" android:layout_width="wrap_content" android:layout_height="wrap_content" android:hint="@string/first_name_hint_text" /> </linearlayout>
relevant java:
sharedpreferences = preferencemanager.getdefaultsharedpreferences(this); sharedpreferenceseditor = sharedpreferences.edit(); signupbutton.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { final string firstname = sharedpreferences.getstring(first_name_key, ""); sharedpreferenceseditor.putstring(first_name_key, firstnameedittext.gettext().tostring()); sharedpreferenceseditor.apply(); signupbutton.settext(firstname); } });
the firstname
final
string variable uppercase. whys that? , how solve it?
is @ related problem? why button text forced caps on lollipop?
i try adding android:textallcaps="false"
button.
Comments
Post a Comment