I just want the editText.getText().toString()
to get the normal String inserted to the EditText but instead I'm getting it all 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
which is a final
String variable is always uppercase.
Now whys that? and how do i solve it?