Quellcode durchsuchen

[로딩][Common] 로딩 백그라운드에 내비게이션 패딩 하단에 추가

Hasemi vor 6 Jahren
Ursprung
Commit
bb2e21b9ed

+ 7 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/animation/Loading.java

@@ -16,6 +16,7 @@ import io.reactivex.Completable;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.disposables.Disposable;
 import kr.co.zumo.app.R;
+import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.FrameAnimation;
 
 /**
@@ -70,6 +71,12 @@ public class Loading {
       FrameLayout frameLayout = activity.findViewById(android.R.id.content);
       LayoutInflater inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
       view = inflater.inflate(R.layout.dialog_loading, null);
+
+      /**
+       * navigationBar 있는 경우 하단 마진 추가함
+       */
+      frameLayout.setPadding(0, 0, 0, ResourceUtil.getNavBarHeight());
+
       view.setClickable(true);
       view.setAlpha(0f);
       frameLayout.addView(view);

+ 0 - 71
app/src/main/java/kr/co/zumo/app/lifeplus/view/dialog/LoadingDialog.java

@@ -1,71 +0,0 @@
-/*
- * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
- */
-package kr.co.zumo.app.lifeplus.view.dialog;
-
-import android.app.Dialog;
-import android.graphics.drawable.ColorDrawable;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.view.View;
-import android.view.Window;
-import android.view.WindowManager;
-import android.widget.ImageView;
-
-import kr.co.zumo.app.R;
-import kr.co.zumo.app.lifeplus.view.FrameAnimation;
-
-/**
- * LoadingDialog
- * <pre>
- * </pre>
- *
- * @author 민효동
- * @version 1.0
- * @history 민효동   [2018. 11. 20.]   [최초 작성]
- * @since 2018. 11. 20.
- */
-public class LoadingDialog extends DialogBase {
-
-  private ImageView imageView;
-  private FrameAnimation animation;
-
-  @Override
-  protected void onActivityCreatedInternal() {
-    Window window = getDialog().getWindow();
-    window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
-    window.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
-  }
-
-  @NonNull
-  @Override
-  public Dialog onCreateDialog(Bundle savedInstanceState) {
-//    android.support.v7.app.AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
-    Dialog loadingDialog = super.onCreateDialog(savedInstanceState);
-    View view = getActivity().getLayoutInflater().inflate(R.layout.dialog_loading, null);
-
-    loadingDialog.setContentView(view);
-    loadingDialog.setCancelable(false);
-
-    imageView = view.findViewById(R.id.image_loading);
-    imageView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
-    animation = new FrameAnimation.Builder(imageView, R.array.loading_animation, 40).repeat(true).build();
-
-    return loadingDialog;
-  }
-
-  @Override
-  public void dispose() {
-
-    if (null != animation) {
-      animation.stopAnimation();
-      animation = null;
-    }
-    if (null != imageView) {
-      imageView.setLayerType(View.LAYER_TYPE_NONE, null);
-      imageView = null;
-    }
-
-    super.dispose();
-  }
-}

+ 1 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsPresenter.java

@@ -258,6 +258,7 @@ public class ContentsPresenter extends ContentsBasePresenter<ContentsModel, ICon
       case Event.TUTORIAL:
         if (false == model.isTutorialListicleDone() && model.getItemCount() > 2) {
           view.showTutorialListicle();
+          model.setTutorialListicleDone();
         }
         break;
       case Event.CLICK_HTML:

+ 1 - 0
app/src/main/res/layout/dialog_loading.xml

@@ -3,6 +3,7 @@
   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:id="@+id/container_loading"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:background="@color/CB3FFFFFF"