From 8b58691246ddea3cb775e2091ce85dc3252206fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Sat, 7 Apr 2018 17:23:23 +0200 Subject: [PATCH] Default server settings removed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now when you configure a new server connection the input boxes will appear clean instead of with default garbage. Signed-off-by: Óscar García Amor --- .../ultrasonic/fragment/ServerSettingsFragment.java | 10 +++++----- ultrasonic/src/main/res/xml/server_settings.xml | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/ServerSettingsFragment.java b/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/ServerSettingsFragment.java index 536e6fc4..ccc01852 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/ServerSettingsFragment.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/ServerSettingsFragment.java @@ -193,20 +193,20 @@ public class ServerSettingsFragment extends PreferenceFragment private void updatePassword() { serverPasswordPref.setText(sharedPreferences - .getString(Constants.PREFERENCES_KEY_PASSWORD + serverId, "***")); - serverPasswordPref.setSummary("***"); + .getString(Constants.PREFERENCES_KEY_PASSWORD + serverId, + "")); } private void updateUsername() { serverUsernamePref.setText(sharedPreferences .getString(Constants.PREFERENCES_KEY_USERNAME + serverId, - getString(R.string.settings_server_username))); + "")); } private void updateUrl() { final String serverUrl = sharedPreferences .getString(Constants.PREFERENCES_KEY_SERVER_URL + serverId, - getString(R.string.settings_server_address_unset)); + "http://"); serverUrlPref.setText(serverUrl); serverUrlPref.setSummary(serverUrl); } @@ -214,7 +214,7 @@ public class ServerSettingsFragment extends PreferenceFragment private void updateName() { final String serverName = sharedPreferences .getString(Constants.PREFERENCES_KEY_SERVER_NAME + serverId, - getString(R.string.settings_server_unused)); + ""); serverNamePref.setText(serverName); serverNamePref.setSummary(serverName); } diff --git a/ultrasonic/src/main/res/xml/server_settings.xml b/ultrasonic/src/main/res/xml/server_settings.xml index 46ea55dd..6990d52a 100644 --- a/ultrasonic/src/main/res/xml/server_settings.xml +++ b/ultrasonic/src/main/res/xml/server_settings.xml @@ -29,7 +29,6 @@ android:key="@string/settings.server_password" android:persistent="false" android:inputType="textPassword" - android:summary="***" android:title="@string/settings.server_password" />