瀏覽代碼

[공통][Bug] 시스템 팝업 레이아웃 수정

hyodong.min 6 年之前
父節點
當前提交
9c74f7818e

+ 10 - 10
app/src/main/java/kr/co/zumo/app/lifeplus/bean/api/SystemPopupBean.java

@@ -53,9 +53,9 @@ public class SystemPopupBean extends JsonBeanBase {
   @SerializedName("expsEndDttm")
   private String displayTimeTo;   // 표시 종료 시간
   @SerializedName("allAplyYn")
-  private String allMenuAppling;   // 전체 메뉴에 적용 Y/N
+  private String allMenuApplying;   // 전체 메뉴에 적용 Y/N
   @SerializedName("cten")
-  private String description;
+  private String contents;
   @SerializedName("sysChckMenuList")
   private List<MenuIDBean> menuIdList;
 
@@ -91,20 +91,20 @@ public class SystemPopupBean extends JsonBeanBase {
     this.displayTimeTo = displayTimeTo;
   }
 
-  public String getAllMenuAppling() {
-    return allMenuAppling;
+  public String getAllMenuApplying() {
+    return allMenuApplying;
   }
 
-  public void setAllMenuAppling(String allMenuAppling) {
-    this.allMenuAppling = allMenuAppling;
+  public void setAllMenuApplying(String allMenuApplying) {
+    this.allMenuApplying = allMenuApplying;
   }
 
-  public String getDescription() {
-    return description;
+  public String getContents() {
+    return contents;
   }
 
-  public void setDescription(String description) {
-    this.description = description;
+  public void setContents(String contents) {
+    this.contents = contents;
   }
 
   public List<MenuIDBean> getMenuIdList() {

+ 4 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/common/IServiceCheckView.java

@@ -18,5 +18,8 @@ public interface IServiceCheckView extends IView {
 
   void setTitle(String title);
 
-  void setDescription(String description);
+  void setSubTitle(String subTitle);
+
+  void setContents(String contents);
+
 }

+ 46 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/common/ServiceCheckModel.java

@@ -1,8 +1,13 @@
 package kr.co.zumo.app.lifeplus.view.screen.common;
 
+import java.util.Calendar;
+
+import kr.co.zumo.app.R;
 import kr.co.zumo.app.lifeplus.bean.api.LifeplusData;
 import kr.co.zumo.app.lifeplus.bean.api.SystemPopupBean;
 import kr.co.zumo.app.lifeplus.model.Model;
+import kr.co.zumo.app.lifeplus.util.Formatter;
+import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 
 /**
  * ServiceCheckModel
@@ -61,7 +66,47 @@ public class ServiceCheckModel extends Model {
 
   }
 
+  public String getTitle() {
+    // 전체 점검/ 메뉴 점검에 따라서 달리 표시
+    return ResourceUtil.getString(isClosing() ? R.string.menu_check_title_system : R.string.menu_check_title_menu);
+  }
+
   public boolean isClosing() {
-    return LifeplusData.isTrue(systemPopupBean.getAllMenuAppling());
+    return LifeplusData.isTrue(systemPopupBean.getAllMenuApplying());
+  }
+
+  public String getSubTitle() {
+    // 전체 점검/ 메뉴 점검에 따라서 달리 표시
+    return ResourceUtil.getString(isClosing() ? R.string.menu_check_sub_title_system : R.string.menu_check_sub_title_menu);
+  }
+
+  public String getContents() {
+    long fromMillis = getSystemPopupBean().getDisplayMillisFrom();
+    long toMillis = getSystemPopupBean().getDisplayMillisTo();
+    String from = Formatter.format(fromMillis, "yyyy년 M월 dd일(E) HH:mm");
+    // 시작-종료가 다른 날이면 모두 표시
+    Calendar fromDay = Calendar.getInstance();
+    fromDay.setTimeInMillis(fromMillis);
+    Calendar toDay = Calendar.getInstance();
+    toDay.setTimeInMillis(toMillis);
+
+    StringBuilder builder = new StringBuilder();
+
+    if (fromDay.get(Calendar.YEAR) != toDay.get(Calendar.YEAR)) {
+      builder.append("yyyy년 ");
+    }
+    if (fromDay.get(Calendar.MONTH) != toDay.get(Calendar.MONTH)) {
+      builder.append("M월 ");
+    }
+    if (fromDay.get(Calendar.DATE) != toDay.get(Calendar.DATE)) {
+      builder.append("dd일(E) ");
+    }
+    builder.append("HH:mm ");
+    String to = Formatter.format(toMillis, builder.toString());
+
+    String contents = ResourceUtil.getString(R.string.menu_check_date, from, to) + "\n" + getSystemPopupBean().getContents();
+
+    // 일시 : 2018년 5월 27일(일) 04:00~07:00
+    return contents;
   }
 }

+ 3 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/common/ServiceCheckPresenter.java

@@ -107,8 +107,9 @@ public class ServiceCheckPresenter extends Presenter<ServiceCheckModel, IService
 
   @Override
   public void onScreenReady() {
-    view.setTitle(model.getSystemPopupBean().getTitle());
-    view.setDescription(model.getSystemPopupBean().getDescription());
+    view.setTitle(model.getTitle());
+    view.setSubTitle(model.getSubTitle());
+    view.setContents(model.getContents());
     view.setOneButton(model.isClosing());
   }
 

+ 11 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/common/SystemCheckFragment.java

@@ -32,6 +32,8 @@ public class SystemCheckFragment extends FragmentBase<ServiceCheckPresenter> imp
   private TextView textViewPrePage;
   private TextView textViewConfirm;
   private TextView textTitle;
+  private TextView textSubTitle;
+  private TextView textContents;
   private TextView textDescription;
 
 
@@ -62,6 +64,8 @@ public class SystemCheckFragment extends FragmentBase<ServiceCheckPresenter> imp
     });
 
     textTitle = findViewById(R.id.text_view_title);
+    textSubTitle = findViewById(R.id.text_view_sub_title);
+    textContents = findViewById(R.id.text_contents);
     textDescription = findViewById(R.id.text_description);
   }
 
@@ -114,7 +118,12 @@ public class SystemCheckFragment extends FragmentBase<ServiceCheckPresenter> imp
   }
 
   @Override
-  public void setDescription(String description) {
-    textDescription.setText(description);
+  public void setSubTitle(String subTitle) {
+    textSubTitle.setText(subTitle);
+  }
+
+  @Override
+  public void setContents(String contents) {
+    textContents.setText(contents);
   }
 }

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/main/SystemPopupModelHelper.java

@@ -132,7 +132,7 @@ public class SystemPopupModelHelper {
   public boolean isClosing() {
     if (null != systemPopupBeans) {
       for (SystemPopupBean systemPopupBean : systemPopupBeans) {
-        if (LifeplusData.isTrue(systemPopupBean.getAllMenuAppling())) {
+        if (LifeplusData.isTrue(systemPopupBean.getAllMenuApplying())) {
           matchedBean = systemPopupBean;
           return true;
         }

+ 150 - 116
app/src/main/res/layout/fragment_service_check.xml

@@ -6,135 +6,169 @@
   android:layout_width="match_parent"
   android:layout_height="match_parent">
 
-  <ImageView
-    android:id="@+id/image_view"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:layout_marginTop="60dp"
-    app:layout_constraintEnd_toEndOf="parent"
-    app:layout_constraintStart_toStartOf="parent"
-    app:layout_constraintTop_toTopOf="parent"
-    app:srcCompat="@drawable/icon_research_none"
-    />
-
-  <TextView
-    android:id="@+id/text_view_title"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:layout_marginTop="23dp"
-    android:gravity="center_horizontal"
-    android:lineSpacingExtra="8sp"
-    android:text="@string/menu_check_title"
-    android:textColor="@color/C000000"
-    android:textSize="19sp"
-    app:layout_constraintEnd_toEndOf="parent"
-    app:layout_constraintStart_toStartOf="parent"
-    app:layout_constraintTop_toBottomOf="@+id/image_view"
-    />
-
-  <TextView
-    android:id="@+id/text_view_contents"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:layout_marginTop="11dp"
-    android:gravity="center_horizontal"
-    android:lineSpacingExtra="6sp"
-    android:text="@string/menu_check_detail"
-    android:textColor="@color/C999999"
-    android:textSize="14sp"
-    app:layout_constraintEnd_toEndOf="parent"
-    app:layout_constraintStart_toStartOf="parent"
-    app:layout_constraintTop_toBottomOf="@+id/text_view_title"
-    />
-
-  <LinearLayout
-    android:id="@+id/linear_layout1"
+  <ScrollView
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_marginStart="25dp"
-    android:layout_marginTop="45dp"
-    android:layout_marginEnd="25dp"
-    android:background="@color/CF8F8F8"
-    android:gravity="center"
-    android:orientation="vertical"
-    app:layout_constraintEnd_toEndOf="parent"
-    app:layout_constraintStart_toStartOf="parent"
-    app:layout_constraintTop_toBottomOf="@+id/text_view_contents">
+    android:layout_height="0dp"
+    android:fillViewport="true"
+    app:layout_constraintBottom_toTopOf="@+id/layout_two_button"
+    app:layout_constraintTop_toTopOf="parent">
 
-    <TextView
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_marginTop="25dp"
-      android:lineSpacingExtra="6sp"
-      android:text="@string/menu_check_guide"
-      android:textColor="@color/C333333"
-      android:textSize="14sp"
-      />
-
-    <TextView
-      android:id="@+id/text_description"
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_marginTop="3dp"
-      android:layout_marginBottom="25dp"
-      android:lineSpacingExtra="6sp"
-      tools:text="- 일시 : 2018년 5월 27일(일) 04:00~07:00
-
-* 상황에 따라 점검 시간이 단축/연장될 수 있습니다.
-
-보다 안정적인 서비스로 찾아 뵙겠습니다.
-
-Lifeplus app 운영팀 드림"
-      android:textColor="@color/C666666"
-      android:textSize="14sp"
-      />
-  </LinearLayout>
-
-  <LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_marginStart="24dp"
-    android:layout_marginTop="18dp"
-    android:layout_marginBottom="26dp"
-    android:orientation="vertical"
-    app:layout_constraintStart_toStartOf="parent"
-    app:layout_constraintTop_toBottomOf="@+id/linear_layout1">
-
-    <LinearLayout
+    <android.support.constraint.ConstraintLayout
       android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:orientation="horizontal"
-      >
+      android:layout_height="0dp"
+      app:layout_constraintBottom_toBottomOf="parent"
+      app:layout_constraintTop_toTopOf="parent">
 
       <ImageView
-        android:layout_width="2dp"
-        android:layout_height="2dp"
-        android:layout_gravity="center"
-        android:layout_marginEnd="5dp"
-        android:src="@drawable/rectangle_c999999"
+        android:id="@+id/image_view"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="60dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:srcCompat="@drawable/icon_research_none"
         />
 
       <TextView
-        android:id="@+id/text_noti"
+        android:id="@+id/text_view_title"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:lineSpacingExtra="3sp"
-        android:text="@string/menu_check_message2"
-        android:textColor="@color/C999999"
-        android:textSize="12sp"
+        android:layout_marginTop="23dp"
+        android:gravity="center_horizontal"
+        android:lineSpacingExtra="8sp"
+        android:text="@string/menu_check_title_menu"
+        android:textColor="@color/C000000"
+        android:textSize="19sp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/image_view"
+        />
 
+      <TextView
+        android:id="@+id/text_view_sub_title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="25dp"
+        android:layout_marginTop="11dp"
+        android:layout_marginEnd="25dp"
+        android:gravity="center_horizontal"
+        android:lineSpacingExtra="6sp"
+        android:text="@string/menu_check_title_menu"
+        android:textColor="@color/C999999"
+        android:textSize="14sp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/text_view_title"
+        tools:text="점검 시간동안 해당 메뉴를\n 이용할 수 없는 점 양해부탁드립니다."
         />
-    </LinearLayout>
-  </LinearLayout>
+
+      <LinearLayout
+        android:id="@+id/linear_layout1"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="25dp"
+        android:layout_marginTop="45dp"
+        android:layout_marginEnd="25dp"
+        android:background="@color/CF8F8F8"
+        android:gravity="center"
+        android:orientation="vertical"
+        android:paddingStart="20dp"
+        android:paddingEnd="20dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/text_view_sub_title">
+
+        <TextView
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginTop="25dp"
+          android:lineSpacingExtra="6sp"
+          android:text="@string/menu_check_guide"
+          android:textColor="@color/C333333"
+          android:textSize="14sp"
+          />
+
+        <TextView
+          android:id="@+id/text_contents"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginTop="3dp"
+          android:layout_marginBottom="14dp"
+          android:lineSpacingExtra="6sp"
+          android:textColor="@color/C666666"
+          android:textSize="14sp"
+          tools:text="- 일시 : 2018년 5월 27일(일) 04:00~07:00 점검 시간동안 해당 메뉴를\n 이용할 수 없는 점 양해부탁드립니다. 점검 시간동안 해당 메뉴를\n 이용할 수 없는 점 양해부탁드립니다."
+          />
+
+        <View
+          android:layout_width="match_parent"
+          android:layout_height="1dp"
+          android:layout_marginStart="30dp"
+          android:layout_marginEnd="30dp"
+          android:background="@color/CC4C4C4"
+          />
+
+        <TextView
+          android:id="@+id/text_description"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginTop="14dp"
+          android:layout_marginBottom="25dp"
+          android:lineSpacingExtra="6sp"
+          android:text="@string/menu_check_message1"
+          android:textAlignment="center"
+          android:textColor="@color/C999999"
+          android:textSize="14sp"
+          />
+      </LinearLayout>
+
+      <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="24dp"
+        android:layout_marginTop="18dp"
+        android:layout_marginEnd="24dp"
+        android:layout_marginBottom="40dp"
+        android:orientation="horizontal"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/linear_layout1"
+        app:layout_constraintVertical_bias="0">
+
+
+        <ImageView
+          android:layout_width="2dp"
+          android:layout_height="2dp"
+          android:layout_gravity="center"
+          android:layout_marginEnd="5dp"
+          android:src="@drawable/rectangle_c999999"
+          />
+
+        <TextView
+          android:id="@+id/text_noti"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:lineSpacingExtra="3sp"
+          android:text="@string/menu_check_message2"
+          android:textColor="@color/C999999"
+          android:textSize="12sp"
+
+          />
+      </LinearLayout>
+
+    </android.support.constraint.ConstraintLayout>
+
+  </ScrollView>
 
   <android.support.constraint.ConstraintLayout
     android:id="@+id/layout_two_button"
-    tools:visibility="visible"
-    android:visibility="gone"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:background="@color/C000000"
-    app:layout_constraintBottom_toBottomOf="parent">
+    android:visibility="gone"
+    app:layout_constraintBottom_toBottomOf="parent"
+    tools:visibility="visible">
 
     <TextView
       android:id="@+id/main"
@@ -147,13 +181,13 @@ Lifeplus app 운영팀 드림"
       android:paddingTop="12dp"
       android:paddingEnd="20dp"
       android:paddingBottom="12dp"
+      android:text="@string/main"
       android:textColor="@color/CFFFFFF"
       android:textSize="14sp"
       app:layout_constraintBottom_toBottomOf="parent"
       app:layout_constraintEnd_toStartOf="@+id/divider"
       app:layout_constraintStart_toStartOf="parent"
       app:layout_constraintTop_toTopOf="parent"
-      android:text="@string/main"
       />
 
     <View
@@ -184,13 +218,14 @@ Lifeplus app 운영팀 드림"
       />
 
   </android.support.constraint.ConstraintLayout>
+
   <android.support.constraint.ConstraintLayout
     android:id="@+id/layout_one_button"
-    tools:visibility="gone"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:background="@color/C000000"
-    app:layout_constraintBottom_toBottomOf="parent">
+    app:layout_constraintBottom_toBottomOf="parent"
+    tools:visibility="gone">
 
     <TextView
       android:id="@+id/button_confirm"
@@ -202,15 +237,14 @@ Lifeplus app 운영팀 드림"
       android:paddingTop="12dp"
       android:paddingEnd="100dp"
       android:paddingBottom="12dp"
+      android:text="@string/confirm"
       android:textColor="@color/CFFFFFF"
       android:textSize="14sp"
       app:layout_constraintEnd_toEndOf="parent"
       app:layout_constraintStart_toStartOf="parent"
-      android:text="@string/confirm"
       />
 
   </android.support.constraint.ConstraintLayout>
 
 
-
 </android.support.constraint.ConstraintLayout>

+ 5 - 3
app/src/main/res/values/strings.xml

@@ -590,10 +590,12 @@
   <string name="visit_event">%s 보러가기</string>
 
   <string name="service_check_title">서비스 점검 안내</string>
-  <string name="menu_check_title">해당 메뉴는\n시스템 점검 중입니다.</string>
-  <string name="menu_check_detail">점검 시간동안 서비스를\n이용할 수 없는 점 양해 부탁드립니다.</string>
+  <string name="menu_check_title_menu">해당 메뉴는\n시스템 점검 중입니다.</string>
+  <string name="menu_check_title_system">서비스 품질 향상을 위한\n시스템 점검 중입니다.</string>
+  <string name="menu_check_sub_title_menu">점검 시간동안 해당 메뉴를\n 이용할 수 없는 점 양해부탁드립니다.</string>
+  <string name="menu_check_sub_title_system">점검 시간동안 서비스를\n이용할 수 없는 점 양해 부탁드립니다.</string>
   <string name="menu_check_guide">작업안내</string>
-  <string name="menu_check_date">일시 : 2018년 5월 27일(일) 04:00~07:00</string>
+  <string name="menu_check_date">일시 : %1$s~%2$s</string>
   <string name="menu_check_message1">보다 안정적인 서비스로 찾아 뵙겠습니다.\nLifeplus 운영팀 드림</string>
   <string name="menu_check_message2">상황에 따라 점검 시간이 단축/연장될 수 있습니다.</string>
   <string name="not_show_today">오늘 하루 보지 않기</string>

文件差異過大導致無法顯示
+ 12 - 1
app/src/sandbox/java/kr/co/zumo/app/lifeplus/network/api/LifeplusAPIService.java