正在查看: 零界绘 v1.0.2 应用的 ReadingPreferencesActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 零界绘 v1.0.2 应用的 ReadingPreferencesActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.junyue.novel.modules.user.ui;
import android.content.Intent;
import android.view.View;
import com.junyue.basic.activity.BaseActivity;
import com.junyue.basic.widget.SimpleTextView;
import com.junyue.novel.modules_user.R;
import com.junyue.novel.sharebean.ReadingPref;
import f.p.c.g.e;
import f.p.c.z.h;
import f.p.c.z.z0;
import i.b0.c.f0;
import i.b0.c.t;
import i.d;
public final class ReadingPreferencesActivity extends BaseActivity implements View.OnClickListener {
public final d E = f.n.a.a.a.a(this, R.id.rv_girl);
public final d F = f.n.a.a.a.a(this, R.id.rv_boys);
public final d G = f.n.a.a.a.a(this, R.id.tv_skip);
public ReadingPref H;
public boolean I;
public static final class a implements View.OnClickListener {
public final f0 o;
public final e p;
public a(f0 f0Var, e eVar) {
this.o = f0Var;
this.p = eVar;
}
@Override
public final void onClick(View view) {
ReadingPreferencesActivity.c1(ReadingPreferencesActivity.this).c(this.o.n);
f.p.c.m.c.l().a(ReadingPref.class, ReadingPreferencesActivity.c1(ReadingPreferencesActivity.this));
this.p.dismiss();
Intent intent = new Intent();
intent.putExtra("gender", this.o.n);
ReadingPreferencesActivity.this.setResult(-1, intent);
ReadingPreferencesActivity.this.onBackPressed();
}
}
public static final class b implements View.OnClickListener {
public final e o;
public b(e eVar) {
this.o = eVar;
}
@Override
public final void onClick(View view) {
this.o.dismiss();
ReadingPreferencesActivity.this.onBackPressed();
}
}
public static final class c implements View.OnClickListener {
public c() {
}
@Override
public final void onClick(View view) {
ReadingPreferencesActivity.c1(ReadingPreferencesActivity.this).c(0);
f.p.c.m.c.l().a(ReadingPref.class, ReadingPreferencesActivity.c1(ReadingPreferencesActivity.this));
ReadingPreferencesActivity.this.i1();
}
}
public static final ReadingPref c1(ReadingPreferencesActivity readingPreferencesActivity) {
ReadingPref readingPref = readingPreferencesActivity.H;
if (readingPref != null) {
return readingPref;
}
t.t("mReadingPref");
throw null;
}
@Override
public int I0() {
return R.layout.activity_read_preferences;
}
@Override
public void O0() {
ReadingPref readingPref = (ReadingPref) f.p.c.m.c.l().i(ReadingPref.class);
if (readingPref == null) {
this.H = new ReadingPref();
} else {
this.H = readingPref;
}
this.I = getIntent().getBooleanExtra("is_splash", false);
ReadingPref readingPref2 = this.H;
if (readingPref2 == null) {
t.t("mReadingPref");
throw null;
}
int b2 = readingPref2.b(0);
setBackPressView(findViewById(R.id.ib_back));
if (this.I) {
View E0 = E0();
t.c(E0);
E0.setVisibility(4);
h1().setVisibility(0);
h1().setOnClickListener(new c());
} else {
View E02 = E0();
t.c(E02);
E02.setVisibility(0);
h1().setVisibility(8);
}
f1().setOnClickListener(this);
g1().setOnClickListener(this);
if (b2 == 1) {
f1().setSelected(true);
} else if (b2 == 2) {
g1().setSelected(true);
}
}
public final void e1(boolean z, int i) {
f0 f0Var = new f0();
f0Var.n = 0;
if (f1().isSelected()) {
f0Var.n = 1;
} else if (g1().isSelected()) {
f0Var.n = 2;
}
if (!z) {
if (f0Var.n != i) {
e eVar = new e(this, h.c(e.a.b.a.a()) ? com.junyue.simple_skin_lib.R.style.AppTheme_Dialog_Night : com.junyue.simple_skin_lib.R.style.AppTheme_Dialog);
eVar.B("好的");
eVar.j("不了");
eVar.n(new a(f0Var, eVar));
eVar.k(new b(eVar));
eVar.setCancelable(false);
eVar.p("性别偏好");
eVar.setTitle("是否确认修改性别偏好?");
eVar.show();
return;
}
return;
}
ReadingPref readingPref = this.H;
if (readingPref == null) {
t.t("mReadingPref");
throw null;
}
readingPref.c(f0Var.n);
f.p.c.m.c l = f.p.c.m.c.l();
ReadingPref readingPref2 = this.H;
if (readingPref2 == null) {
t.t("mReadingPref");
throw null;
}
l.a(ReadingPref.class, readingPref2);
i1();
}
public final View f1() {
return (View) this.F.getValue();
}
public final View g1() {
return (View) this.E.getValue();
}
public final SimpleTextView h1() {
return (SimpleTextView) this.G.getValue();
}
public final void i1() {
f.a.a.a.e.a.c().a("/user/reading_pref2").C(getContext(), z0.b(this));
}
@Override
public void onClick(View view) {
t.e(view, "v");
int id = view.getId();
if (id == R.id.rv_boys) {
f1().setSelected(true);
g1().setSelected(false);
boolean z = this.I;
ReadingPref readingPref = this.H;
if (readingPref != null) {
e1(z, readingPref.b(0));
return;
} else {
t.t("mReadingPref");
throw null;
}
}
if (id == R.id.rv_girl) {
g1().setSelected(true);
f1().setSelected(false);
boolean z2 = this.I;
ReadingPref readingPref2 = this.H;
if (readingPref2 != null) {
e1(z2, readingPref2.b(0));
} else {
t.t("mReadingPref");
throw null;
}
}
}
}