CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 GospelHotlineFragment.java 源代码,内容仅作参考
package org.godfootsteps.more;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager3.widget.ViewPager3;
import carbon.custom.LoadingLayout;
import d.c.a.j.s;
import d.c.a.j.v;
import i.c.a.c.n0;
import i.c.a.c.w;
import i.c.a.c.y;
import java.util.Objects;
import kotlin.Metadata;
import kotlin.text.Regex;
import n.i.b.h;
import n.m.t.a.p.m.e1.a;
import org.commons.screenadapt.recyclerview.ScreenListAdapter;
import org.commons.screenadapt.recyclerview.ScreenViewHolder;
import org.godfootsteps.arch.api.AppClient;
import org.godfootsteps.arch.api.model.GospelhotlineModel;
import org.godfootsteps.base.BaseFragment;
import org.godfootsteps.more.ContactUsActivity;
import org.godfootsteps.more.GospelHotlineFragment;
import org.godfootsteps.more.GospelHotlineFragment$loadData$1;
import org.godfootsteps.more.R$id;
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001:\u0001\u0017B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\r\u001a\u00020\u000eH\u0014J\b\u0010\u000f\u001a\u00020\u0010H\u0014J\b\u0010\u0011\u001a\u00020\u0010H\u0014J\b\u0010\u0012\u001a\u00020\u0010H\u0002J\u0010\u0010\u0013\u001a\u00020\u00102\u0006\u0010\u0014\u001a\u00020\u0015H\u0016J\b\u0010\u0016\u001a\u00020\u0010H\u0016R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u001a\u0010\u0007\u001a\u00020\bX\u0086.¢\u0006\u000e\n\u0000\u001a\u0004\b\t\u0010\n\"\u0004\b\u000b\u0010\f¨\u0006\u0018"}, d2 = {"Lorg/godfootsteps/more/GospelHotlineFragment;", "Lorg/godfootsteps/base/BaseFragment;", "()V", "flagBase", "", "isLoad", "", "layoutManager", "Landroidx/recyclerview/widget/GridLayoutManager;", "getLayoutManager", "()Landroidx/recyclerview/widget/GridLayoutManager;", "setLayoutManager", "(Landroidx/recyclerview/widget/GridLayoutManager;)V", "getLayoutId", "", "initData", "", "initView", "loadData", "onConfigurationChanged", "newConfig", "Landroid/content/res/Configuration;", "onResume", "GospelHotlineAdapter", "more_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class GospelHotlineFragment extends BaseFragment {
public static final int f15968n = 0;
public String f15969k = "";
public boolean f15970l;
public GridLayoutManager f15971m;
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0004\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0003J\u000f\u0010\u0006\u001a\u0004\u0018\u00010\u0007H\u0014¢\u0006\u0002\u0010\bJ\b\u0010\t\u001a\u00020\u0007H\u0014J\u001a\u0010\n\u001a\u00020\u000b2\b\u0010\f\u001a\u0004\u0018\u00010\r2\u0006\u0010\u000e\u001a\u00020\u0002H\u0014J\u0010\u0010\u000f\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00020\rH\u0014R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0010"}, d2 = {"Lorg/godfootsteps/more/GospelHotlineFragment$GospelHotlineAdapter;", "Lorg/commons/screenadapt/recyclerview/ScreenListAdapter;", "Lorg/godfootsteps/arch/api/model/GospelhotlineModel$ListBean;", "(Lorg/godfootsteps/more/GospelHotlineFragment;)V", "selectableItemBackground", "Landroid/graphics/drawable/Drawable;", "getFooterLayoutId", "", "()Ljava/lang/Integer;", "getLayoutId", "onBind", "", "holder", "Lorg/commons/screenadapt/recyclerview/ScreenViewHolder;", "item", "onBindFooter", "more_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class GospelHotlineAdapter extends ScreenListAdapter<GospelhotlineModel.ListBean> {
public final Drawable f15972k;
public final GospelHotlineFragment f15973l;
public GospelHotlineAdapter(GospelHotlineFragment gospelHotlineFragment) {
super(null, 1);
h.e(gospelHotlineFragment, "this$0");
this.f15973l = gospelHotlineFragment;
this.f15972k = w.d(R$attr.selectableItemBackground);
}
@Override
public Integer g() {
return Integer.valueOf(R$layout.contactus_list_notice);
}
@Override
public int h() {
return R$layout.item_hotline;
}
@Override
public void i(ScreenViewHolder screenViewHolder, GospelhotlineModel.ListBean listBean) {
int childCount;
int childCount2;
final GospelhotlineModel.ListBean listBean2 = listBean;
h.e(listBean2, "item");
h.c(screenViewHolder);
final GospelHotlineFragment gospelHotlineFragment = this.f15973l;
if (v.i()) {
View view = screenViewHolder.f15173i;
ViewGroup.LayoutParams layoutParams = ((LinearLayout) (view == null ? null : view.findViewById(R$id.ll_phone))).getLayoutParams();
Objects.requireNonNull(layoutParams, "null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
ConstraintLayout.a aVar = (ConstraintLayout.a) layoutParams;
View view2 = screenViewHolder.f15173i;
aVar.topToBottom = ((ImageView) (view2 == null ? null : view2.findViewById(R$id.iv_country))).getId();
aVar.startToStart = 0;
View view3 = screenViewHolder.f15173i;
ViewGroup.LayoutParams layoutParams2 = (view3 == null ? null : view3.findViewById(R$id.line)).getLayoutParams();
Objects.requireNonNull(layoutParams2, "null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
ConstraintLayout.a aVar2 = (ConstraintLayout.a) layoutParams2;
aVar2.startToStart = 0;
aVar2.endToEnd = 0;
}
View view4 = screenViewHolder.f15173i;
View findViewById = view4 == null ? null : view4.findViewById(R$id.iv_country);
h.d(findViewById, "iv_country");
StringBuilder sb = new StringBuilder();
Objects.requireNonNull(AppClient.a);
sb.append("https://appservercn.kingdomsalvation.org");
sb.append(gospelHotlineFragment.f15969k);
sb.append((Object) listBean2.getCountry());
sb.append(".png");
a.D1((ImageView) findViewById, sb.toString(), Integer.valueOf(R$drawable.ic_country_default));
View view5 = screenViewHolder.f15173i;
((TextView) (view5 == null ? null : view5.findViewById(R$id.tv_country))).setText(listBean2.getName());
if (v.i()) {
View view6 = screenViewHolder.f15173i;
((LinearLayout) (view6 == null ? null : view6.findViewById(R$id.ll_phone))).setShowDividers(1);
} else {
View view7 = screenViewHolder.f15173i;
((LinearLayout) (view7 == null ? null : view7.findViewById(R$id.ll_phone))).setShowDividers(3);
}
int size = listBean2.getPhone().size();
if (size > 1) {
screenViewHolder.itemView.setBackground(null);
screenViewHolder.itemView.setOnClickListener(null);
View view8 = screenViewHolder.f15173i;
((LinearLayout) (view8 == null ? null : view8.findViewById(R$id.ll_phone))).removeAllViews();
if (size > 0) {
int i2 = 0;
do {
i2++;
View view9 = screenViewHolder.f15173i;
((LinearLayout) (view9 == null ? null : view9.findViewById(R$id.ll_phone))).addView(n0.d(R$layout.item_hotline_phone), new ViewGroup.LayoutParams(-1, -2));
} while (i2 < size);
View view10 = screenViewHolder.f15173i;
childCount2 = ((LinearLayout) (view10 != null ? null : view10.findViewById(R$id.ll_phone))).getChildCount();
if (childCount2 > 0) {
int i3 = 0;
while (true) {
int i4 = i3 + 1;
View view11 = screenViewHolder.f15173i;
View childAt = ((LinearLayout) (view11 == null ? null : view11.findViewById(R$id.ll_phone))).getChildAt(i3);
Objects.requireNonNull(childAt, "null cannot be cast to non-null type android.view.ViewGroup");
ViewGroup viewGroup = (ViewGroup) childAt;
final String str = listBean2.getPhone().get(i3);
View childAt2 = viewGroup.getChildAt(1);
Objects.requireNonNull(childAt2, "null cannot be cast to non-null type android.widget.TextView");
TextView textView = (TextView) childAt2;
textView.setText(str);
textView.setTextDirection(3);
textView.setTextAlignment(s.s() ? 3 : 2);
Drawable.ConstantState constantState = this.f15972k.getConstantState();
h.c(constantState);
viewGroup.setBackground(constantState.newDrawable());
viewGroup.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view12) {
GospelHotlineFragment gospelHotlineFragment2 = GospelHotlineFragment.this;
String str2 = str;
n.i.b.h.e(gospelHotlineFragment2, "this$0");
try {
n.i.b.h.d(str2, "phone");
gospelHotlineFragment2.startActivity(e.c0.a.s(new Regex("[^+0-9]").replace(str2, "")));
} catch (Exception unused) {
}
}
});
if (i4 >= childCount2) {
break;
}
i3 = i4;
}
}
} else {
View view102 = screenViewHolder.f15173i;
childCount2 = ((LinearLayout) (view102 != null ? null : view102.findViewById(R$id.ll_phone))).getChildCount();
if (childCount2 > 0) {
}
}
} else {
View view12 = screenViewHolder.f15173i;
((LinearLayout) (view12 == null ? null : view12.findViewById(R$id.ll_phone))).removeAllViews();
if (size > 0) {
int i5 = 0;
do {
i5++;
View view13 = screenViewHolder.f15173i;
((LinearLayout) (view13 == null ? null : view13.findViewById(R$id.ll_phone))).addView(n0.d(R$layout.item_hotline_phone), new ViewGroup.LayoutParams(-1, -2));
} while (i5 < size);
View view14 = screenViewHolder.f15173i;
View findViewById2 = view14 != null ? null : view14.findViewById(R$id.ll_phone);
h.d(findViewById2, "ll_phone");
ViewGroup viewGroup2 = (ViewGroup) findViewById2;
childCount = viewGroup2.getChildCount();
if (childCount > 0) {
int i6 = 0;
while (true) {
int i7 = i6 + 1;
View childAt3 = viewGroup2.getChildAt(i6);
h.d(childAt3, "getChildAt(index)");
ViewGroup viewGroup3 = (ViewGroup) childAt3;
View childAt4 = viewGroup3.getChildAt(1);
Objects.requireNonNull(childAt4, "null cannot be cast to non-null type android.widget.TextView");
TextView textView2 = (TextView) childAt4;
textView2.setText(listBean2.getPhone().get(0));
textView2.setTextDirection(3);
textView2.setTextAlignment(s.s() ? 3 : 2);
viewGroup3.setBackground(null);
childAt3.setOnClickListener(null);
viewGroup3.setClickable(false);
if (i7 >= childCount) {
break;
}
i6 = i7;
}
}
screenViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view15) {
GospelHotlineFragment gospelHotlineFragment2 = GospelHotlineFragment.this;
GospelhotlineModel.ListBean listBean3 = listBean2;
n.i.b.h.e(gospelHotlineFragment2, "this$0");
n.i.b.h.e(listBean3, "$item");
try {
String str2 = listBean3.getPhone().get(0);
n.i.b.h.d(str2, "item.phone[0]");
gospelHotlineFragment2.startActivity(e.c0.a.s(new Regex("[^+0-9]").replace(str2, "")));
} catch (Exception unused) {
}
}
});
View view15 = screenViewHolder.itemView;
Drawable.ConstantState constantState2 = this.f15972k.getConstantState();
h.c(constantState2);
view15.setBackground(constantState2.newDrawable());
} else {
View view142 = screenViewHolder.f15173i;
if (view142 != null) {
}
h.d(findViewById2, "ll_phone");
ViewGroup viewGroup22 = (ViewGroup) findViewById2;
childCount = viewGroup22.getChildCount();
if (childCount > 0) {
}
screenViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view152) {
GospelHotlineFragment gospelHotlineFragment2 = GospelHotlineFragment.this;
GospelhotlineModel.ListBean listBean3 = listBean2;
n.i.b.h.e(gospelHotlineFragment2, "this$0");
n.i.b.h.e(listBean3, "$item");
try {
String str2 = listBean3.getPhone().get(0);
n.i.b.h.d(str2, "item.phone[0]");
gospelHotlineFragment2.startActivity(e.c0.a.s(new Regex("[^+0-9]").replace(str2, "")));
} catch (Exception unused) {
}
}
});
View view152 = screenViewHolder.itemView;
Drawable.ConstantState constantState22 = this.f15972k.getConstantState();
h.c(constantState22);
view152.setBackground(constantState22.newDrawable());
}
}
int dimension = (int) w.c().getResources().getDimension(R$dimen.dp16_12_x);
screenViewHolder.itemView.setPadding(dimension, y.E(16.0f), dimension, 0);
}
@Override
public void j(ScreenViewHolder screenViewHolder) {
h.e(screenViewHolder, "holder");
final GospelHotlineFragment gospelHotlineFragment = this.f15973l;
screenViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
GospelHotlineFragment gospelHotlineFragment2 = GospelHotlineFragment.this;
n.i.b.h.e(gospelHotlineFragment2, "this$0");
FragmentActivity activity = gospelHotlineFragment2.getActivity();
Objects.requireNonNull(activity, "null cannot be cast to non-null type org.godfootsteps.more.ContactUsActivity");
((ViewPager3) ((ContactUsActivity) activity).findViewById(R$id.view_pager)).setCurrentItem(0);
}
});
if (v.i()) {
if (y.z0()) {
View view = screenViewHolder.itemView;
i.a.b.a.a.b0(view, "itemView", 112.0f, view);
View view2 = screenViewHolder.f15173i;
((TextView) (view2 != null ? view2.findViewById(R$id.tv_content) : null)).setMaxWidth(Integer.MAX_VALUE);
return;
}
View view3 = screenViewHolder.itemView;
h.d(view3, "itemView");
n0.q(view3, 0);
View view4 = screenViewHolder.f15173i;
((TextView) (view4 != null ? view4.findViewById(R$id.tv_content) : null)).setMaxWidth(y.E(750.0f));
}
}
}
@Override
public int E() {
return R$layout.fragment_gospel_hotline;
}
@Override
public void G() {
}
@Override
public void H() {
View view = getView();
((LoadingLayout) (view == null ? null : view.findViewById(R$id.loading_layout))).k();
View view2 = getView();
((LoadingLayout) (view2 != null ? view2.findViewById(R$id.loading_layout) : null)).setButtonRetryClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
GospelHotlineFragment gospelHotlineFragment = GospelHotlineFragment.this;
int i2 = GospelHotlineFragment.f15968n;
n.i.b.h.e(gospelHotlineFragment, "this$0");
n.m.t.a.p.m.e1.a.g2(new GospelHotlineFragment$loadData$1(gospelHotlineFragment));
}
});
}
@Override
public void onConfigurationChanged(Configuration configuration) {
h.e(configuration, "newConfig");
super.onConfigurationChanged(configuration);
if (v.i()) {
View view = getView();
RecyclerView.Adapter adapter = ((RecyclerView) (view == null ? null : view.findViewById(R$id.rv_list))).getAdapter();
if (adapter == null) {
return;
}
adapter.notifyDataSetChanged();
}
}
@Override
public void onResume() {
super.onResume();
if (this.f15970l) {
return;
}
this.f15970l = true;
a.g2(new GospelHotlineFragment$loadData$1(this));
}
}