Commit edad51b2 authored by linfeng's avatar linfeng

bug修改

parent d0cff159
...@@ -113,8 +113,6 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen ...@@ -113,8 +113,6 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) { protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle("个人资料"); titleView.setTitle("个人资料");
titleView.setText(R.id.tv_title_right, "保存"); titleView.setText(R.id.tv_title_right, "保存");
etNickname.addTextChangedListener(new MyTextWatcher(this, etNickname, 32));
titleView.setChildClickListener(R.id.tv_title_right, new View.OnClickListener() { titleView.setChildClickListener(R.id.tv_title_right, new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -133,7 +131,11 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen ...@@ -133,7 +131,11 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
if (info.getNickname() != null) { if (info.getNickname() != null) {
etNickname.setText(info.getNickname()); etNickname.setText(info.getNickname());
if (!TextUtils.isEmpty(info.getNickname())) { if (!TextUtils.isEmpty(info.getNickname())) {
etNickname.setSelection(info.getNickname().length()); if (info.getNickname().length() <= 32) {
etNickname.setSelection(info.getNickname().length());
} else {
etNickname.setSelection(32);
}
} }
} }
if (info.getRealname() != null) { if (info.getRealname() != null) {
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
android:background="@null" android:background="@null"
android:gravity="right|center_vertical" android:gravity="right|center_vertical"
android:hint="请输入昵称" android:hint="请输入昵称"
android:maxLength="32"
android:maxLines="1" android:maxLines="1"
android:textColor="@color/colorMain" android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray" android:textColorHint="@color/colorGray"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment