what-the-bank/sources/o/fLC.java

238 lines
10 KiB
Java

package o;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.ButterKnife;
import com.scb.phone.view.adapter.investment.assessment.BasicAssetAllocationAdapter;
import com.scb.phone.view.fragment.investment.assessment.RiskAssessmentSuccessScreenshotFragment;
import java.util.Arrays;
import java.util.Calendar;
/* loaded from: classes5.dex */
public final class fLC {
private final C6204cLu c;
@InterfaceC13391fZD
public fLC(C6204cLu c6204cLu) {
C14957gcv.e(c6204cLu, "");
this.c = c6204cLu;
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Multi-variable type inference failed */
public static final Uri aAF_(fLC flc, C0816Pb c0816Pb, Context context, YV yv, boolean z) {
C14957gcv.e(flc, "");
C14957gcv.e(c0816Pb, "");
C14957gcv.e(context, "");
C14957gcv.e(yv, "");
StringBuilder sb = new StringBuilder();
sb.append(c0816Pb.e);
if (z) {
sb.append("-");
sb.append(Calendar.getInstance().getTimeInMillis());
}
gcH gch = gcH.d;
String format = String.format("FUND_%s.jpg", Arrays.copyOf(new Object[]{sb}, 1));
C14957gcv.c((Object) format, "");
Bitmap bitmap = null;
try {
LayoutInflater from = LayoutInflater.from(context);
LinearLayout linearLayout = new LinearLayout(context);
linearLayout.setLayoutParams(new LinearLayout.LayoutParams(-1, -2));
C14866gag c14866gag = C14866gag.c;
View inflate = from.inflate(com.scb.phone.R.layout.2131560135, (ViewGroup) linearLayout, false);
RiskAssessmentSuccessScreenshotFragment riskAssessmentSuccessScreenshotFragment = new RiskAssessmentSuccessScreenshotFragment();
C14957gcv.c(inflate, "");
C14957gcv.e(c0816Pb, "");
C14957gcv.e(inflate, "");
C14957gcv.e(context, "");
C14957gcv.e(yv, "");
ButterKnife.c(riskAssessmentSuccessScreenshotFragment, inflate);
LinearLayout linearLayout2 = riskAssessmentSuccessScreenshotFragment.llLayoutName;
if (linearLayout2 == null) {
C14957gcv.a("");
linearLayout2 = null;
}
LinearLayout linearLayout3 = linearLayout2;
C14957gcv.e(linearLayout3, "");
fKI.e(linearLayout3, 24, 0, 24, 0);
View view = riskAssessmentSuccessScreenshotFragment.vwSeparatorName;
if (view == null) {
C14957gcv.a("");
view = null;
}
C14957gcv.e(view, "");
fKI.e(view, 0, 0, 0, 0);
LinearLayout linearLayout4 = riskAssessmentSuccessScreenshotFragment.llLayoutScore;
if (linearLayout4 == null) {
C14957gcv.a("");
linearLayout4 = null;
}
LinearLayout linearLayout5 = linearLayout4;
C14957gcv.e(linearLayout5, "");
fKI.e(linearLayout5, 24, 0, 24, 0);
View view2 = riskAssessmentSuccessScreenshotFragment.vwSeparatorScore;
if (view2 == null) {
C14957gcv.a("");
view2 = null;
}
C14957gcv.e(view2, "");
fKI.e(view2, 0, 0, 0, 0);
LinearLayout linearLayout6 = riskAssessmentSuccessScreenshotFragment.llLayoutRiskLevel;
if (linearLayout6 == null) {
C14957gcv.a("");
linearLayout6 = null;
}
LinearLayout linearLayout7 = linearLayout6;
C14957gcv.e(linearLayout7, "");
fKI.e(linearLayout7, 24, 0, 24, 0);
View view3 = riskAssessmentSuccessScreenshotFragment.vwSeparatorRiskLevel;
if (view3 == null) {
C14957gcv.a("");
view3 = null;
}
C14957gcv.e(view3, "");
fKI.e(view3, 0, 0, 0, 0);
LinearLayout linearLayout8 = riskAssessmentSuccessScreenshotFragment.llLayoutInvestorType;
if (linearLayout8 == null) {
C14957gcv.a("");
linearLayout8 = null;
}
LinearLayout linearLayout9 = linearLayout8;
C14957gcv.e(linearLayout9, "");
fKI.e(linearLayout9, 24, 0, 24, 0);
View view4 = riskAssessmentSuccessScreenshotFragment.vwSeparatorInvestorType;
if (view4 == null) {
C14957gcv.a("");
view4 = null;
}
C14957gcv.e(view4, "");
fKI.e(view4, 0, 0, 0, 0);
TextView textView = riskAssessmentSuccessScreenshotFragment.tvBaaTitle;
if (textView == null) {
C14957gcv.a("");
textView = null;
}
TextView textView2 = textView;
C14957gcv.e(textView2, "");
fKI.e(textView2, 24, 16, 24, 16);
RecyclerView recyclerView = riskAssessmentSuccessScreenshotFragment.rvBaa;
if (recyclerView == null) {
C14957gcv.a("");
recyclerView = null;
}
RecyclerView recyclerView2 = recyclerView;
C14957gcv.e(recyclerView2, "");
fKI.e(recyclerView2, 24, 0, 24, 0);
TextView textView3 = riskAssessmentSuccessScreenshotFragment.tvRiskSuccessName;
if (textView3 == null) {
C14957gcv.a("");
textView3 = null;
}
textView3.setText(c0816Pb.c);
TextView textView4 = riskAssessmentSuccessScreenshotFragment.tvRiskSuccessScore;
if (textView4 == null) {
C14957gcv.a("");
textView4 = null;
}
textView4.setText(c0816Pb.i);
if (yv == YV.NEW_SUITABILITY) {
TextView textView5 = riskAssessmentSuccessScreenshotFragment.tvTitle;
if (textView5 == null) {
C14957gcv.a("");
textView5 = null;
}
textView5.setText(com.scb.phone.R.string.auto_single_form_suitability_test_successful_header);
TextView textView6 = riskAssessmentSuccessScreenshotFragment.tvRiskSuccessNameLabel;
if (textView6 == null) {
C14957gcv.a("");
textView6 = null;
}
textView6.setText(com.scb.phone.R.string.single_form_mf_risk_review_name);
LinearLayout linearLayout10 = riskAssessmentSuccessScreenshotFragment.llLayoutRiskLevel;
if (linearLayout10 == null) {
C14957gcv.a("");
linearLayout10 = null;
}
linearLayout10.setVisibility(0);
View view5 = riskAssessmentSuccessScreenshotFragment.vwSeparatorRiskLevel;
if (view5 == null) {
C14957gcv.a("");
view5 = null;
}
view5.setVisibility(0);
TextView textView7 = riskAssessmentSuccessScreenshotFragment.tvRiskLevel;
if (textView7 == null) {
C14957gcv.a("");
textView7 = null;
}
textView7.setText(c0816Pb.d);
} else {
TextView textView8 = riskAssessmentSuccessScreenshotFragment.tvTitle;
if (textView8 == null) {
C14957gcv.a("");
textView8 = null;
}
textView8.setText(com.scb.phone.R.string.risk_success_title);
LinearLayout linearLayout11 = riskAssessmentSuccessScreenshotFragment.llLayoutRiskLevel;
if (linearLayout11 == null) {
C14957gcv.a("");
linearLayout11 = null;
}
linearLayout11.setVisibility(8);
View view6 = riskAssessmentSuccessScreenshotFragment.vwSeparatorRiskLevel;
if (view6 == null) {
C14957gcv.a("");
view6 = null;
}
view6.setVisibility(8);
}
TextView textView9 = riskAssessmentSuccessScreenshotFragment.tvRiskSuccessInvestorType;
if (textView9 == null) {
C14957gcv.a("");
textView9 = null;
}
textView9.setText(c0816Pb.g);
TextView textView10 = riskAssessmentSuccessScreenshotFragment.tvDateTime;
if (textView10 == null) {
C14957gcv.a("");
textView10 = null;
}
textView10.setText(c0816Pb.e);
RecyclerView recyclerView3 = riskAssessmentSuccessScreenshotFragment.rvBaa;
if (recyclerView3 == null) {
C14957gcv.a("");
recyclerView3 = null;
}
recyclerView3.d(new eCG(context, 12), -1);
recyclerView3.setNestedScrollingEnabled(false);
recyclerView3.setLayoutManager(new LinearLayoutManager(1, false));
recyclerView3.setAdapter(new BasicAssetAllocationAdapter(c0816Pb.a));
C14957gcv.c(inflate, "");
DisplayMetrics displayMetrics = new DisplayMetrics();
Object systemService = context.getSystemService("window");
WindowManager windowManager = systemService instanceof WindowManager ? (WindowManager) systemService : null;
if (windowManager != null) {
windowManager.getDefaultDisplay().getMetrics(displayMetrics);
}
C13396fZU c13396fZU = new C13396fZU(Integer.valueOf(displayMetrics.widthPixels), Integer.valueOf(inflate.getLayoutParams().height));
bitmap = C12946fLx.aAB_(inflate, ((Number) c13396fZU.d).intValue(), ((Number) c13396fZU.e).intValue());
return C6582cXO.VN_(bitmap, format, context);
} finally {
if (bitmap != null) {
bitmap.recycle();
}
}
}
}