|
|
@@ -1,77 +0,0 @@
|
|
|
-package kr.co.zumo.app.lifeplus.view.dialog;
|
|
|
-
|
|
|
-import android.os.Bundle;
|
|
|
-import android.support.annotation.NonNull;
|
|
|
-import android.support.annotation.Nullable;
|
|
|
-import android.view.Gravity;
|
|
|
-import android.view.LayoutInflater;
|
|
|
-import android.view.View;
|
|
|
-import android.view.ViewGroup;
|
|
|
-import android.view.Window;
|
|
|
-import android.view.WindowManager;
|
|
|
-import android.widget.TextView;
|
|
|
-
|
|
|
-import kr.co.zumo.app.R;
|
|
|
-import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
-
|
|
|
-/**
|
|
|
- * AddRegistrationDialog
|
|
|
- * <pre>
|
|
|
- * 회원 가입 직후 메인 진입시 추가 등록 토스트 팝업 구현
|
|
|
- * </pre>
|
|
|
- *
|
|
|
- * @author 하세미
|
|
|
- * @version 1.0
|
|
|
- * @history 하세미 [2018-09-20] [최초 작성]
|
|
|
- * @since 2018-09-20
|
|
|
- */
|
|
|
-public class AddRegistrationDialog extends DialogBase<ICustomDialogListener<AddRegistrationDialog>> implements View.OnClickListener {
|
|
|
-
|
|
|
- public AddRegistrationDialog() {
|
|
|
- }
|
|
|
-
|
|
|
- @Nullable
|
|
|
- @Override
|
|
|
- public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
- return inflater.inflate(R.layout.add_registration_dialog, container, false);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- protected void onActivityCreatedInternal() {
|
|
|
- Window window = getDialog().getWindow();
|
|
|
- window.setBackgroundDrawableResource(android.R.color.transparent);
|
|
|
-
|
|
|
- getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
|
|
- getDialog().getWindow().setGravity(Gravity.BOTTOM);
|
|
|
-
|
|
|
- View view = getView();
|
|
|
- TextView buttonAddEmail = (TextView) view.findViewById(R.id.button_add_email);
|
|
|
- TextView buttonAddSpecialCode = (TextView) view.findViewById(R.id.button_add_special_code);
|
|
|
-
|
|
|
- buttonAddEmail.setOnClickListener(this::onClick);
|
|
|
- buttonAddSpecialCode.setOnClickListener(this::onClick);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onClick(View view) {
|
|
|
- switch (view.getId()) {
|
|
|
- case R.id.button_add_email:
|
|
|
- if (null != getCustomListener()) {
|
|
|
- getCustomListener().onDialogResult(this, new Event.Builder(Event.EMAIL_CLICK).build());
|
|
|
- }
|
|
|
- break;
|
|
|
- case R.id.button_add_special_code:
|
|
|
- if (null != getCustomListener()) {
|
|
|
- getCustomListener().onDialogResult(this, new Event.Builder(Event.SPECIAL_CODE_CLICK).build());
|
|
|
- }
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|