Ver código fonte

[공통][Common] 튜토리얼 및 전체보기 다이얼로그 API 대응

Hasemi 7 anos atrás
pai
commit
b93bacda7e

+ 7 - 9
app/src/main/java/kr/co/zumo/app/lifeplus/activity/ActivityBase.java

@@ -90,20 +90,18 @@ public abstract class ActivityBase extends AppCompatActivity implements IHelperP
       Log.e("APP#  ActivityBase | onCreate", "|" + "AppUtil.hasNavBar(): " + AppUtil.hasNavBar());
       Log.e("APP#  ActivityBase | onCreate", "|" + "ResourceUtil.getNavBarHeightValue(): " + ResourceUtil.getNavBarHeightValue());
       Log.e("APP#  ActivityBase | onCreate", "|" + "ResourceUtil.getNavBarHeight(): " + ResourceUtil.getNavBarHeight());
+      int paddingBottom = 0;
 
+      if (false == AppUtil.isFullScreenVersion()) {
+        paddingBottom = paddingBottom + ResourceUtil.getStatusBarHeight();
+      }
 
       if (AppUtil.hasNavBar() || ResourceUtil.getNavBarHeight() > 0) {
-
-        int paddingBottom = ResourceUtil.getNavBarHeightValue();
-
-        if (AppUtil.isFullScreenVersion()) {
-          paddingBottom = paddingBottom + ResourceUtil.getStatusBarHeight();
-        }
-        findViewById(R.id.layout_container).setPadding(0, 0, 0, paddingBottom);
-
-
+        paddingBottom = paddingBottom + ResourceUtil.getNavBarHeight();
       }
 
+      findViewById(R.id.layout_container).setPadding(0, 0, 0, paddingBottom);
+
       // 상단 스테이터스바 높이 패딩 액션바에 더해줌
       findViewById(R.id.layout_app_bar).setPadding(0, ResourceUtil.getStatusBarHeightManual(), 0, 0);
 

+ 28 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/Tutorial.java

@@ -8,8 +8,11 @@ import android.support.v4.app.FragmentActivity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.FrameLayout;
+import android.widget.ImageView;
 
 import kr.co.zumo.app.R;
+import kr.co.zumo.app.lifeplus.util.AppUtil;
+import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.IEventListener;
 
@@ -100,7 +103,6 @@ public class Tutorial {
     );
   }
 
-
   private void showTutorialListicleCover(IEventListener listener) {
     View view = inflater.inflate(R.layout.tutorial_listicle_cover, null);
     frameLayout.addView(view);
@@ -108,6 +110,11 @@ public class Tutorial {
     ConstraintLayout bubble1 = view.findViewById(R.id.tutorial_listicle_cover1);
     ConstraintLayout bubble2 = view.findViewById(R.id.tutorial_listicle_cover2);
 
+    if (false == AppUtil.isFullScreenVersion()) {
+      ConstraintLayout.LayoutParams bubble1Params = (ConstraintLayout.LayoutParams) bubble1.getLayoutParams();
+      bubble1Params.setMargins(bubble1Params.leftMargin, bubble1Params.topMargin - ResourceUtil.getStatusBarHeight(), bubble1Params.rightMargin, bubble1Params.bottomMargin);
+    }
+
     ObjectAnimator firstTutorial = fadeOut(bubble1);
     firstTutorial.setStartDelay(1000);
     firstTutorial.setDuration(1000);
@@ -137,7 +144,7 @@ public class Tutorial {
     });
     this.animator = firstTutorial;
     firstTutorial.start();
-    
+
   }
 
   private void showTutorialListicleDetail(IEventListener listener) {
@@ -147,6 +154,14 @@ public class Tutorial {
     ConstraintLayout bubble1 = view.findViewById(R.id.tutorial_listicle_detail1);
     ConstraintLayout bubble2 = view.findViewById(R.id.tutorial_listicle_detail2);
 
+    if (false == AppUtil.isFullScreenVersion()) {
+      ConstraintLayout.LayoutParams bubble1Params = (ConstraintLayout.LayoutParams) bubble1.getLayoutParams();
+      bubble1Params.setMargins(bubble1Params.leftMargin, bubble1Params.topMargin - ResourceUtil.getStatusBarHeight(), bubble1Params.rightMargin, bubble1Params.bottomMargin);
+
+      ConstraintLayout.LayoutParams bubble2Params = (ConstraintLayout.LayoutParams) bubble2.getLayoutParams();
+      bubble2Params.setMargins(bubble2Params.leftMargin, bubble2Params.topMargin - ResourceUtil.getStatusBarHeight(), bubble2Params.rightMargin, bubble2Params.bottomMargin);
+    }
+
     ObjectAnimator firstTutorial = fadeOut(bubble1);
     firstTutorial.setStartDelay(1000);
     firstTutorial.setDuration(1000);
@@ -185,9 +200,19 @@ public class Tutorial {
     View firstView = inflater.inflate(R.layout.tutorial_bucket_list_tag, null);
     ConstraintLayout bubble1 = firstView.findViewById(R.id.tutorial_bucket_list_tag1);
     ConstraintLayout bubble2 = firstView.findViewById(R.id.tutorial_bucket_list_tag2);
+    ImageView trashIcon1 = firstView.findViewById(R.id.image_trash);
 
     View secondView = inflater.inflate(R.layout.tutorial_bucket_list_update, null);
     ConstraintLayout bubble3 = secondView.findViewById(R.id.tutorial_bucket_list_success);
+    ImageView trashIcon2 = secondView.findViewById(R.id.imageView7);
+
+    if (false == AppUtil.isFullScreenVersion()) {
+      ConstraintLayout.LayoutParams params1 = (ConstraintLayout.LayoutParams) trashIcon1.getLayoutParams();
+      params1.setMargins(params1.leftMargin, params1.topMargin - ResourceUtil.getStatusBarHeight(), params1.rightMargin, params1.bottomMargin);
+
+      ConstraintLayout.LayoutParams params2 = (ConstraintLayout.LayoutParams) trashIcon2.getLayoutParams();
+      params2.setMargins(params2.leftMargin, params2.topMargin - ResourceUtil.getStatusBarHeight(), params2.rightMargin, params2.bottomMargin);
+    }
 
     frameLayout.addView(firstView);
     firstView.setClickable(true);
@@ -270,4 +295,5 @@ public class Tutorial {
     @Override
     public void onAnimationRepeat(Animator animation) { }
   }
+
 }

+ 2 - 0
app/src/main/res/layout/fragment_main.xml

@@ -121,6 +121,7 @@
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="Join"/>
+
         <Space
           android:layout_width="0dp"
           android:layout_height="wrap_content"
@@ -180,6 +181,7 @@
           android:layout_width="0dp"
           android:layout_height="wrap_content"
           android:layout_weight="1"/>
+
         <Button
           android:id="@+id/button_product"
           style="@style/SignUpButton"

+ 3 - 2
app/src/main/res/layout/tutorial_bucket_list_update.xml

@@ -8,6 +8,7 @@
   android:background="@drawable/img_bucket_01">
 
   <ImageView
+    android:id="@+id/check"
     android:layout_width="19dp"
     android:layout_height="19dp"
     android:layout_marginEnd="14dp"
@@ -57,10 +58,10 @@
     android:id="@+id/tutorial_bucket_list_success"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:layout_marginTop="64dp"
+    android:layout_marginTop="5dp"
     android:layout_marginEnd="20dp"
     app:layout_constraintEnd_toEndOf="parent"
-    app:layout_constraintTop_toTopOf="parent">
+    app:layout_constraintTop_toBottomOf="@+id/check">
 
 
     <ImageView