正在查看: TodoCrédito v1.4 应用的 g.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: TodoCrédito v1.4 应用的 g.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.kongzue.dialogx.interfaces;
import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.o;
import com.kongzue.dialogx.DialogX;
import java.security.SecureRandom;
public abstract class g<D> {
public int f7658a;
public View f7659b;
public Fragment f7661d;
public android.app.Fragment f7662e;
public int f7664g;
public int f7665h;
public Runnable f7666i;
public final int f7660c = -109;
public int f7663f = -1;
public class a implements Runnable {
public final BaseDialog f7667c;
public a(BaseDialog baseDialog) {
this.f7667c = baseDialog;
}
@Override
public void run() {
if (g.this.f7661d != null && (g.this.h() instanceof FrameLayout) && (this.f7667c.E() instanceof AppCompatActivity)) {
AppCompatActivity appCompatActivity = (AppCompatActivity) this.f7667c.E();
o l8 = appCompatActivity.A().l();
l8.b(g.this.i(), g.this.f7661d);
l8.j();
g gVar = g.this;
gVar.l(this.f7667c, gVar.h(), g.this.f7661d, appCompatActivity.A());
}
if (g.this.f7662e != null && (g.this.h() instanceof FrameLayout) && (this.f7667c.E() instanceof Activity)) {
Activity E = this.f7667c.E();
FragmentTransaction beginTransaction = E.getFragmentManager().beginTransaction();
beginTransaction.add(g.this.i(), g.this.f7662e);
beginTransaction.commit();
g gVar2 = g.this;
gVar2.k(this.f7667c, gVar2.h(), g.this.f7662e, E.getFragmentManager());
}
}
}
public class b implements Runnable {
public final BaseDialog f7669c;
public final ViewGroup f7670d;
public b(BaseDialog baseDialog, ViewGroup viewGroup) {
this.f7669c = baseDialog;
this.f7670d = viewGroup;
}
@Override
public void run() {
if (g.this.h() == null) {
BaseDialog baseDialog = this.f7669c;
if (baseDialog == null) {
g.this.d(this.f7670d);
} else {
g.this.e(this.f7670d, baseDialog);
}
}
}
}
public g(int i9) {
if (BaseDialog.K() == null) {
DialogX.b("DialogX.init: 初始化异常,context 为 null 或未初始化,详情请查看 https://github.com/kongzue/DialogX/wiki");
} else {
this.f7658a = i9;
this.f7659b = LayoutInflater.from(BaseDialog.K()).inflate(i9, (ViewGroup) new RelativeLayout(BaseDialog.K()), false);
}
}
@Deprecated
public void d(ViewGroup viewGroup) {
if (h() == null) {
n(viewGroup, null);
return;
}
if (h().getParent() != null) {
if (h().getParent() == viewGroup) {
return;
} else {
((ViewGroup) h().getParent()).removeView(h());
}
}
ViewGroup.LayoutParams layoutParams = viewGroup.getLayoutParams();
if (layoutParams == null) {
layoutParams = new RelativeLayout.LayoutParams(-1, -2);
}
viewGroup.addView(h(), layoutParams);
}
public void e(ViewGroup viewGroup, BaseDialog baseDialog) {
if (h() == null) {
n(viewGroup, null);
return;
}
if (h().getParent() == viewGroup || viewGroup.getTag(-109) == h().toString()) {
return;
}
if (h().getParent() != null) {
((ViewGroup) h().getParent()).removeView(h());
}
ViewGroup.LayoutParams layoutParams = h().getLayoutParams();
if (layoutParams == null) {
layoutParams = new RelativeLayout.LayoutParams(-1, -2);
}
viewGroup.addView(h(), layoutParams);
j(baseDialog, h());
f(baseDialog, h());
if (this.f7661d == null && this.f7662e == null) {
return;
}
if (baseDialog.u() == DialogX.IMPL_MODE.VIEW) {
h().post(new a(baseDialog));
return;
}
BaseDialog.n(baseDialog.k() + "非 VIEW 实现模式不支持 fragment 作为子布局显示。\n其原因为 Window 中不存在 FragmentManager,无法对子布局中的 fragment 进行管理。");
}
public final void f(D d9, View view) {
if (d9.hashCode() == this.f7664g && view.hashCode() == this.f7665h) {
return;
}
this.f7664g = d9.hashCode();
this.f7665h = view.hashCode();
m(d9, h());
}
public final int g() {
this.f7663f = new SecureRandom().nextInt();
return BaseDialog.K().findViewById(this.f7663f) != null ? g() : this.f7663f;
}
public View h() {
if (this.f7659b == null) {
this.f7659b = LayoutInflater.from(BaseDialog.K()).inflate(this.f7658a, (ViewGroup) new RelativeLayout(BaseDialog.K()), false);
}
return this.f7659b;
}
public final int i() {
if (this.f7663f == -1) {
this.f7663f = g();
}
return this.f7663f;
}
public abstract void j(D d9, View view);
public void k(D d9, View view, android.app.Fragment fragment, FragmentManager fragmentManager) {
}
public void l(D d9, View view, Fragment fragment, androidx.fragment.app.FragmentManager fragmentManager) {
}
public void m(D d9, View view) {
}
public final void n(ViewGroup viewGroup, BaseDialog baseDialog) {
this.f7666i = new b(baseDialog, viewGroup);
}
}