浏览代码

[공통][Bug] layout 정리

hyodong.min 7 年之前
父节点
当前提交
046636fecc

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/manager/ActionBarManager.java

@@ -46,7 +46,7 @@ public class ActionBarManager {
     this.actionBar = actionBar;
 
     LayoutInflater inflater = LayoutInflater.from(activity);
-    View view = inflater.inflate(R.layout.sign_up_action_bar, null);
+    View view = inflater.inflate(R.layout.action_bar, null);
 
     actionBarTitle = view.findViewById(R.id.action_bar_title);
     progressBar = view.findViewById(R.id.progress_bar);

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/auth/MobileAuthorizationView.java

@@ -112,7 +112,7 @@ public class MobileAuthorizationView extends ConstraintLayout implements View.On
     inputMethodManager = (InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
 
     LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-    inflater.inflate(R.layout.sign_up_phone_authorization_view, this);
+    inflater.inflate(R.layout.sign_up_auth_view, this);
 
     View view = this;
 

+ 0 - 254
app/src/main/java/kr/co/zumo/app/lifeplus/view/dialog/PinDialog.java

@@ -1,254 +0,0 @@
-package kr.co.zumo.app.lifeplus.view.dialog;
-
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.annotation.StringRes;
-import android.support.v4.app.DialogFragment;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.WindowManager;
-import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-
-import io.reactivex.disposables.Disposable;
-import kr.co.zumo.app.R;
-import kr.co.zumo.app.lifeplus.view.Event;
-
-/**
- * PinDialog
- * <pre>
- * </pre>
- *
- * @author 하세미
- * @version 1.0
- * @history 하세미   [2018-09-13]   [최초 작성]
- * @since 2018-09-13
- */
-public class PinDialog extends DialogBase {
-
-  private ArrayList<Integer> numberList;
-  private ArrayList<Button> buttonList;
-  private ArrayList<ImageView> imageList;
-  private String password;
-  @StringRes
-  private int guideStringId = R.string.empty_string;
-  @StringRes
-  private int titleStringId = R.string.empty_string;
-
-  private TextView textGuide;
-  private TextView textTitle;
-  private Disposable disposable;
-  private Button buttonShuffle;
-  private Button buttonDelete;
-
-  public PinDialog() {
-  }
-
-  @Override
-  public void onCreate(Bundle savedInstanceState) {
-    setStyle(DialogFragment.STYLE_NO_TITLE, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
-    setStyle(DialogFragment.STYLE_NO_FRAME, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
-    super.onCreate(savedInstanceState);
-  }
-
-  @Override
-  public void onCancel(DialogInterface dialog) {
-    resultListener.onDialogCanceled(this);
-  }
-
-  /**
-   * 가이드 텍스트를 업데이트 한다.
-   *
-   * @param stringId
-   */
-  public void updateGuideText(@StringRes int stringId) {
-    guideStringId = stringId;
-
-    if (null != textGuide) {
-      textGuide.setText(guideStringId);
-    }
-  }
-
-  /**
-   * title 텍스트를 업데이트 한다.
-   *
-   * @param stringId
-   */
-  public void updateTitleText(@StringRes int stringId) {
-    titleStringId = stringId;
-
-    if (null != textTitle) {
-      textTitle.setText(titleStringId);
-    }
-  }
-
-  @Override
-  public void onDestroyView() {
-    super.onDestroyView();
-
-    if (null != disposable) {
-      disposable.dispose();
-      disposable = null;
-    }
-
-  }
-
-  @Nullable
-  @Override
-  public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
-
-    password = "";
-
-    getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
-
-    View view = inflater.inflate(R.layout.password_dialog, container, false);
-
-    buttonShuffle = view.findViewById(R.id.button_shuffle);
-    buttonDelete = view.findViewById(R.id.button_delete);
-    textGuide = view.findViewById(R.id.text_guide);
-    textTitle = view.findViewById(R.id.text_title);
-
-    if (R.string.empty_string != guideStringId) {
-      textGuide.setText(guideStringId);
-    }
-
-    if (R.string.empty_string != titleStringId) {
-      textTitle.setText(titleStringId);
-    }
-
-    numberList = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9));
-    buttonList = createButtonListFromView(view);
-    imageList = createImageListFromView(view);
-
-    buttonShuffle.setOnClickListener(v -> shuffleKeyboard());
-
-    buttonDelete.setOnClickListener(v -> doSomeAfterClickDeleteButton());
-
-    int size = buttonList.size();
-    for (int i = 0; i < size; ++i) {
-      buttonList.get(i).setOnClickListener(v -> doSomeAfterClickNumberButton(v));
-    }
-
-    shuffleKeyboard();
-
-    return view;
-  }
-
-  private ArrayList<Button> createButtonListFromView(View view) {
-    ArrayList<Button> list = new ArrayList<Button>();
-    list.add((Button) view.findViewById(R.id.button_0));
-    list.add((Button) view.findViewById(R.id.button_1));
-    list.add((Button) view.findViewById(R.id.button_2));
-    list.add((Button) view.findViewById(R.id.button_3));
-    list.add((Button) view.findViewById(R.id.button_4));
-    list.add((Button) view.findViewById(R.id.button_5));
-    list.add((Button) view.findViewById(R.id.button_6));
-    list.add((Button) view.findViewById(R.id.button_7));
-    list.add((Button) view.findViewById(R.id.button_8));
-    list.add((Button) view.findViewById(R.id.button_9));
-
-    return list;
-  }
-
-  private ArrayList<ImageView> createImageListFromView(View view) {
-    ArrayList<ImageView> list = new ArrayList<ImageView>();
-    list.add((ImageView) view.findViewById(R.id.image_pin_code1));
-    list.add((ImageView) view.findViewById(R.id.image_pin_code2));
-    list.add((ImageView) view.findViewById(R.id.image_pin_code3));
-    list.add((ImageView) view.findViewById(R.id.image_pin_code4));
-    return list;
-  }
-
-
-  private void shuffleKeyboard() {
-
-    Collections.shuffle(numberList);
-    int size = buttonList.size();
-
-    for (int i = 0; i < size; ++i) {
-      buttonList.get(i).setText(String.valueOf(numberList.get(i)));
-    }
-  }
-
-  private void doSomeAfterAllPinCode() {
-    String pin = password;
-    password = "";
-    resultListener.onDialogResult(this, new Event.Builder(Event.SUCCESS).string(pin).build());
-  }
-
-  private void doSomeAfterClickDeleteButton() {
-    if (password.length() == 0) {
-      return;
-    }
-
-    password = password.substring(0, password.length() - 1);
-    updateImageAfterPinInput();
-
-  }
-
-  private void doSomeAfterClickNumberButton(View view) {
-
-    int passwordSize = password.length();
-
-    if (passwordSize < 4) {
-      password += ((Button) view).getText().toString().charAt(0);
-
-      updateImageAfterPinInput();
-
-      passwordSize = password.length();
-      if (passwordSize == 4) {
-        Log.e("APP#  PinDialog | onClick", "|" + "if(password.length == 4)");
-        doSomeAfterAllPinCode();
-      }
-    }
-  }
-
-  private void updateImageAfterPinInput() {
-    int passwordSize = password.length();
-    for (int i = 0; i < imageList.size(); ++i) {
-      ImageView imageView = imageList.get(i);
-      if (i < passwordSize) {
-        imageView.setImageResource(R.drawable.circle_full);
-      }
-      else {
-        imageView.setImageResource(R.drawable.circle_empty);
-      }
-    }
-  }
-
-  @Override
-  public void setEnabled() {
-    setEnabled(true);
-  }
-
-  @Override
-  public void setDisabled() {
-    setEnabled(false);
-  }
-
-  @Override
-  public void restart() {
-    shuffleKeyboard();
-    updateImageAfterPinInput();
-    setEnabled(true);
-  }
-
-  private void setEnabled(boolean enabled) {
-    buttonDelete.setEnabled(enabled);
-    buttonShuffle.setEnabled(enabled);
-    for (Button button : buttonList) {
-      button.setEnabled(enabled);
-    }
-    for (ImageView imageView : imageList) {
-      imageView.setEnabled(enabled);
-    }
-  }
-}

+ 0 - 3
app/src/main/java/kr/co/zumo/app/lifeplus/view/dialog/factory/BasicDialogFactory.java

@@ -25,9 +25,6 @@ public class BasicDialogFactory implements IDialogFactory {
   public DialogBase getDialogById(@DialogID.ID int id) {
     DialogBase dialog;
     switch (id) {
-//      case DialogID.INPUT_PIN:
-//        dialog = new PinDialog();
-//        break;
       case DialogID.WEB:
         dialog = new WebDialog();
         break;

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/presenter/signup/SignUpMobileAuthorizationPresenter.java

@@ -152,7 +152,7 @@ public class SignUpMobileAuthorizationPresenter extends SignUpFragmentPresenter
       toast.setDuration(Toast.LENGTH_LONG);
       toast.setGravity(Gravity.FILL, 0, 0);
       LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-      View view = inflater.inflate(R.layout.sign_up_authorization_result_dialog, null);
+      View view = inflater.inflate(R.layout.sign_up_auth_result_dialog, null);
       ((TextView) view.findViewById(R.id.text_view_authorization_result_name)).setText(mobileAuthorizationBean.getName());
       ((TextView) view.findViewById(R.id.text_view_authorization_result_gender)).setText(mobileAuthorizationBean.getGender());
       ((TextView) view.findViewById(R.id.text_view_authorization_result_birth_date)).setText(

app/src/main/res/layout/sign_up_action_bar.xml → app/src/main/res/layout/action_bar.xml


+ 0 - 228
app/src/main/res/layout/password_dialog.xml

@@ -1,228 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout
-  xmlns:android="http://schemas.android.com/apk/res/android"
-  xmlns:app="http://schemas.android.com/apk/res-auto"
-  xmlns:tools="http://schemas.android.com/tools"
-  android:layout_width="match_parent"
-  android:layout_height="match_parent"
-  android:background="@color/CCCCCCC">
-
-  <LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_alignParentStart="true"
-    android:layout_alignParentTop="true"
-    android:layout_marginTop="30dp"
-    android:orientation="vertical">
-
-    <TextView
-      android:id="@+id/text_title"
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:textSize="30dp"
-      android:layout_centerInParent="true"
-      android:textColor="@color/C000000"
-      tools:text="@string/sign_up_register_pin_title"
-      android:textAlignment="center"
-      />
-    <Space
-      android:layout_width="match_parent"
-      android:layout_height="30dp"/>
-    <TextView
-      android:id="@+id/text_guide"
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:layout_centerInParent="true"
-      android:textColor="@color/C000000"
-      tools:text="@string/sign_up_register_pin"
-      android:textAlignment="center"
-      />
-  </LinearLayout>
-
-  <LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="80dp"
-    android:layout_alignParentStart="true"
-    android:layout_alignParentTop="true"
-    android:layout_marginTop="120dp"
-    android:gravity="center"
-    android:orientation="horizontal"
-    >
-
-    <ImageView
-      android:id="@+id/image_pin_code1"
-      android:layout_width="20dp"
-      android:layout_height="20dp"
-      android:layout_marginLeft="5dp"
-      android:layout_marginRight="5dp"
-      android:src="@drawable/circle_empty"
-      />
-
-    <ImageView
-      android:id="@+id/image_pin_code2"
-      android:layout_width="20dp"
-      android:layout_height="20dp"
-      android:layout_marginLeft="5dp"
-      android:layout_marginRight="5dp"
-      android:src="@drawable/circle_empty"
-      />
-
-    <ImageView
-      android:id="@+id/image_pin_code3"
-      android:layout_width="20dp"
-      android:layout_height="20dp"
-      android:layout_marginLeft="5dp"
-      android:layout_marginRight="5dp"
-      android:src="@drawable/circle_empty"
-      />
-
-    <ImageView
-      android:id="@+id/image_pin_code4"
-      android:layout_width="20dp"
-      android:layout_height="20dp"
-      android:layout_marginLeft="5dp"
-      android:layout_marginRight="5dp"
-      android:src="@drawable/circle_empty"
-      />
-
-  </LinearLayout>
-
-  <LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_alignParentBottom="true"
-    android:orientation="vertical"
-
-    >
-
-    <LinearLayout
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:layout_gravity="bottom"
-      android:orientation="horizontal"
-      android:weightSum="3"
-      >
-
-      <Button
-        android:id="@+id/button_0"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-
-      <Button
-        android:id="@+id/button_1"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-
-      <Button
-        android:id="@+id/button_2"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-    </LinearLayout>
-
-    <LinearLayout
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:layout_gravity="bottom"
-      android:orientation="horizontal"
-      android:weightSum="3"
-      >
-
-      <Button
-        android:id="@+id/button_3"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-
-      <Button
-        android:id="@+id/button_4"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-
-      <Button
-        android:id="@+id/button_5"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-    </LinearLayout>
-
-    <LinearLayout
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:layout_gravity="bottom"
-      android:orientation="horizontal"
-      android:weightSum="3"
-      >
-
-      <Button
-        android:id="@+id/button_6"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-
-      <Button
-        android:id="@+id/button_7"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-
-      <Button
-        android:id="@+id/button_8"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-    </LinearLayout>
-
-    <LinearLayout
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:orientation="horizontal"
-      android:weightSum="3"
-      >
-
-      <Button
-        android:id="@+id/button_shuffle"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:text="@string/sign_up_shuffle"/>
-
-      <Button
-        android:id="@+id/button_9"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        tools:text="1"
-        />
-
-      <Button
-        android:id="@+id/button_delete"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:text="x"
-        />
-    </LinearLayout>
-  </LinearLayout>
-</RelativeLayout>

app/src/main/res/layout/sign_up_authorization_result_dialog.xml → app/src/main/res/layout/sign_up_auth_result_dialog.xml


app/src/main/res/layout/sign_up_phone_authorization_view.xml → app/src/main/res/layout/sign_up_auth_view.xml


+ 0 - 20
app/src/main/res/layout/sign_up_text_view.xml

@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
-  xmlns:android="http://schemas.android.com/apk/res/android"
-  xmlns:tools="http://schemas.android.com/tools"
-  android:layout_width="wrap_content"
-  android:layout_height="wrap_content">
-
-  <TextView
-    android:id="@+id/sign_up_text_view"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:maxWidth="200dp"
-    android:layout_marginRight="20dp"
-    android:layout_marginLeft="20dp"
-    android:layout_marginTop="20dp"
-    android:layout_marginBottom="20dp"
-    android:background="@color/CCCCCCC"
-    tools:text="text"/>
-
-</LinearLayout>