正在查看: bbinstant v6.24.0 应用的 RatingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: bbinstant v6.24.0 应用的 RatingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.bigbasket.bbinstant.ui.invoice;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.MotionEvent;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.f0;
import androidx.lifecycle.s;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import ch.qos.logback.core.CoreConstants;
import com.bigbasket.bbinstant.core.settings.SettingEntity;
import com.bigbasket.bbinstant.ui.BaseActivity;
import com.bigbasket.bbinstant.ui.invoice.adapters.c;
import com.bigbasket.bbinstant.ui.invoice.entity.RatingTypes;
import com.bigbasket.bbinstant.ui.invoice.viewModel.RatingViewModel;
import com.bigbasket.bbinstant.ui.machine.OrderIdProvider;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import kotlin.e0;
import kotlin.jvm.functions.l;
import kotlin.jvm.internal.Reflection;
import kotlin.jvm.internal.r;
import kotlin.jvm.internal.v;
import kotlin.jvm.internal.w;
import kotlin.text.p;
public final class RatingActivity extends BaseActivity implements View.OnTouchListener {
private String[] arrayMsg_1;
private String[] arrayMsg_2;
private ImageView btnCancel;
private TextView btnSubMit;
private EditText etComment;
private int feedbackMsgAfter;
private com.bigbasket.bbinstant.ui.invoice.adapters.c itemAdapter;
private ImageView ivStar_1;
private ImageView ivStar_1_shadow;
private ImageView ivStar_2;
private ImageView ivStar_2_shadow;
private ImageView ivStar_3;
private ImageView ivStar_3_shadow;
private ImageView ivStar_4;
private ImageView ivStar_4_shadow;
private ImageView ivStar_5;
private ImageView ivStar_5_shadow;
private ArrayList<RatingTypes> listRatingType;
private OrderIdProvider orderIdProvider;
private int ratingGiven;
private RecyclerView rclRatingTypes;
private TextView tvRatingMsg;
private TextView tvRatingmsg_2;
private int typeCount;
public static final class a extends w implements kotlin.jvm.functions.a {
final ComponentActivity $this_viewModels;
public a(ComponentActivity componentActivity) {
super(0);
this.$this_viewModels = componentActivity;
}
public final ViewModelProvider.a m90invoke() {
return this.$this_viewModels.getDefaultViewModelProviderFactory();
}
}
public static final class b extends w implements kotlin.jvm.functions.a {
final ComponentActivity $this_viewModels;
public b(ComponentActivity componentActivity) {
super(0);
this.$this_viewModels = componentActivity;
}
public final ViewModelStore m91invoke() {
return this.$this_viewModels.getViewModelStore();
}
}
public static final class c extends w implements kotlin.jvm.functions.a {
final kotlin.jvm.functions.a $extrasProducer;
final ComponentActivity $this_viewModels;
public c(kotlin.jvm.functions.a aVar, ComponentActivity componentActivity) {
super(0);
this.$extrasProducer = aVar;
this.$this_viewModels = componentActivity;
}
public final CreationExtras m92invoke() {
CreationExtras creationExtras;
kotlin.jvm.functions.a aVar = this.$extrasProducer;
return (aVar == null || (creationExtras = (CreationExtras) aVar.invoke()) == null) ? this.$this_viewModels.getDefaultViewModelCreationExtras() : creationExtras;
}
}
static final class d extends w implements l {
public static final d INSTANCE = new d();
d() {
super(1);
}
public Object invoke(Object obj) {
invoke((String) obj);
return e0.INSTANCE;
}
public final void invoke(String str) {
StringBuilder sb = new StringBuilder();
sb.append("==>> ");
sb.append(str);
}
}
public static final class e implements TextWatcher {
public e() {
}
@Override
public void afterTextChanged(Editable editable) {
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
RatingActivity.this.feedbackMsgAfter = i3;
RatingActivity.this.updateSubmitBtn();
}
}
public static final class f implements c.a {
f() {
}
@Override
public void onItemSelect(int i) {
RatingActivity.this.typeCount = i;
RatingActivity.this.updateSubmitBtn();
}
}
static final class g implements s, r {
private final l function;
g(l lVar) {
v.checkNotNullParameter(lVar, "function");
this.function = lVar;
}
public final boolean equals(Object obj) {
if ((obj instanceof s) && (obj instanceof r)) {
return v.areEqual(getFunctionDelegate(), ((r) obj).getFunctionDelegate());
}
return false;
}
public final kotlin.b getFunctionDelegate() {
return this.function;
}
public final int hashCode() {
return getFunctionDelegate().hashCode();
}
@Override
public final void onChanged(Object obj) {
this.function.invoke(obj);
}
}
private final void callOnTouch() {
int i = this.ratingGiven;
if (i == 1) {
ImageView imageView = this.ivStar_1;
if (imageView == null) {
v.throwUninitializedPropertyAccessException("ivStar_1");
imageView = null;
}
onTouch(imageView, null);
return;
}
if (i == 2) {
ImageView imageView2 = this.ivStar_2;
if (imageView2 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2");
imageView2 = null;
}
onTouch(imageView2, null);
return;
}
if (i == 3) {
ImageView imageView3 = this.ivStar_3;
if (imageView3 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3");
imageView3 = null;
}
onTouch(imageView3, null);
return;
}
if (i == 4) {
ImageView imageView4 = this.ivStar_4;
if (imageView4 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4");
imageView4 = null;
}
onTouch(imageView4, null);
return;
}
if (i != 5) {
return;
}
ImageView imageView5 = this.ivStar_5;
if (imageView5 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5");
imageView5 = null;
}
onTouch(imageView5, null);
}
private final String getRatingTypes() {
com.bigbasket.bbinstant.ui.invoice.adapters.c cVar = this.itemAdapter;
if (cVar == null) {
v.throwUninitializedPropertyAccessException("itemAdapter");
cVar = null;
}
Iterator<RatingTypes> it = cVar.getSelectedTypes().iterator();
String str = "";
while (it.hasNext()) {
str = str + CoreConstants.COMMA_CHAR + it.next().getTypeName();
}
return str;
}
private final void handleRationBarColor(int i) {
String str;
String str2;
String str3;
this.ratingGiven = i;
TextView textView = this.tvRatingMsg;
ImageView imageView = null;
if (textView == null) {
v.throwUninitializedPropertyAccessException("tvRatingMsg");
textView = null;
}
if (Integer.valueOf(i).equals(0)) {
str = " ";
} else {
String[] strArr = this.arrayMsg_1;
if (strArr == null) {
v.throwUninitializedPropertyAccessException("arrayMsg_1");
strArr = null;
}
str = strArr[i - 1];
}
textView.setText(str);
TextView textView2 = this.tvRatingMsg;
if (i > 2) {
if (textView2 == null) {
v.throwUninitializedPropertyAccessException("tvRatingMsg");
textView2 = null;
}
str2 = "#689F38";
} else {
if (textView2 == null) {
v.throwUninitializedPropertyAccessException("tvRatingMsg");
textView2 = null;
}
str2 = "#E95F62";
}
textView2.setTextColor(Color.parseColor(str2));
TextView textView3 = this.tvRatingmsg_2;
if (textView3 == null) {
v.throwUninitializedPropertyAccessException("tvRatingmsg_2");
textView3 = null;
}
if (Integer.valueOf(i).equals(0)) {
str3 = getString(2131886432);
} else {
String[] strArr2 = this.arrayMsg_2;
if (strArr2 == null) {
v.throwUninitializedPropertyAccessException("arrayMsg_2");
strArr2 = null;
}
str3 = strArr2[i - 1];
}
textView3.setText(str3);
if (i == 1) {
ImageView imageView2 = this.ivStar_1_shadow;
if (imageView2 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1_shadow");
imageView2 = null;
}
imageView2.setVisibility(0);
ImageView imageView3 = this.ivStar_2_shadow;
if (imageView3 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2_shadow");
imageView3 = null;
}
imageView3.setVisibility(4);
ImageView imageView4 = this.ivStar_3_shadow;
if (imageView4 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3_shadow");
imageView4 = null;
}
imageView4.setVisibility(4);
ImageView imageView5 = this.ivStar_4_shadow;
if (imageView5 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4_shadow");
imageView5 = null;
}
imageView5.setVisibility(4);
ImageView imageView6 = this.ivStar_5_shadow;
if (imageView6 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5_shadow");
} else {
imageView = imageView6;
}
imageView.setVisibility(4);
return;
}
if (i == 2) {
ImageView imageView7 = this.ivStar_1_shadow;
if (imageView7 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1_shadow");
imageView7 = null;
}
imageView7.setVisibility(0);
ImageView imageView8 = this.ivStar_2_shadow;
if (imageView8 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2_shadow");
imageView8 = null;
}
imageView8.setVisibility(0);
ImageView imageView9 = this.ivStar_3_shadow;
if (imageView9 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3_shadow");
imageView9 = null;
}
imageView9.setVisibility(4);
ImageView imageView10 = this.ivStar_4_shadow;
if (imageView10 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4_shadow");
imageView10 = null;
}
imageView10.setVisibility(4);
ImageView imageView11 = this.ivStar_5_shadow;
if (imageView11 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5_shadow");
} else {
imageView = imageView11;
}
imageView.setVisibility(4);
return;
}
if (i == 3) {
ImageView imageView12 = this.ivStar_1_shadow;
if (imageView12 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1_shadow");
imageView12 = null;
}
imageView12.setVisibility(0);
ImageView imageView13 = this.ivStar_2_shadow;
if (imageView13 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2_shadow");
imageView13 = null;
}
imageView13.setVisibility(0);
ImageView imageView14 = this.ivStar_3_shadow;
if (imageView14 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3_shadow");
imageView14 = null;
}
imageView14.setVisibility(0);
ImageView imageView15 = this.ivStar_4_shadow;
if (imageView15 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4_shadow");
imageView15 = null;
}
imageView15.setVisibility(4);
ImageView imageView16 = this.ivStar_5_shadow;
if (imageView16 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5_shadow");
} else {
imageView = imageView16;
}
imageView.setVisibility(4);
return;
}
if (i == 4) {
ImageView imageView17 = this.ivStar_1_shadow;
if (imageView17 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1_shadow");
imageView17 = null;
}
imageView17.setVisibility(0);
ImageView imageView18 = this.ivStar_2_shadow;
if (imageView18 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2_shadow");
imageView18 = null;
}
imageView18.setVisibility(0);
ImageView imageView19 = this.ivStar_3_shadow;
if (imageView19 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3_shadow");
imageView19 = null;
}
imageView19.setVisibility(0);
ImageView imageView20 = this.ivStar_4_shadow;
if (imageView20 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4_shadow");
imageView20 = null;
}
imageView20.setVisibility(0);
ImageView imageView21 = this.ivStar_5_shadow;
if (imageView21 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5_shadow");
} else {
imageView = imageView21;
}
imageView.setVisibility(4);
return;
}
if (i != 5) {
return;
}
ImageView imageView22 = this.ivStar_1_shadow;
if (imageView22 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1_shadow");
imageView22 = null;
}
imageView22.setVisibility(0);
ImageView imageView23 = this.ivStar_2_shadow;
if (imageView23 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2_shadow");
imageView23 = null;
}
imageView23.setVisibility(0);
ImageView imageView24 = this.ivStar_3_shadow;
if (imageView24 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3_shadow");
imageView24 = null;
}
imageView24.setVisibility(0);
ImageView imageView25 = this.ivStar_4_shadow;
if (imageView25 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4_shadow");
imageView25 = null;
}
imageView25.setVisibility(0);
ImageView imageView26 = this.ivStar_5_shadow;
if (imageView26 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5_shadow");
} else {
imageView = imageView26;
}
imageView.setVisibility(0);
}
private final void handleSubmitClick(boolean z) {
if (!z && this.typeCount == 0 && this.feedbackMsgAfter == 0) {
return;
}
OrderIdProvider orderIdProvider = null;
f0 f0Var = new f0(Reflection.getOrCreateKotlinClass(RatingViewModel.class), new b(this), new a(this), new c(null, this));
EditText editText = this.etComment;
if (editText == null) {
v.throwUninitializedPropertyAccessException("etComment");
editText = null;
}
String obj = editText.getText().toString();
RatingViewModel handleSubmitClick$lambda$2 = handleSubmitClick$lambda$2(f0Var);
int i = this.ratingGiven;
OrderIdProvider orderIdProvider2 = this.orderIdProvider;
if (orderIdProvider2 == null) {
v.throwUninitializedPropertyAccessException("orderIdProvider");
} else {
orderIdProvider = orderIdProvider2;
}
String id = orderIdProvider.getId();
v.checkNotNullExpressionValue(id, "orderIdProvider.id");
handleSubmitClick$lambda$2.postRatingApi(i, i, obj, z, id, getRatingTypes());
handleSubmitClick$lambda$2(f0Var).getRatingLiveData().observe(this, new g(d.INSTANCE));
if (z) {
onBackPressed();
return;
}
Intent intent = getIntent();
intent.putExtra("is_skipped", z);
setResult(2000, intent);
finish();
}
private static final RatingViewModel handleSubmitClick$lambda$2(kotlin.f fVar) {
return (RatingViewModel) fVar.getValue();
}
private final void initView() {
View findViewById = findViewById(2131362778);
v.checkNotNullExpressionValue(findViewById, "findViewById(R.id.tv_ty_rating_like_disliked)");
this.tvRatingMsg = (TextView) findViewById;
View findViewById2 = findViewById(2131362449);
v.checkNotNullExpressionValue(findViewById2, "findViewById(R.id.rcl_ty_rating_bottom_message)");
this.tvRatingmsg_2 = (TextView) findViewById2;
View findViewById3 = findViewById(2131362450);
v.checkNotNullExpressionValue(findViewById3, "findViewById(R.id.rcl_ty_rating_types)");
this.rclRatingTypes = (RecyclerView) findViewById3;
View findViewById4 = findViewById(2131362779);
v.checkNotNullExpressionValue(findViewById4, "findViewById(R.id.tv_ty_rating_submit)");
this.btnSubMit = (TextView) findViewById4;
updateSubmitBtn();
View findViewById5 = findViewById(2131362090);
v.checkNotNullExpressionValue(findViewById5, "findViewById(R.id.et_ty_rating_comment)");
this.etComment = (EditText) findViewById5;
View findViewById6 = findViewById(2131362777);
v.checkNotNullExpressionValue(findViewById6, "findViewById(R.id.tv_ty_rating_cancel)");
this.btnCancel = (ImageView) findViewById6;
View findViewById7 = findViewById(2131362213);
v.checkNotNullExpressionValue(findViewById7, "findViewById(R.id.iv_rating_1)");
this.ivStar_1 = (ImageView) findViewById7;
View findViewById8 = findViewById(2131362215);
v.checkNotNullExpressionValue(findViewById8, "findViewById(R.id.iv_rating_2)");
this.ivStar_2 = (ImageView) findViewById8;
View findViewById9 = findViewById(2131362217);
v.checkNotNullExpressionValue(findViewById9, "findViewById(R.id.iv_rating_3)");
this.ivStar_3 = (ImageView) findViewById9;
View findViewById10 = findViewById(2131362219);
v.checkNotNullExpressionValue(findViewById10, "findViewById(R.id.iv_rating_4)");
this.ivStar_4 = (ImageView) findViewById10;
View findViewById11 = findViewById(2131362221);
v.checkNotNullExpressionValue(findViewById11, "findViewById(R.id.iv_rating_5)");
this.ivStar_5 = (ImageView) findViewById11;
View findViewById12 = findViewById(2131362214);
v.checkNotNullExpressionValue(findViewById12, "findViewById(R.id.iv_rating_1_shadow)");
this.ivStar_1_shadow = (ImageView) findViewById12;
View findViewById13 = findViewById(2131362216);
v.checkNotNullExpressionValue(findViewById13, "findViewById(R.id.iv_rating_2_shadow)");
this.ivStar_2_shadow = (ImageView) findViewById13;
View findViewById14 = findViewById(2131362218);
v.checkNotNullExpressionValue(findViewById14, "findViewById(R.id.iv_rating_3_shadow)");
this.ivStar_3_shadow = (ImageView) findViewById14;
View findViewById15 = findViewById(2131362220);
v.checkNotNullExpressionValue(findViewById15, "findViewById(R.id.iv_rating_4_shadow)");
this.ivStar_4_shadow = (ImageView) findViewById15;
View findViewById16 = findViewById(2131362222);
v.checkNotNullExpressionValue(findViewById16, "findViewById(R.id.iv_rating_5_shadow)");
this.ivStar_5_shadow = (ImageView) findViewById16;
ImageView imageView = this.ivStar_1;
EditText editText = null;
if (imageView == null) {
v.throwUninitializedPropertyAccessException("ivStar_1");
imageView = null;
}
imageView.setOnTouchListener(this);
ImageView imageView2 = this.ivStar_2;
if (imageView2 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2");
imageView2 = null;
}
imageView2.setOnTouchListener(this);
ImageView imageView3 = this.ivStar_3;
if (imageView3 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3");
imageView3 = null;
}
imageView3.setOnTouchListener(this);
ImageView imageView4 = this.ivStar_4;
if (imageView4 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4");
imageView4 = null;
}
imageView4.setOnTouchListener(this);
ImageView imageView5 = this.ivStar_5;
if (imageView5 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5");
imageView5 = null;
}
imageView5.setOnTouchListener(this);
SettingEntity settings = com.bigbasket.bbinstant.core.persistance.d.get().getSettings();
String oneRating = settings.getOneRating();
if (oneRating == null) {
oneRating = "";
}
String twoRating = settings.getTwoRating();
if (twoRating == null) {
twoRating = "";
}
String threeRating = settings.getThreeRating();
if (threeRating == null) {
threeRating = "";
}
String fourRating = settings.getFourRating();
if (fourRating == null) {
fourRating = "";
}
String fiveRating = settings.getFiveRating();
if (fiveRating == null) {
fiveRating = "";
}
this.arrayMsg_1 = new String[]{oneRating, twoRating, threeRating, fourRating, fiveRating};
String oneRatingSubtitle = settings.getOneRatingSubtitle();
if (oneRatingSubtitle == null) {
oneRatingSubtitle = "";
}
String twoRatingSubtitle = settings.getTwoRatingSubtitle();
if (twoRatingSubtitle == null) {
twoRatingSubtitle = "";
}
String threeRatingSubtitle = settings.getThreeRatingSubtitle();
if (threeRatingSubtitle == null) {
threeRatingSubtitle = "";
}
String fourRatingSubtitle = settings.getFourRatingSubtitle();
if (fourRatingSubtitle == null) {
fourRatingSubtitle = "";
}
String fiveRatingSubtitle = settings.getFiveRatingSubtitle();
if (fiveRatingSubtitle == null) {
fiveRatingSubtitle = "";
}
this.arrayMsg_2 = new String[]{oneRatingSubtitle, twoRatingSubtitle, threeRatingSubtitle, fourRatingSubtitle, fiveRatingSubtitle};
Serializable serializableExtra = getIntent().getSerializableExtra("order_id");
v.checkNotNull(serializableExtra, "null cannot be cast to non-null type com.bigbasket.bbinstant.ui.machine.OrderIdProvider");
OrderIdProvider orderIdProvider = (OrderIdProvider) serializableExtra;
this.orderIdProvider = orderIdProvider;
if (orderIdProvider == null) {
v.throwUninitializedPropertyAccessException("orderIdProvider");
orderIdProvider = null;
}
if (orderIdProvider.getId() == null) {
OrderIdProvider orderIdProvider2 = this.orderIdProvider;
if (orderIdProvider2 == null) {
v.throwUninitializedPropertyAccessException("orderIdProvider");
orderIdProvider2 = null;
}
orderIdProvider2.setId("");
}
String feedbackTags = com.bigbasket.bbinstant.core.persistance.d.get().getSettings().getFeedbackTags();
v.checkNotNullExpressionValue(feedbackTags, "get().settings.feedbackTags");
String[] strArr = (String[]) p.split$default(feedbackTags, new String[]{","}, false, 0, 6, (Object) null).toArray(new String[0]);
this.listRatingType = new ArrayList<>();
for (String str : strArr) {
ArrayList<RatingTypes> arrayList = this.listRatingType;
if (arrayList == null) {
v.throwUninitializedPropertyAccessException("listRatingType");
arrayList = null;
}
arrayList.add(new RatingTypes(str, null, 2, null));
}
EditText editText2 = this.etComment;
if (editText2 == null) {
v.throwUninitializedPropertyAccessException("etComment");
} else {
editText = editText2;
}
editText.addTextChangedListener(new e());
int intExtra = getIntent().getIntExtra("rating", 0);
this.ratingGiven = intExtra;
handleRationBarColor(intExtra);
callOnTouch();
}
public static final void onCreate$lambda$0(RatingActivity ratingActivity, View view) {
v.checkNotNullParameter(ratingActivity, "this$0");
ratingActivity.handleSubmitClick(false);
}
public static final void onCreate$lambda$1(RatingActivity ratingActivity, View view) {
v.checkNotNullParameter(ratingActivity, "this$0");
ratingActivity.handleSubmitClick(true);
}
public final void updateSubmitBtn() {
TextView textView = null;
if (this.typeCount == 0 && this.feedbackMsgAfter == 0) {
TextView textView2 = this.btnSubMit;
if (textView2 == null) {
v.throwUninitializedPropertyAccessException("btnSubMit");
textView2 = null;
}
textView2.setClickable(false);
TextView textView3 = this.btnSubMit;
if (textView3 == null) {
v.throwUninitializedPropertyAccessException("btnSubMit");
} else {
textView = textView3;
}
textView.setTextColor(Color.parseColor("#829194"));
return;
}
TextView textView4 = this.btnSubMit;
if (textView4 == null) {
v.throwUninitializedPropertyAccessException("btnSubMit");
textView4 = null;
}
textView4.setClickable(true);
TextView textView5 = this.btnSubMit;
if (textView5 == null) {
v.throwUninitializedPropertyAccessException("btnSubMit");
} else {
textView = textView5;
}
textView.setTextColor(Color.parseColor("#000000"));
}
@Override
public void onBackPressed() {
Intent intent = getIntent();
intent.putExtra("rating", this.ratingGiven);
setResult(2022, intent);
super.onBackPressed();
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(2131558654);
initView();
TextView textView = this.btnSubMit;
com.bigbasket.bbinstant.ui.invoice.adapters.c cVar = null;
if (textView == null) {
v.throwUninitializedPropertyAccessException("btnSubMit");
textView = null;
}
textView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RatingActivity.onCreate$lambda$0(RatingActivity.this, view);
}
});
ImageView imageView = this.btnCancel;
if (imageView == null) {
v.throwUninitializedPropertyAccessException("btnCancel");
imageView = null;
}
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
RatingActivity.onCreate$lambda$1(RatingActivity.this, view);
}
});
ArrayList<RatingTypes> arrayList = this.listRatingType;
if (arrayList == null) {
v.throwUninitializedPropertyAccessException("listRatingType");
arrayList = null;
}
this.itemAdapter = new com.bigbasket.bbinstant.ui.invoice.adapters.c(this, arrayList);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, 0, false);
RecyclerView recyclerView = this.rclRatingTypes;
if (recyclerView == null) {
v.throwUninitializedPropertyAccessException("rclRatingTypes");
recyclerView = null;
}
recyclerView.setLayoutManager(linearLayoutManager);
RecyclerView recyclerView2 = this.rclRatingTypes;
if (recyclerView2 == null) {
v.throwUninitializedPropertyAccessException("rclRatingTypes");
recyclerView2 = null;
}
com.bigbasket.bbinstant.ui.invoice.adapters.c cVar2 = this.itemAdapter;
if (cVar2 == null) {
v.throwUninitializedPropertyAccessException("itemAdapter");
cVar2 = null;
}
recyclerView2.setAdapter(cVar2);
com.bigbasket.bbinstant.ui.invoice.adapters.c cVar3 = this.itemAdapter;
if (cVar3 == null) {
v.throwUninitializedPropertyAccessException("itemAdapter");
} else {
cVar = cVar3;
}
cVar.doOnItemSelect(new f());
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
ImageView imageView = null;
Integer valueOf = view != null ? Integer.valueOf(view.getId()) : null;
if (valueOf != null && valueOf.intValue() == 2131362213) {
ImageView imageView2 = this.ivStar_1;
if (imageView2 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1");
imageView2 = null;
}
imageView2.setImageResource(2131231286);
ImageView imageView3 = this.ivStar_2;
if (imageView3 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2");
imageView3 = null;
}
imageView3.setImageResource(2131231285);
ImageView imageView4 = this.ivStar_3;
if (imageView4 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3");
imageView4 = null;
}
imageView4.setImageResource(2131231285);
ImageView imageView5 = this.ivStar_4;
if (imageView5 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4");
imageView5 = null;
}
imageView5.setImageResource(2131231285);
ImageView imageView6 = this.ivStar_5;
if (imageView6 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5");
} else {
imageView = imageView6;
}
imageView.setImageResource(2131231285);
handleRationBarColor(1);
return false;
}
if (valueOf != null && valueOf.intValue() == 2131362215) {
ImageView imageView7 = this.ivStar_1;
if (imageView7 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1");
imageView7 = null;
}
imageView7.setImageResource(2131231286);
ImageView imageView8 = this.ivStar_2;
if (imageView8 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2");
imageView8 = null;
}
imageView8.setImageResource(2131231286);
ImageView imageView9 = this.ivStar_3;
if (imageView9 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3");
imageView9 = null;
}
imageView9.setImageResource(2131231285);
ImageView imageView10 = this.ivStar_4;
if (imageView10 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4");
imageView10 = null;
}
imageView10.setImageResource(2131231285);
ImageView imageView11 = this.ivStar_5;
if (imageView11 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5");
} else {
imageView = imageView11;
}
imageView.setImageResource(2131231285);
handleRationBarColor(2);
return false;
}
if (valueOf != null && valueOf.intValue() == 2131362217) {
ImageView imageView12 = this.ivStar_1;
if (imageView12 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1");
imageView12 = null;
}
imageView12.setImageResource(2131231284);
ImageView imageView13 = this.ivStar_2;
if (imageView13 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2");
imageView13 = null;
}
imageView13.setImageResource(2131231284);
ImageView imageView14 = this.ivStar_3;
if (imageView14 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3");
imageView14 = null;
}
imageView14.setImageResource(2131231284);
ImageView imageView15 = this.ivStar_4;
if (imageView15 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4");
imageView15 = null;
}
imageView15.setImageResource(2131231285);
ImageView imageView16 = this.ivStar_5;
if (imageView16 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5");
} else {
imageView = imageView16;
}
imageView.setImageResource(2131231285);
handleRationBarColor(3);
return false;
}
if (valueOf != null && valueOf.intValue() == 2131362219) {
ImageView imageView17 = this.ivStar_1;
if (imageView17 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1");
imageView17 = null;
}
imageView17.setImageResource(2131231284);
ImageView imageView18 = this.ivStar_2;
if (imageView18 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2");
imageView18 = null;
}
imageView18.setImageResource(2131231284);
ImageView imageView19 = this.ivStar_3;
if (imageView19 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3");
imageView19 = null;
}
imageView19.setImageResource(2131231284);
ImageView imageView20 = this.ivStar_4;
if (imageView20 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4");
imageView20 = null;
}
imageView20.setImageResource(2131231284);
ImageView imageView21 = this.ivStar_5;
if (imageView21 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5");
} else {
imageView = imageView21;
}
imageView.setImageResource(2131231285);
handleRationBarColor(4);
return false;
}
if (valueOf == null || valueOf.intValue() != 2131362221) {
return false;
}
ImageView imageView22 = this.ivStar_1;
if (imageView22 == null) {
v.throwUninitializedPropertyAccessException("ivStar_1");
imageView22 = null;
}
imageView22.setImageResource(2131231284);
ImageView imageView23 = this.ivStar_2;
if (imageView23 == null) {
v.throwUninitializedPropertyAccessException("ivStar_2");
imageView23 = null;
}
imageView23.setImageResource(2131231284);
ImageView imageView24 = this.ivStar_3;
if (imageView24 == null) {
v.throwUninitializedPropertyAccessException("ivStar_3");
imageView24 = null;
}
imageView24.setImageResource(2131231284);
ImageView imageView25 = this.ivStar_4;
if (imageView25 == null) {
v.throwUninitializedPropertyAccessException("ivStar_4");
imageView25 = null;
}
imageView25.setImageResource(2131231284);
ImageView imageView26 = this.ivStar_5;
if (imageView26 == null) {
v.throwUninitializedPropertyAccessException("ivStar_5");
} else {
imageView = imageView26;
}
imageView.setImageResource(2131231284);
handleRationBarColor(5);
return false;
}
}