- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
66 lines
2.1 KiB
Java
66 lines
2.1 KiB
Java
package csdk.gluads;
|
|
|
|
import android.app.Activity;
|
|
import android.app.Dialog;
|
|
import android.content.Context;
|
|
import android.content.DialogInterface;
|
|
import android.view.ViewGroup;
|
|
import android.widget.ProgressBar;
|
|
import androidx.annotation.NonNull;
|
|
import csdk.gluads.util.Common;
|
|
import java.util.concurrent.Callable;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class LoadingScreen {
|
|
private Callable<Activity> mActivityGetter;
|
|
private Context mCurrentContext;
|
|
private boolean mInitialized = false;
|
|
private CustomProgressBar mLoadingScreen;
|
|
|
|
public boolean isInitialized() {
|
|
return this.mInitialized;
|
|
}
|
|
|
|
public void initialize(@NonNull Callable<Activity> callable) {
|
|
this.mActivityGetter = callable;
|
|
Context context = (Context) Common.call(callable);
|
|
this.mCurrentContext = context;
|
|
CustomProgressBar customProgressBar = new CustomProgressBar(context);
|
|
this.mLoadingScreen = customProgressBar;
|
|
customProgressBar.setCancelable(true);
|
|
this.mLoadingScreen.setOnCancelListener(new DialogInterface.OnCancelListener() { // from class: csdk.gluads.LoadingScreen.1
|
|
@Override // android.content.DialogInterface.OnCancelListener
|
|
public void onCancel(DialogInterface dialogInterface) {
|
|
}
|
|
});
|
|
this.mLoadingScreen.addContentView(new ProgressBar(context), new ViewGroup.LayoutParams(-2, -2));
|
|
this.mInitialized = true;
|
|
}
|
|
|
|
public void show() {
|
|
if (!this.mInitialized || isShowing()) {
|
|
return;
|
|
}
|
|
if (((Context) Common.call(this.mActivityGetter)) != this.mCurrentContext) {
|
|
initialize(this.mActivityGetter);
|
|
}
|
|
this.mLoadingScreen.show();
|
|
}
|
|
|
|
public boolean isShowing() {
|
|
return this.mInitialized && this.mLoadingScreen.isShowing();
|
|
}
|
|
|
|
public void dismiss() {
|
|
if (isShowing()) {
|
|
this.mLoadingScreen.dismiss();
|
|
}
|
|
}
|
|
|
|
public class CustomProgressBar extends Dialog {
|
|
public CustomProgressBar(Context context) {
|
|
super(context, R.style.CustomProgressBar);
|
|
}
|
|
}
|
|
}
|