Show more graceful screens for "add network" flow
- use TableLayout instead of RelativeLayout for wifi configuration to align each columns appropriately. - split @id/type field into two fields in SetupWizard Bug: 3403168 Change-Id: I37f2c60ce1b0473af7d20dee1775e9893d2abade
This commit is contained in:
@@ -75,7 +75,7 @@ public class WifiConfigUiForSetupWizardXL implements WifiConfigUiBase, OnFocusCh
|
||||
|
||||
if (mView.findViewById(R.id.security_fields).getVisibility() == View.VISIBLE) {
|
||||
requestFocusAndShowKeyboard(R.id.password);
|
||||
} else if (mView.findViewById(R.id.type).getVisibility() == View.VISIBLE) {
|
||||
} else if (mView.findViewById(R.id.type_ssid).getVisibility() == View.VISIBLE) {
|
||||
// Add Network flow.
|
||||
requestFocusAndShowKeyboard(R.id.ssid);
|
||||
}
|
||||
@@ -93,12 +93,15 @@ public class WifiConfigUiForSetupWizardXL implements WifiConfigUiBase, OnFocusCh
|
||||
Log.w(TAG, "password field is not EditText");
|
||||
} else {
|
||||
if (viewToBeFocused.isFocused()) {
|
||||
mInputMethodManager.showSoftInput(viewToBeFocused, 0);
|
||||
Log.i(TAG, "Already focused");
|
||||
if (!mInputMethodManager.showSoftInput(viewToBeFocused, 0)) {
|
||||
Log.w(TAG, "Failed to show SoftInput");
|
||||
}
|
||||
} else {
|
||||
// After acquiring the focus, we show software keyboard.
|
||||
viewToBeFocused.setOnFocusChangeListener(this);
|
||||
final boolean requestFocusResult = viewToBeFocused.requestFocus();
|
||||
Log.i(TAG, String.format("Focus request %s.",
|
||||
Log.i(TAG, String.format("Focus request: %s",
|
||||
(requestFocusResult ? "successful" : "failed")));
|
||||
if (!requestFocusResult) {
|
||||
viewToBeFocused.setOnFocusChangeListener(null);
|
||||
|
Reference in New Issue
Block a user