正在查看: Kahramaa v15.23.3 应用的 EzabRequestFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Kahramaa v15.23.3 应用的 EzabRequestFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.qa.kahramaa.kahramaa.ezab.fragments;
import android.app.AlertDialog;
import android.content.Context;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import butterknife.BindView;
import com.qa.kahramaa.kahramaa.base.retrofit.WebServiceFactoryV2;
import com.qa.kahramaa.kahramaa.base.retrofit.d;
import com.qa.kahramaa.kahramaa.base.retrofit.h;
import com.qa.kahramaa.kahramaa.base.ui.views.AnyEditTextView;
import com.qa.kahramaa.kahramaa.base.ui.views.AnyTextView;
import ib.w;
import java.util.ArrayList;
import java.util.HashMap;
import nb.a0;
import nb.p;
public class EzabRequestFragment extends hb.a {
public static final int f4282w0 = 0;
@BindView
public Spinner area_spinner;
@BindView
public CoordinatorLayout coordinatorLayout;
@BindView
public AnyEditTextView et_cust_comment;
@BindView
public AnyEditTextView et_cust_contract_end_date;
@BindView
public AnyEditTextView et_cust_contract_start_date;
@BindView
public AnyEditTextView et_cust_name;
@BindView
public AnyEditTextView et_cust_qid;
@BindView
public ImageView img_att_water_meter;
@BindView
public ImageView img_att_water_tank;
public String f4283k0;
public String f4284l0;
@BindView
public LinearLayout ll_area_type;
@BindView
public LinearLayout ll_attach_template;
@BindView
public LinearLayout ll_attach_water_meter;
@BindView
public LinearLayout ll_attach_water_tank;
@BindView
public LinearLayout ll_followup;
public String f4285m0;
public ArrayList<String> f4286n0;
public ArrayList<String> f4287o0;
public String f4289q0;
public HashMap<String, p> f4292t0;
@BindView
public AnyTextView tv_att_head;
@BindView
public AnyTextView tv_btn_request;
@BindView
public TextView tx_area_type;
public HashMap<String, p> f4293u0;
public String f4288p0 = "";
public String f4290r0 = "";
public String f4291s0 = "";
public b f4294v0 = new b();
public class a implements a0.b {
public final int f4295a;
public a(int i10) {
this.f4295a = i10;
}
@Override
public final void a(String str, HashMap<String, p> hashMap) {
int i10 = this.f4295a;
if (i10 == 1) {
EzabRequestFragment ezabRequestFragment = EzabRequestFragment.this;
ezabRequestFragment.f4290r0 = str;
ezabRequestFragment.f4292t0 = hashMap;
if (TextUtils.isEmpty(str)) {
EzabRequestFragment.this.img_att_water_meter.setImageResource(2131231254);
EzabRequestFragment ezabRequestFragment2 = EzabRequestFragment.this;
ezabRequestFragment2.img_att_water_meter.setColorFilter(ezabRequestFragment2.w().getColor(2131099884), PorterDuff.Mode.SRC_ATOP);
} else {
EzabRequestFragment.this.img_att_water_meter.setImageResource(2131231256);
EzabRequestFragment ezabRequestFragment3 = EzabRequestFragment.this;
ezabRequestFragment3.img_att_water_meter.setColorFilter(ezabRequestFragment3.w().getColor(2131099802), PorterDuff.Mode.SRC_ATOP);
}
} else if (i10 == 2) {
EzabRequestFragment ezabRequestFragment4 = EzabRequestFragment.this;
ezabRequestFragment4.f4291s0 = str;
ezabRequestFragment4.f4293u0 = hashMap;
if (TextUtils.isEmpty(str)) {
EzabRequestFragment.this.img_att_water_tank.setImageResource(2131231254);
EzabRequestFragment ezabRequestFragment5 = EzabRequestFragment.this;
ezabRequestFragment5.img_att_water_tank.setColorFilter(ezabRequestFragment5.w().getColor(2131099884), PorterDuff.Mode.SRC_ATOP);
} else {
EzabRequestFragment.this.img_att_water_tank.setImageResource(2131231256);
EzabRequestFragment ezabRequestFragment6 = EzabRequestFragment.this;
ezabRequestFragment6.img_att_water_tank.setColorFilter(ezabRequestFragment6.w().getColor(2131099802), PorterDuff.Mode.SRC_ATOP);
}
}
EzabRequestFragment ezabRequestFragment7 = EzabRequestFragment.this;
int i11 = EzabRequestFragment.f4282w0;
ezabRequestFragment7.z0();
}
}
public class b implements TextWatcher {
public b() {
}
@Override
public final void afterTextChanged(Editable editable) {
}
@Override
public final void beforeTextChanged(CharSequence charSequence, int i10, int i11, int i12) {
}
@Override
public final void onTextChanged(CharSequence charSequence, int i10, int i11, int i12) {
EzabRequestFragment ezabRequestFragment = EzabRequestFragment.this;
int i13 = EzabRequestFragment.f4282w0;
ezabRequestFragment.z0();
}
}
public class c extends AlertDialog {
public Context f4298n;
public AnyTextView f4299o;
public AnyTextView f4300p;
public AlertDialog.Builder q;
public class a implements View.OnClickListener {
public final AlertDialog f4302n;
public a(AlertDialog alertDialog) {
this.f4302n = alertDialog;
}
@Override
public final void onClick(View view) {
EzabRequestFragment ezabRequestFragment = EzabRequestFragment.this;
int i10 = EzabRequestFragment.f4282w0;
db.c.a(ezabRequestFragment.p0()).b(EzabRequestFragment.this.p0());
this.f4302n.dismiss();
EzabRequestFragment.this.p0().w();
}
}
public c(bb.a aVar) {
super(aVar);
this.f4298n = aVar;
}
public final void a(String str) {
View inflate = LayoutInflater.from(this.f4298n).inflate(2131492967, (ViewGroup) null);
AlertDialog.Builder builder = new AlertDialog.Builder(this.f4298n);
this.q = builder;
builder.setView(inflate);
this.f4299o = (AnyTextView) inflate.findViewById(2131297291);
this.f4300p = (AnyTextView) inflate.findViewById(2131296618);
AlertDialog create = this.q.create();
this.f4300p.setText(EzabRequestFragment.this.z(2131689919) + " " + str);
create.setCancelable(false);
create.show();
this.f4299o.setOnClickListener(new a(create));
}
}
public final void A0(int i10) {
a0 a0Var = new a0();
if (i10 == 1) {
String str = this.f4290r0;
HashMap<String, p> hashMap = this.f4292t0;
a0Var.T0 = str;
a0Var.S0 = hashMap;
} else if (i10 == 2) {
String str2 = this.f4291s0;
HashMap<String, p> hashMap2 = this.f4293u0;
a0Var.T0 = str2;
a0Var.S0 = hashMap2;
}
a0Var.f10829a1 = 3;
a0Var.O0 = new a(i10);
a0Var.u0(p0().q(), "");
}
@Override
public final void I(Bundle bundle) {
super.I(bundle);
}
@Override
public final View J(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
return layoutInflater.inflate(2131492994, (ViewGroup) null);
}
@Override
public final void S() {
this.R = true;
this.et_cust_qid.addTextChangedListener(this.f4294v0);
this.et_cust_name.addTextChangedListener(this.f4294v0);
this.et_cust_contract_start_date.addTextChangedListener(this.f4294v0);
this.et_cust_contract_end_date.addTextChangedListener(this.f4294v0);
z0();
za.b.b().getClass();
za.b.c(p0(), z(2131689825), new Bundle[0]);
}
@Override
public final void W(View view, Bundle bundle) {
super.W(view, bundle);
s0().setTitleBarBackgroundColor(0);
this.f1673t.getBoolean("dashboard");
s0().e();
q0().c();
s0().setSubHeading(w().getString(2131689830));
this.ll_followup.setVisibility(8);
s0().d();
s0().a();
s0().b();
this.f4283k0 = this.f1673t.getString("pin_no");
this.f4284l0 = this.f1673t.getString("start_date");
this.f4285m0 = this.f1673t.getString("end_date");
this.et_cust_qid.setText(this.f8208h0.k().f11801s.h());
this.et_cust_name.setText(this.f8208h0.k().f11801s.f());
this.et_cust_contract_start_date.setText(this.f4284l0);
this.et_cust_contract_end_date.setText(this.f4285m0);
this.f4289q0 = String.valueOf(this.f8208h0.k().f11801s.a());
this.tv_att_head.setVisibility(0);
this.et_cust_name.setVisibility(0);
this.et_cust_contract_start_date.setVisibility(0);
this.et_cust_contract_end_date.setVisibility(0);
this.et_cust_comment.setVisibility(0);
this.tv_btn_request.setVisibility(0);
this.area_spinner.setVisibility(0);
WebServiceFactoryV2.c(new com.qa.kahramaa.kahramaa.base.retrofit.c[0]).Z().enqueue(new h(p0(), new kc.b(this)));
}
@Override
public final void onClick(View view) {
switch (view.getId()) {
case 2131297054:
this.area_spinner.performClick();
break;
case 2131297082:
bb.a p02 = p0();
new EzabWebViewFragment();
EzabWebViewFragment ezabWebViewFragment = new EzabWebViewFragment();
Bundle bundle = new Bundle();
bundle.putString("link", "http://docs.google.com/gview?embedded=true&url=https://www.km.com.qa/Consultant/Documents/MFSD-FCS-16-04.pdf");
ezabWebViewFragment.k0(bundle);
p02.t(ezabWebViewFragment);
break;
case 2131297084:
A0(1);
break;
case 2131297086:
A0(2);
break;
case 2131297760:
String obj = this.et_cust_qid.getText().toString();
String obj2 = this.et_cust_name.getText().toString();
String obj3 = this.et_cust_comment.getText().toString();
String b10 = this.f8208h0.k().f11801s.b();
String str = this.f4288p0;
if (str != null && !str.isEmpty()) {
String str2 = this.f4290r0;
if (str2 != null && !"".equals(str2)) {
String str3 = this.f4291s0;
if (str3 != null && !"".equals(str3)) {
String str4 = this.f4289q0;
String obj4 = this.et_cust_contract_start_date.getText().toString();
String obj5 = this.et_cust_contract_end_date.getText().toString();
String str5 = this.f4283k0;
String str6 = this.f4288p0;
String str7 = this.f4290r0;
String str8 = this.f4291s0;
u0();
za.b.b().getClass();
za.b.c(p0(), z(2131690446), new Bundle[0]);
WebServiceFactoryV2.c(new com.qa.kahramaa.kahramaa.base.retrofit.c(d.a().f)).N0(new jc.b(obj, b10, str4, obj4, obj5, obj2, obj3, str5, str6, str7, str8)).enqueue(new h(p0(), new com.qa.kahramaa.kahramaa.ezab.fragments.b(this)));
break;
} else if (p0() != null && C()) {
w.h(this.coordinatorLayout, w().getString(2131689621), 0, new int[0]);
break;
}
} else if (p0() != null && C()) {
w.h(this.coordinatorLayout, w().getString(2131689621), 0, new int[0]);
break;
}
} else if (p0() != null && C()) {
w.h(this.coordinatorLayout, w().getString(2131689842), 0, new int[0]);
break;
}
break;
}
}
@Override
public final void w0() {
this.tv_btn_request.setOnClickListener(this);
this.ll_attach_water_meter.setOnClickListener(this);
this.ll_attach_water_tank.setOnClickListener(this);
this.ll_attach_template.setOnClickListener(this);
this.ll_area_type.setOnClickListener(this);
}
public final void y0(boolean z) {
if (z) {
if (this.tv_btn_request.isEnabled()) {
return;
}
this.tv_btn_request.setEnabled(true);
this.tv_btn_request.setBackgroundDrawable(p0().getResources().getDrawable(2131230871));
return;
}
if (this.tv_btn_request.isEnabled()) {
this.tv_btn_request.setEnabled(false);
this.tv_btn_request.setBackgroundDrawable(p0().getResources().getDrawable(2131230868));
}
}
public final void z0() {
y0(true);
if (this.et_cust_qid.getVisibility() == 0 && this.et_cust_qid.getText().toString().equalsIgnoreCase("")) {
y0(false);
}
if (this.et_cust_name.getVisibility() == 0 && this.et_cust_name.getText().toString().equalsIgnoreCase("")) {
y0(false);
}
if (this.area_spinner.getVisibility() == 0 && this.f4288p0.equalsIgnoreCase("")) {
y0(false);
}
if (this.et_cust_contract_end_date.getVisibility() == 0 && (android.support.v4.media.c.k(this.et_cust_contract_end_date, "") || this.et_cust_contract_end_date.getText().toString().trim().equalsIgnoreCase(w().getString(2131689670)))) {
y0(false);
}
if (this.et_cust_contract_start_date.getVisibility() == 0 && (android.support.v4.media.c.k(this.et_cust_contract_start_date, "") || this.et_cust_contract_start_date.getText().toString().trim().equalsIgnoreCase(w().getString(2131689671)))) {
y0(false);
}
if (this.f4290r0.equalsIgnoreCase("")) {
y0(false);
}
if (this.f4291s0.equalsIgnoreCase("")) {
y0(false);
}
}
}