UI refresh on bluetooth list page
- xml layout clean up - add "Device name" preference, tapping will bring up rename dialog - Remove tap target from original device_name pref Merged-In: I6e9764dbb6c51f94be6d6a61d5a6401141407409 Change-Id: I9cb67cc557a9b932d7cf795a8d4a6fb5215c4365 Fix: 62890841 Fix: 62891178 Test: robotests
This commit is contained in:
@@ -24,6 +24,7 @@ import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -111,6 +112,9 @@ abstract class BluetoothNameDialogFragment extends InstrumentedDialogFragment
|
||||
new Utf8ByteLengthFilter(BLUETOOTH_NAME_MAX_LENGTH_BYTES)
|
||||
});
|
||||
mDeviceNameView.setText(deviceName); // set initial value before adding listener
|
||||
if (!TextUtils.isEmpty(deviceName)) {
|
||||
mDeviceNameView.setSelection(deviceName.length());
|
||||
}
|
||||
mDeviceNameView.addTextChangedListener(this);
|
||||
mDeviceNameView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user