正在查看: Mint v5.7.3 应用的 o.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 o.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package e8;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import com.google.gson.Gson;
import com.htmedia.mint.AppController;
import com.htmedia.mint.pojo.companydetailnew.KeyMetricsPojo;
import com.htmedia.mint.pojo.companydetailnew.PriceandVolume;
import com.htmedia.mint.pojo.companydetailnew.RiskPojo;
import com.htmedia.mint.utils.f0;
import com.htmedia.mint.utils.o1;
import com.thoughtbot.expandablerecyclerview.BuildConfig;
import java.util.HashMap;
import org.json.JSONObject;
import x4.u3;
import x4.yk0;
public class o implements k6.q {
private final LinearLayout b;
private final AppCompatActivity c;
private k6.p d;
private final Context e;
private String f;
private String g;
private u3 h;
RiskPojo i;
String j;
String o;
KeyMetricsPojo q;
private final String a = "Analysis";
int p = 0;
private final HashMap<String, String> r = new HashMap<>();
public o(LinearLayout linearLayout, AppCompatActivity appCompatActivity, Context context, String str, String str2, KeyMetricsPojo keyMetricsPojo) {
this.b = linearLayout;
this.c = appCompatActivity;
this.e = context;
this.f = str;
this.g = str2;
this.q = keyMetricsPojo;
}
public String a(String str) {
if (str != null) {
try {
} catch (Exception unused) {
o1.a("Exception in", " formatting number ");
}
if (!str.equalsIgnoreCase(BuildConfig.FLAVOR)) {
str = String.format("%,.2f", Float.valueOf(Float.parseFloat(str)));
return str;
}
}
str = BuildConfig.FLAVOR + str;
return str;
}
void b() {
String str;
if (k6.p.h[0] != null && (str = k6.p.r) != null && str.equals(this.f)) {
this.q = k6.p.h[0];
e();
return;
}
String str2 = "https://api-mintgenie.livemint.com/api-gateway/fundamental/api/v2/webKeyMetricsRatios/" + this.f;
this.o = str2;
this.d.h(str2);
}
public void c() {
this.b.removeAllViews();
this.d = new k6.p(this.e, this, "Analysis");
this.h = DataBindingUtil.inflate(this.c.getLayoutInflater(), 2131624041, (ViewGroup) null, false);
String str = "https://api-mintgenie.livemint.com/api-gateway/fundamental/api/v2/volatityCategorization/" + this.f + "/BSE";
this.j = str;
this.d.d(str);
this.h.x.setText(String.format(this.e.getString(2131951694), this.g));
this.h.c(Boolean.valueOf(AppController.j().E()));
if (this.q == null) {
b();
} else {
e();
}
this.h.c(Boolean.valueOf(AppController.j().E()));
this.b.addView(this.h.getRoot());
}
void d(HashMap<String, String> hashMap) {
if (hashMap != null) {
this.h.p.removeAllViews();
LayoutInflater from = LayoutInflater.from(this.e);
for (String str : com.htmedia.mint.utils.q.i) {
yk0 inflate = DataBindingUtil.inflate(from, 2131625146, this.h.p, false);
inflate.e.setText(str);
inflate.c(Boolean.valueOf(AppController.j().E()));
String str2 = hashMap.get(str);
if (str2 != null) {
try {
if (str2.contains("-")) {
String replace = str2.replace("-", BuildConfig.FLAVOR);
int parseFloat = (int) (Float.parseFloat(replace) * 100.0f);
inflate.d.setVisibility(0);
inflate.g.setVisibility(0);
inflate.d.getBackground().setLevel(parseFloat);
inflate.g.setText(f0.H0(replace) + "%");
} else {
int parseFloat2 = (int) (Float.parseFloat(str2) * 100.0f);
inflate.d.setVisibility(8);
inflate.g.setVisibility(8);
inflate.b.setVisibility(0);
inflate.f.setVisibility(0);
inflate.b.getBackground().setLevel(parseFloat2);
inflate.f.setText(f0.H0(str2) + "%");
}
} catch (Exception e) {
e.printStackTrace();
}
}
this.h.p.addView(inflate.getRoot());
}
}
}
void e() {
KeyMetricsPojo keyMetricsPojo = this.q;
if (keyMetricsPojo == null || keyMetricsPojo.getRatiosWeb() == null || this.q.getRatiosWeb().getPriceandVolume() == null || this.q.getRatiosWeb().getPriceandVolume().size() <= 0) {
return;
}
for (PriceandVolume priceandVolume : this.q.getRatiosWeb().getPriceandVolume()) {
if (priceandVolume != null) {
String key = priceandVolume.getKey();
key.hashCode();
switch (key) {
case "price5DayPercentChange":
this.r.put(com.htmedia.mint.utils.q.i[0], priceandVolume.getValue());
break;
case "price52WeekPricePercentChange":
this.r.put(com.htmedia.mint.utils.q.i[4], priceandVolume.getValue());
break;
case "price26WeekPricePercentChange":
this.r.put(com.htmedia.mint.utils.q.i[2], priceandVolume.getValue());
break;
case "price13WeekPricePercentChange":
this.r.put(com.htmedia.mint.utils.q.i[1], priceandVolume.getValue());
break;
case "priceYTDPricePercentChange":
this.r.put(com.htmedia.mint.utils.q.i[3], priceandVolume.getValue());
break;
}
}
}
d(this.r);
}
void f() {
RiskPojo riskPojo = this.i;
if (riskPojo == null || TextUtils.isEmpty(riskPojo.getCategoryName())) {
return;
}
int stdDev = (int) this.i.getStdDev();
if (stdDev < 15) {
TextView textView = this.h.t;
StringBuilder sb2 = new StringBuilder();
sb2.append(a(this.i.getStdDev() + BuildConfig.FLAVOR));
sb2.append("%");
textView.setText(sb2.toString());
this.h.C.setText(this.i.getCategoryName());
this.h.b.setVisibility(0);
this.h.g.setVisibility(0);
this.h.t.setVisibility(0);
this.h.C.setVisibility(0);
return;
}
if (stdDev < 25) {
TextView textView2 = this.h.s;
StringBuilder sb3 = new StringBuilder();
sb3.append(a(this.i.getStdDev() + BuildConfig.FLAVOR));
sb3.append("%");
textView2.setText(sb3.toString());
this.h.A.setText(this.i.getCategoryName());
this.h.d.setVisibility(0);
this.h.i.setVisibility(0);
this.h.s.setVisibility(0);
this.h.A.setVisibility(0);
return;
}
if (stdDev < 45) {
TextView textView3 = this.h.q;
StringBuilder sb4 = new StringBuilder();
sb4.append(a(this.i.getStdDev() + BuildConfig.FLAVOR));
sb4.append("%");
textView3.setText(sb4.toString());
this.h.y.setText(this.i.getCategoryName());
this.h.a.setVisibility(0);
this.h.f.setVisibility(0);
this.h.q.setVisibility(0);
this.h.y.setVisibility(0);
return;
}
if (stdDev < 65) {
TextView textView4 = this.h.u;
StringBuilder sb5 = new StringBuilder();
sb5.append(a(this.i.getStdDev() + BuildConfig.FLAVOR));
sb5.append("%");
textView4.setText(sb5.toString());
this.h.B.setText(this.i.getCategoryName());
this.h.e.setVisibility(0);
this.h.j.setVisibility(0);
this.h.u.setVisibility(0);
this.h.B.setVisibility(0);
return;
}
TextView textView5 = this.h.r;
StringBuilder sb6 = new StringBuilder();
sb6.append(a(this.i.getStdDev() + BuildConfig.FLAVOR));
sb6.append("%");
textView5.setText(sb6.toString());
this.h.z.setText(this.i.getCategoryName());
this.h.c.setVisibility(0);
this.h.h.setVisibility(0);
this.h.r.setVisibility(0);
this.h.z.setVisibility(0);
}
@Override
public void getAboutCompanyData(JSONObject jSONObject, String str) {
if (str.equalsIgnoreCase(this.j)) {
this.i = (RiskPojo) new Gson().fromJson(jSONObject.toString(), RiskPojo.class);
f();
} else if (str.equalsIgnoreCase(this.o)) {
this.q = (KeyMetricsPojo) new Gson().fromJson(jSONObject.toString(), KeyMetricsPojo.class);
e();
}
}
@Override
public void onError(String str, String str2) {
}
}