正在查看: SpeedCash v6.5.1482 应用的 PulsaGamePriceActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: SpeedCash v6.5.1482 应用的 PulsaGamePriceActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.bm.sc.bebasbayar.ui.activity.info;
import android.app.Activity;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bm.sc.bebasbayar.R;
import com.bm.sc.bebasbayar.adapter.BaseAdapter;
import com.bm.sc.bebasbayar.adapter.entity.ProdukListEntity;
import com.bm.sc.bebasbayar.adapter.list.ProdukListAdapter;
import com.bm.sc.bebasbayar.helper.Affinity;
import com.bm.sc.bebasbayar.helper.MessageParser;
import com.bm.sc.bebasbayar.helper.UBPHelper;
import com.bm.sc.bebasbayar.iface.AdapterInvoker;
import com.bm.sc.bebasbayar.message.BaseMessage;
import com.bm.sc.bebasbayar.message.ServiceMessage;
import com.bm.sc.bebasbayar.setting.session.AppSession;
import com.bm.sc.bebasbayar.setting.session.DataSession;
import com.bm.sc.bebasbayar.ui.BaseActivity;
import com.bm.sc.util.android.ViewAnimator;
import com.bm.sc.util.common.Var;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Objects;
public class PulsaGamePriceActivity extends BaseActivity implements AdapterInvoker<ProdukListEntity>, RadioGroup.OnCheckedChangeListener {
public RadioGroup c;
public a d;
public static class a extends ProdukListAdapter {
public final ArrayList<ProdukListEntity> g;
public boolean h;
public a(AdapterInvoker<ProdukListEntity> adapterInvoker) {
super(adapterInvoker);
this.g = new ArrayList<>();
this.h = true;
}
public boolean c() {
return this.h;
}
public void d() {
updateList(this.g);
}
public void e(boolean z) {
this.h = z;
}
public void setList(ArrayList<ProdukListEntity> arrayList) {
this.g.clear();
this.g.addAll(arrayList);
d();
}
@Override
public void bindLayoutInflated(ProdukListAdapter.ViewHolder viewHolder, int i) {
super.bindLayoutInflated(viewHolder, i);
viewHolder.clp_cursor.setVisibility(c() ? 0 : 4);
}
}
@Override
public String getClassSimpleName() {
return "pulsagameprice";
}
@Override
public Activity getInvokerActivity() {
return this;
}
@Override
public int getLayoutResource() {
return R.layout.activity_price_pulsa_game;
}
@Override
public String getWikiNameSpace() {
return null;
}
@Override
public boolean isEligibleForFavorit() {
return false;
}
@Override
public boolean isSearchVisible() {
return false;
}
@Override
public void onBackPressed() {
if (this.d.c()) {
super.onBackPressed();
} else {
p(this.c.getCheckedRadioButtonId() == 2131362041 ? "game" : "pulsa", null);
}
}
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i) {
if (i == 2131362041) {
p("game", null);
} else if (i == 2131362044) {
p("pulsa", null);
}
}
@Override
public void onClick(View view) {
if (view.getId() != 2131362395) {
super.onClick(view);
return;
}
HashMap hashMap = new HashMap();
hashMap.put("userid", this.appSession.retrieve(AppSession.PROPERTY_MERCHANT_ID));
hashMap.put(BaseMessage.INDEX_APPID, "SPEEDCASH");
ServiceMessage serviceMessage = new ServiceMessage("rpc_invoice", (int) System.currentTimeMillis());
serviceMessage.setRequestMethod("put");
serviceMessage.setMethod("info_harga_pulsa_game");
serviceMessage.setData(hashMap);
StringBuilder sb = new StringBuilder();
sb.append("onClick: ");
sb.append(serviceMessage);
Affinity.send_service(this, serviceMessage, getString(2132017323) + "-InfoHargaPulsaGame.pdf");
}
@Override
public boolean onClose() {
this.d.d();
return false;
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
RadioGroup radioGroup = (RadioGroup) findViewById(R.id.appg_group_btn);
this.c = radioGroup;
radioGroup.setOnCheckedChangeListener(this);
findViewById(R.id.btn_print).setOnClickListener(this);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.appg_list);
recyclerView.setLayoutManager(new LinearLayoutManager(this, 1, false));
a aVar = new a(this);
this.d = aVar;
aVar.setViewAnimator(ViewAnimator.createAnimator(recyclerView));
recyclerView.setAdapter(this.d);
p("pulsa", null);
}
@Override
public boolean onQueryTextChange(String str) {
if (str.isEmpty()) {
return false;
}
ArrayList arrayList = new ArrayList();
String lowerCase = str.toLowerCase(Locale.getDefault());
Iterator it = this.d.g.iterator();
while (it.hasNext()) {
ProdukListEntity produkListEntity = (ProdukListEntity) it.next();
if (produkListEntity.getCode().toLowerCase(Locale.getDefault()).contains(lowerCase) || produkListEntity.getName().toLowerCase(Locale.getDefault()).contains(lowerCase) || (produkListEntity.getSubname() != null && produkListEntity.getSubname().toLowerCase(Locale.getDefault()).contains(lowerCase))) {
arrayList.add(produkListEntity);
}
}
this.d.updateList(arrayList);
return false;
}
public final void p(String str, String str2) {
setSearchText("");
HashMap<String, HashMap<String, HashMap<String, String>>> parseProduk = MessageParser.PulsaGame.parseProduk(this.dataSession.retrieve(q(str)));
HashMap<String, Integer> productIconList = UBPHelper.getProductIconList();
ArrayList<ProdukListEntity> arrayList = new ArrayList<>();
Typeface createFromAsset = Typeface.createFromAsset(getAssets(), getString(R.string.font_bold));
Typeface createFromAsset2 = Typeface.createFromAsset(getAssets(), getString(R.string.font_reguler));
Integer valueOf = Integer.valueOf(R.drawable.ic_bb_ubp_game_24dp);
String str3 = "game";
int i = R.color.DoveGray;
int i2 = 0;
if (str2 == null) {
for (String str4 : parseProduk.keySet()) {
ProdukListEntity produkListEntity = new ProdukListEntity(str, str4);
if (str.equals("game")) {
produkListEntity.setDrawable_resid(valueOf);
((RadioButton) findViewById(R.id.appg_pulsa)).setTextColor(getResources().getColor(i));
((RadioButton) findViewById(R.id.appg_pulsa)).setTypeface(createFromAsset2, i2);
((RadioButton) findViewById(R.id.appg_game)).setTextColor(getResources().getColor(R.color.White));
((RadioButton) findViewById(R.id.appg_game)).setTypeface(createFromAsset, 1);
} else {
produkListEntity.setDrawable_resid(Integer.valueOf(Var.toInt(productIconList.get(str4), R.drawable.ic_bb_ubp_pulsa_24dp)));
((RadioButton) findViewById(R.id.appg_pulsa)).setTextColor(getResources().getColor(R.color.White));
((RadioButton) findViewById(R.id.appg_pulsa)).setTypeface(createFromAsset, 1);
((RadioButton) findViewById(R.id.appg_game)).setTextColor(getResources().getColor(R.color.DoveGray));
((RadioButton) findViewById(R.id.appg_game)).setTypeface(createFromAsset2, 0);
}
arrayList.add(produkListEntity);
i = R.color.DoveGray;
i2 = 0;
}
} else {
HashMap hashMap = Var.toHashMap(parseProduk.get(str2));
StringBuilder sb = new StringBuilder();
sb.append("populateProduct: ");
sb.append(str2);
for (String str5 : hashMap.keySet()) {
HashMap hashMap2 = (HashMap) hashMap.get(str5);
Objects.requireNonNull(hashMap2);
ProdukListEntity produkListEntity2 = new ProdukListEntity(str5, Var.toString(hashMap2.get("namaproduk"), "-"));
produkListEntity2.setSubname(str5);
if (str.equals(str3)) {
produkListEntity2.setDrawable_resid(valueOf);
((RadioButton) findViewById(R.id.appg_pulsa)).setTextColor(getResources().getColor(R.color.DoveGray));
((RadioButton) findViewById(R.id.appg_pulsa)).setTypeface(createFromAsset2, 0);
((RadioButton) findViewById(R.id.appg_game)).setTextColor(getResources().getColor(R.color.White));
((RadioButton) findViewById(R.id.appg_game)).setTypeface(createFromAsset, 1);
} else {
produkListEntity2.setDrawable_resid(Integer.valueOf(Var.toInt(productIconList.get(str2), R.drawable.ic_bb_ubp_pulsa_24dp)));
((RadioButton) findViewById(R.id.appg_pulsa)).setTextColor(getResources().getColor(R.color.White));
((RadioButton) findViewById(R.id.appg_pulsa)).setTypeface(createFromAsset, 1);
((RadioButton) findViewById(R.id.appg_game)).setTextColor(getResources().getColor(R.color.DoveGray));
((RadioButton) findViewById(R.id.appg_game)).setTypeface(createFromAsset2, 0);
}
produkListEntity2.setPrice(Double.valueOf(Var.toDouble(hashMap2.get("hargajual"), 0.0d)));
arrayList.add(produkListEntity2);
str3 = str3;
}
}
this.d.e(str2 == null);
this.d.setList(arrayList);
}
public final String q(String str) {
return str.equalsIgnoreCase("game") ? DataSession.PROPERTY_LIST_GAME_NEW : DataSession.PROPERTY_LIST_PULSA_NEW;
}
@Override
public void adapterResult(BaseAdapter baseAdapter, ProdukListEntity produkListEntity, int i) {
if (produkListEntity.getCode().equals("game") || produkListEntity.getCode().equals("pulsa")) {
p(produkListEntity.getCode(), produkListEntity.getName());
}
}
}