邀请码弹窗提醒
@@ -16,10 +16,14 @@ import com.sleepbot.datetimepicker.time.TimePickerDialog;
|
||||
import com.trello.rxlifecycle3.android.FragmentEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseFragment;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.auth.entity.ThirdUserInfo;
|
||||
import com.yizhuan.xchat_android_core.initial.InitialModel;
|
||||
import com.yizhuan.xchat_android_core.initial.bean.InitInfo;
|
||||
import com.yizhuan.xchat_android_core.linked.LinkedModel;
|
||||
import com.yizhuan.xchat_android_core.linked.bean.LinkedInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
@@ -77,6 +81,7 @@ public class AddUserInfoFragment extends BaseFragment
|
||||
tvRandomNick.setOnClickListener(this);
|
||||
addWXUserInfo();
|
||||
addInviteCodeInfo();
|
||||
InitialModel.get().init(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +129,27 @@ public class AddUserInfoFragment extends BaseFragment
|
||||
toast("必须要选性别哦");
|
||||
return;
|
||||
}
|
||||
commit(tvNick.getText().toString().trim(), avatarUrl, gender, tvCode.getText() == null ? "" : tvCode.getText().toString().trim());
|
||||
InitInfo initInfo = InitialModel.get().getCacheInitInfo();
|
||||
if (initInfo != null && initInfo.isCheckInviteCode() && TextUtils.isEmpty(tvCode.getText())) {
|
||||
String message = "当前未填写邀请码哦~\n确认继续下一步吗?";
|
||||
getDialogManager().showOkCancelDialog(
|
||||
message,
|
||||
"确认",
|
||||
"取消",
|
||||
new DialogManager.OkCancelDialogListener() {
|
||||
@Override
|
||||
public void onCancel() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOk() {
|
||||
commit(tvNick.getText().toString().trim(), avatarUrl, gender, tvCode.getText() == null ? "" : tvCode.getText().toString().trim());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
commit(tvNick.getText().toString().trim(), avatarUrl, gender, tvCode.getText() == null ? "" : tvCode.getText().toString().trim());
|
||||
}
|
||||
break;
|
||||
case R.id.tv_random_nick:
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_INFORMATION_RANDOM_NAME,
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 14 KiB |
11
app/src/main/res/drawable/bg_common_disable_border.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/bg_disable_303043" />
|
||||
|
||||
<stroke android:color="#434368" android:width="1dp"/>
|
||||
|
||||
<corners android:radius="100dp" />
|
||||
|
||||
</shape>
|
@@ -89,7 +89,7 @@
|
||||
|
||||
<me.shihao.library.XRadioGroup
|
||||
android:id="@+id/rg_gender"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal"
|
||||
@@ -104,6 +104,11 @@
|
||||
android:background="@drawable/selector_radiobutton_gender_male"
|
||||
android:button="@null" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="1dp"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_female"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -115,22 +120,34 @@
|
||||
|
||||
</me.shihao.library.XRadioGroup>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_title_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="邀请码"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="@dimen/dp_18"
|
||||
app:layout_constraintStart_toStartOf="@id/view_code_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_code_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg_gender" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_code_bg"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bg_common_disable"
|
||||
android:background="@drawable/bg_common_disable_border"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg_gender" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_code_title_top" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="23dp"
|
||||
android:text="邀请码:"
|
||||
android:text="请输入邀请码"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="@dimen/dp_15"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_code_bg"
|
||||
@@ -162,14 +179,12 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/ok_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="270dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginStart="@dimen/login_btn_padding"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="@dimen/login_btn_padding"
|
||||
android:layout_marginTop="80dp"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:background="@drawable/bg_common_confirm"
|
||||
android:text="@string/done"
|
||||
android:text="下一步"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@@ -145,4 +145,6 @@ public class InitInfo implements Serializable {
|
||||
}
|
||||
|
||||
private List<Long> checkUids;
|
||||
|
||||
private boolean checkInviteCode;
|
||||
}
|
||||
|