Files
rr3-apk/decompiled/sources/csdk/gluads/LoadingScreen.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

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