正在查看: CreditNow v1.0.2 应用的 FeedbackActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CreditNow v1.0.2 应用的 FeedbackActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.aa.my.view;
import android.os.Bundle;
import android.text.Editable;
import android.text.InputFilter;
import android.text.Spanned;
import android.text.TextWatcher;
import android.view.View;
import com.aa.commonuilibrary.base.activity.BaseActivity;
import com.aa.my.databinding.ActivityFeedBackBinding;
import com.aa.my.viewmodel.FeedbackViewModel;
import com.cat.themelibrary.R$color;
import defpackage.h40;
import defpackage.j40;
import defpackage.jp;
import defpackage.op1;
import defpackage.ph0;
import defpackage.td;
import defpackage.tp;
import defpackage.w30;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
@Metadata
public final class FeedbackActivity extends BaseActivity<FeedbackViewModel, ActivityFeedBackBinding> {
@NotNull
public static final a D1 = new a(null);
@Metadata
public static final class a {
public a() {
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
@Metadata
public static final class b implements op1 {
public b() {
}
@Override
public void a(@NotNull View view, boolean z) {
Intrinsics.checkNotNullParameter(view, "v");
if (z) {
FeedbackActivity.this.q1();
} else {
j40.a.b(j40.a, FeedbackActivity.this.Q0(), "Por favor ingrese el contenido y envíelo.", 0, 4, null);
}
}
}
@Metadata
public static final class d implements InputFilter {
@Override
public CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
return w30.a.e(charSequence != null ? charSequence.toString() : null) ? charSequence : "";
}
}
@Metadata
public static final class e extends jp<tp<Object>> {
public e() {
}
@Override
public void b(Throwable th) {
FeedbackActivity.this.M0();
td.a.b(FeedbackActivity.this.Q0());
}
@Override
public void a(@NotNull tp<Object> tpVar) {
Intrinsics.checkNotNullParameter(tpVar, "t");
FeedbackActivity.this.M0();
td.a.a(FeedbackActivity.this.Q0(), tpVar);
}
@Override
public void c(@NotNull tp<Object> tpVar) {
Intrinsics.checkNotNullParameter(tpVar, "resp");
FeedbackActivity.this.M0();
j40.a.b(j40.a, FeedbackActivity.this.Q0(), "Enviado, gracias por sus comentarios.", 0, 4, null);
((FeedbackViewModel) FeedbackActivity.this.O0()).getFeedBack().setValue("");
((FeedbackViewModel) FeedbackActivity.this.O0()).getCommitBtnEnable().setValue(Boolean.FALSE);
FeedbackActivity.this.finish();
}
}
@Override
public void V0(Bundle bundle) {
h40.a.d(this);
((ActivityFeedBackBinding) n1()).setViewModel((FeedbackViewModel) O0());
((FeedbackViewModel) O0()).getMFeedBackCount().setValue("0/500");
((ActivityFeedBackBinding) n1()).tvSubmit.setOnClickCallbackWithAble(new b());
((ActivityFeedBackBinding) n1()).etAcFeedback.addTextChangedListener(new c());
((ActivityFeedBackBinding) n1()).etAcFeedback.setFilters(new InputFilter[]{new d(), new InputFilter.LengthFilter(500)});
}
public final void q1() {
l1();
((FeedbackViewModel) O0()).feedBack(new e());
}
@Metadata
public static final class c implements TextWatcher {
public c() {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
int length = charSequence != null ? charSequence.length() : 0;
((FeedbackViewModel) FeedbackActivity.this.O0()).getMFeedBackCount().setValue(length + "/500");
if (length >= 500) {
((ActivityFeedBackBinding) FeedbackActivity.this.n1()).tvCharLimitAcFeedback.setTextColor(ph0.c(FeedbackActivity.this.Q0(), R$color.color_E53D2E));
} else {
((ActivityFeedBackBinding) FeedbackActivity.this.n1()).tvCharLimitAcFeedback.setTextColor(ph0.c(FeedbackActivity.this.Q0(), R$color.color_161A19));
}
if (length > 0) {
((ActivityFeedBackBinding) FeedbackActivity.this.n1()).tvSubmit.setBtnAble(true);
} else {
((ActivityFeedBackBinding) FeedbackActivity.this.n1()).tvSubmit.setBtnAble(false);
}
}
@Override
public void afterTextChanged(Editable editable) {
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
}
}