|
|
@@ -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();
|
|
|
- }
|
|
|
-}
|