浏览代码

[공통][New] Loading 클래스 추가 2

hyodong.min 7 年之前
父节点
当前提交
b90f71e6db
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/Loading.java

+ 7 - 4
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/Loading.java

@@ -37,10 +37,13 @@ public class Loading {
    * @return
    */
   public Loading show() {
-    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);
-    frameLayout.addView(view);
+    if (null == view) {
+      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);
+      view.setClickable(true);
+      frameLayout.addView(view);
+    }
     return this;
   }