private void updateServerConfiguration() { EditText hostEditText = (EditText) SettingsViewerFragment.this.mFormView.findViewById(R.id.editTextHost); ServerConfiguration.getInstance().setHost(hostEditText.getText().toString()); EditText portEditText = (EditText) SettingsViewerFragment.this.mFormView.findViewById(R.id.editTextPort); ServerConfiguration.getInstance().setPort(Integer.parseInt(portEditText.getText().toString())); EditText pathEditText = (EditText) SettingsViewerFragment.this.mFormView.findViewById(R.id.editTextPath); ServerConfiguration.getInstance().setPath(pathEditText.getText().toString()); EditText userEditText = (EditText) SettingsViewerFragment.this.mFormView.findViewById(R.id.editTextUser); ServerConfiguration.getInstance().setUsername(userEditText.getText().toString()); EditText passEditText = (EditText) SettingsViewerFragment.this.mFormView.findViewById(R.id.editTextPass); ServerConfiguration.getInstance().setPassword(passEditText.getText().toString()); }
private void updateContent() { TextView hostTextView = (TextView) this.mFormView.findViewById(R.id.textViewHost); EditText hostEditText = (EditText) this.mFormView.findViewById(R.id.editTextHost); hostEditText.setText(ServerConfiguration.getInstance().getHost()); TextView portTextView = (TextView) this.mFormView.findViewById(R.id.textViewPort); EditText portEditText = (EditText) this.mFormView.findViewById(R.id.editTextPort); portEditText.setText(ServerConfiguration.getInstance().getPort() + ""); TextView pathTextView = (TextView) this.mFormView.findViewById(R.id.textViewPath); EditText pathEditText = (EditText) this.mFormView.findViewById(R.id.editTextPath); pathEditText.setText(ServerConfiguration.getInstance().getPath()); TextView userTextView = (TextView) this.mFormView.findViewById(R.id.textViewUser); EditText usernameEditText = (EditText) this.mFormView.findViewById(R.id.editTextUser); usernameEditText.setText(ServerConfiguration.getInstance().getUsername()); TextView passTextView = (TextView) this.mFormView.findViewById(R.id.textViewPass); EditText passwordEditText = (EditText) this.mFormView.findViewById(R.id.editTextPass); passwordEditText.setText(ServerConfiguration.getInstance().getPassword()); TextView httpsTextView = (TextView) this.mFormView.findViewById(R.id.textViewHttps); Spinner feedbackSpinner = (Spinner) this.mFormView.findViewById(R.id.spinnerHttps); }