Whiux White v3.3版本的 MD5 值为:cb2472159ed9eb4da43a41af3e7eec60
以下内容为反编译后的 AboutButtonsLayout.java 源代码,内容仅作参考
package dev.jahir.frames.ui.widgets;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.snackbar.a;
import dev.jahir.frames.BuildConfig;
import dev.jahir.frames.R;
import dev.jahir.frames.extensions.context.ContextKt;
import dev.jahir.frames.extensions.views.ViewKt;
import kotlin.jvm.internal.e;
import y3.f;
public class AboutButtonsLayout extends LinearLayout {
public AboutButtonsLayout(Context context) {
this(context, null, 0, 6, null);
f.n("context", context);
}
public static final void addButton$lambda$1(AboutButtonsLayout aboutButtonsLayout, String str, View view) {
f.n("this$0", aboutButtonsLayout);
f.n("$link", str);
Context context = aboutButtonsLayout.getContext();
f.m("getContext(...)", context);
ContextKt.openLink(context, str);
}
private final void init() {
setOrientation(0);
if (isInEditMode()) {
addButton("GitHub", "https://github.com/jahirfiquitiva");
addButton("Website", "https://jahir.dev/");
}
}
public final void addButton(String str, String str2) {
MaterialButton materialButton;
Context context;
f.n("text", str);
f.n("link", str2);
if (getChildCount() >= 3) {
Log.e(BuildConfig.DASHBOARD_NAME, "Cannot add more than 3 buttons.");
return;
}
try {
materialButton = ViewKt.inflate$default(this, R.layout.item_about_button, false, 2, null);
} catch (Exception unused) {
materialButton = null;
}
if (materialButton != null) {
materialButton.setId(getChildCount());
}
if (materialButton != null) {
materialButton.setTag(str2);
}
MaterialButton materialButton2 = materialButton instanceof MaterialButton ? materialButton : null;
if (materialButton2 != null) {
materialButton2.setMaxLines(1);
materialButton2.setEllipsize(TextUtils.TruncateAt.END);
materialButton2.setText(str);
f.m("getContext(...)", getContext());
materialButton2.setSupportAllCaps(!ContextKt.getPreferences(context).getUseMaterialYou());
addView(materialButton2, new LinearLayout.LayoutParams(-2, -2));
}
if (materialButton != null) {
materialButton.setOnClickListener(new a(this, 7, str2));
}
}
public void citrus() {
}
@Override
public void setOrientation(int i6) {
super.setOrientation(0);
}
public AboutButtonsLayout(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0, 4, null);
f.n("context", context);
}
public AboutButtonsLayout(Context context, AttributeSet attributeSet, int i6) {
super(context, attributeSet, i6);
f.n("context", context);
init();
}
public AboutButtonsLayout(Context context, AttributeSet attributeSet, int i6, int i7, e eVar) {
this(context, (i7 & 2) != 0 ? null : attributeSet, (i7 & 4) != 0 ? 0 : i6);
}
}