正在查看: Mitra Bukalapak v2.55.0 应用的 ParallaxActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mitra Bukalapak v2.55.0 应用的 ParallaxActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.bukalapak.android.lib.activityfactory.atomic;
import android.R;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import com.bukalapak.android.lib.ui.view.atomictoolbar.AtomicToolbar;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import defpackage.co;
import defpackage.e67;
import defpackage.f87;
import defpackage.h46;
import defpackage.i79;
import defpackage.l5;
import defpackage.l79;
import defpackage.ln3;
import defpackage.m79;
import defpackage.r79;
import defpackage.tb7;
import defpackage.w77;
import defpackage.zw;
public class ParallaxActivity extends zw implements m79, ln3 {
protected AppBarLayout h;
protected CollapsingToolbarLayout i;
protected Toolbar j;
protected CoordinatorLayout k;
protected LinearLayout l;
protected FrameLayout m;
protected AtomicToolbar n;
protected View o;
protected int p = e67.b;
protected int q = e67.c;
protected boolean r = false;
boolean s = true;
protected boolean t = true;
protected int u = 17;
class a implements AppBarLayout.d {
a() {
}
public void a(AppBarLayout appBarLayout, int i) {
CollapsingToolbarLayout collapsingToolbarLayout = ParallaxActivity.this.i;
boolean z = collapsingToolbarLayout != null && collapsingToolbarLayout.getHeight() + i <= ParallaxActivity.this.i.getScrimVisibleHeightTrigger();
if (z) {
ParallaxActivity parallaxActivity = ParallaxActivity.this;
if (!parallaxActivity.s) {
parallaxActivity.s = true;
AtomicToolbar atomicToolbar = parallaxActivity.n;
if (atomicToolbar != null) {
atomicToolbar.f();
return;
}
return;
}
}
if (z) {
return;
}
ParallaxActivity parallaxActivity2 = ParallaxActivity.this;
if (parallaxActivity2.s) {
parallaxActivity2.s = false;
AtomicToolbar atomicToolbar2 = parallaxActivity2.n;
if (atomicToolbar2 != null) {
atomicToolbar2.f();
}
}
}
}
private void C(Menu menu) {
if (!(u() instanceof i79)) {
l79.a.c(menu, j31.c(this, w77.a, Integer.valueOf(this.s ? y() : z())), true);
return;
}
Drawable a2 = u().a();
if (a2 != null) {
l79.a.c(menu, a2, true);
} else {
l79.a.c(menu, j31.c(this, w77.a, Integer.valueOf(this.s ? y() : z())), true);
}
}
private void D() {
this.n.setConnection(this);
this.n.d();
this.n.setVisibility(0);
if (co.a(this)) {
this.n.setStatusInDebugMode(ou2.a(u()));
l5 l5Var = l5.a;
if (l5Var.c() != null) {
this.n.setStatusInDebugModeClickListener((View.OnClickListener) l5Var.c().invoke(this));
}
}
}
protected void A() {
D();
this.h.b(new a());
}
public boolean B() {
return this.r;
}
@Override
public View G() {
if (u() == null) {
return null;
}
String a2 = u().a();
if (B()) {
return l79.a.a(this, a2, this.u, this.s ? e67.a : e67.b);
}
if (u() instanceof r79) {
return u().G();
}
return l79.a.a(this, u().a(), this.u, this.s ? e67.a : R.color.transparent);
}
@Override
public AtomicToolbar c() {
return this.n;
}
public void onAttachedToWindow() {
super/*android.app.Activity*/.onAttachedToWindow();
getWindow().setFormat(1);
}
@Override
public void onBackPressed() {
if (u() == null || !(u() instanceof f5)) {
finish();
} else {
if (u().d()) {
return;
}
finish();
}
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(tb7.b);
this.h = findViewById(f87.b);
this.i = findViewById(f87.d);
this.k = findViewById(f87.f);
this.l = (LinearLayout) findViewById(f87.h);
this.m = (FrameLayout) findViewById(f87.j);
this.n = (AtomicToolbar) findViewById(f87.c);
this.j = findViewById(f87.i);
this.o = findViewById(f87.k);
A();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
if (u() != null) {
u().onCreateOptionsMenu(menu, getMenuInflater());
C(menu);
if (u() instanceof h46) {
x(menu);
}
}
return super/*android.app.Activity*/.onCreateOptionsMenu(menu);
}
protected void onDestroy() {
super.onDestroy();
this.h = null;
this.i = null;
this.k = null;
this.l = null;
this.n = null;
this.j = null;
}
@Override
public boolean onOptionsItemSelected(MenuItem menuItem) {
if (menuItem.getItemId() != 16908332) {
return u() != null ? u().onOptionsItemSelected(menuItem) : super/*android.app.Activity*/.onOptionsItemSelected(menuItem);
}
if (u() == null || !(u() instanceof f5)) {
finish();
return true;
}
if (u().g0()) {
return true;
}
finish();
return true;
}
public void x(Menu menu) {
for (int i = 0; i < menu.size(); i++) {
MenuItem item = menu.getItem(i);
Drawable icon = item.getIcon();
if (icon != null) {
if (this.t) {
xl9.i(icon, ys7.e(this.s ? y() : z()));
}
item.setIcon(icon);
}
}
}
public int y() {
return this.q;
}
public int z() {
return this.p;
}
}