Commit d33967d5972f78ee8671b48d024a8c61b77f8746

Authored by YangShuai
1 parent c7d05606

1 修复更改音箱名称点击默认可以点击保存按钮的问题

config.gradle
@@ -21,7 +21,7 @@ ext { @@ -21,7 +21,7 @@ ext {
21 //编译方式 21 //编译方式
22 debug : false, 22 debug : false,
23 //版本号 23 //版本号
24 - version: "0.1.21", 24 + version: "0.1.22",
25 //Lib库前缀 25 //Lib库前缀
26 packeg : "com.cnlive.module", 26 packeg : "com.cnlive.module",
27 //Lib库名称 27 //Lib库名称
module_xiaojiaSoundBox/src/main/java/com/cnlive/strike/xiaojiaspeaker/frame/view/ChangeDeviceNameView.java
@@ -24,6 +24,7 @@ public class ChangeDeviceNameView implements MvpView { @@ -24,6 +24,7 @@ public class ChangeDeviceNameView implements MvpView {
24 } 24 }
25 25
26 public void initView(String deviceId) { 26 public void initView(String deviceId) {
  27 + setBtnCantClick();
27 this.deviceId = deviceId; 28 this.deviceId = deviceId;
28 //编辑框 29 //编辑框
29 fragment.binding.etName.addTextChangedListener(new TextWatcher() { 30 fragment.binding.etName.addTextChangedListener(new TextWatcher() {
@@ -77,6 +78,7 @@ public class ChangeDeviceNameView implements MvpView { @@ -77,6 +78,7 @@ public class ChangeDeviceNameView implements MvpView {
77 */ 78 */
78 private void setBtnCantClick() { 79 private void setBtnCantClick() {
79 fragment.binding.btnNext.setClickable(false); 80 fragment.binding.btnNext.setClickable(false);
  81 + fragment.binding.btnNext.setFocusable(false);
80 fragment.binding.btnNext.setBackground(ContextCompat.getDrawable(getContext(), R.drawable.shape_xiaojia_btn_press)); 82 fragment.binding.btnNext.setBackground(ContextCompat.getDrawable(getContext(), R.drawable.shape_xiaojia_btn_press));
81 } 83 }
82 84
@@ -85,6 +87,7 @@ public class ChangeDeviceNameView implements MvpView { @@ -85,6 +87,7 @@ public class ChangeDeviceNameView implements MvpView {
85 */ 87 */
86 private void setBtnClick() { 88 private void setBtnClick() {
87 fragment.binding.btnNext.setClickable(true); 89 fragment.binding.btnNext.setClickable(true);
  90 + fragment.binding.btnNext.setFocusable(true);
88 fragment.binding.btnNext.setBackground(ContextCompat.getDrawable(getContext(), R.drawable.selector_xiaojia_btn_green)); 91 fragment.binding.btnNext.setBackground(ContextCompat.getDrawable(getContext(), R.drawable.selector_xiaojia_btn_green));
89 } 92 }
90 } 93 }