正在查看: Mint v5.7.3 应用的 n.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 n.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package e8;
import android.content.Context;
import android.view.ViewGroup;
import android.widget.LinearLayout;
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.RecosPojo;
import org.json.JSONObject;
import x4.km0;
public class n 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 km0 h;
RecosPojo i;
String j;
private final String a = "Analysis";
int o = 0;
public n(LinearLayout linearLayout, AppCompatActivity appCompatActivity, Context context, String str, String str2) {
this.b = linearLayout;
this.c = appCompatActivity;
this.e = context;
this.f = str;
this.g = str2;
}
private void b(RecosPojo recosPojo) {
if (recosPojo != null) {
this.h.h.setText(String.format(this.e.getString(2131952318), Integer.valueOf(recosPojo.getNoOfRecommendations())));
int tickerRatingValue = recosPojo.getTickerRatingValue();
if (tickerRatingValue == 1) {
this.h.d.setVisibility(0);
return;
}
if (tickerRatingValue == 2) {
this.h.a.setVisibility(0);
return;
}
if (tickerRatingValue == 3) {
this.h.b.setVisibility(0);
} else if (tickerRatingValue == 4) {
this.h.c.setVisibility(0);
} else {
if (tickerRatingValue != 5) {
return;
}
this.h.e.setVisibility(0);
}
}
}
public void a() {
String str;
this.b.removeAllViews();
this.d = new k6.p(this.e, this, "Analysis");
this.h = DataBindingUtil.inflate(this.c.getLayoutInflater(), 2131625171, (ViewGroup) null, false);
this.j = "https://api-mintgenie.livemint.com/api-gateway/core/api/v1/stock/stock-recommendation/" + this.f;
if (k6.p.i[0] == null || (str = k6.p.r) == null || !str.equals(this.f)) {
this.d.d(this.j);
} else {
RecosPojo recosPojo = k6.p.i[0];
this.i = recosPojo;
b(recosPojo);
}
this.h.c(Boolean.valueOf(AppController.j().E()));
this.b.addView(this.h.getRoot());
}
@Override
public void getAboutCompanyData(JSONObject jSONObject, String str) {
if (str.equalsIgnoreCase(this.j)) {
RecosPojo recosPojo = (RecosPojo) new Gson().fromJson(jSONObject.toString(), RecosPojo.class);
this.i = recosPojo;
b(recosPojo);
}
}
@Override
public void onError(String str, String str2) {
}
}