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