正在查看: Mitra Bukalapak v2.55.0 应用的 ParallaxAppBarFragmentHostActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mitra Bukalapak v2.55.0 应用的 ParallaxAppBarFragmentHostActivity.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.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 defpackage.co;
import defpackage.e67;
import defpackage.f87;
import defpackage.i79;
import defpackage.l5;
import defpackage.l79;
import defpackage.m79;
import defpackage.tb7;
import defpackage.zw;
public class ParallaxAppBarFragmentHostActivity extends zw implements m79 {
protected CoordinatorLayout h;
protected LinearLayout i;
protected AtomicToolbar j;
protected Toolbar k;
AppBarLayout l;
protected int m = e67.b;
protected int n = e67.c;
protected int o = 17;
protected boolean p = false;
boolean q = false;
class a implements AppBarLayout.d {
int a = -1;
a() {
}
public void a(AppBarLayout appBarLayout, int i) {
if (this.a == -1) {
this.a = appBarLayout.getTotalScrollRange();
}
if (i == 0) {
ParallaxAppBarFragmentHostActivity parallaxAppBarFragmentHostActivity = ParallaxAppBarFragmentHostActivity.this;
if (parallaxAppBarFragmentHostActivity.q) {
return;
}
parallaxAppBarFragmentHostActivity.q = true;
parallaxAppBarFragmentHostActivity.invalidateOptionsMenu();
return;
}
ParallaxAppBarFragmentHostActivity parallaxAppBarFragmentHostActivity2 = ParallaxAppBarFragmentHostActivity.this;
if (parallaxAppBarFragmentHostActivity2.q) {
parallaxAppBarFragmentHostActivity2.q = false;
parallaxAppBarFragmentHostActivity2.invalidateOptionsMenu();
}
}
}
private void z() {
this.j.setConnection(this);
this.j.d();
this.j.setVisibility(0);
if (co.a(this)) {
this.j.setStatusInDebugMode(ou2.a(u()));
l5 l5Var = l5.a;
if (l5Var.c() != null) {
this.j.setStatusInDebugModeClickListener((View.OnClickListener) l5Var.c().invoke(this));
}
}
}
@Override
public View G() {
return l79.a.a(this, u().a(), 17, this.q ? R.color.transparent : e67.a);
}
public void invalidateOptionsMenu() {
super/*androidx.appcompat.app.c*/.invalidateOptionsMenu();
this.j.f();
}
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.l = findViewById(f87.b);
this.h = findViewById(f87.f);
this.i = (LinearLayout) findViewById(f87.h);
this.j = (AtomicToolbar) findViewById(f87.c);
this.k = findViewById(f87.i);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
if (u() != null) {
if (u() instanceof i79) {
Drawable a2 = u().a();
if (a2 != null) {
l79.a.c(menu, a2, true);
}
} else {
l79.a.c(menu, d20.a.i(), true);
}
u().onCreateOptionsMenu(menu, getMenuInflater());
x(menu);
}
return super/*android.app.Activity*/.onCreateOptionsMenu(menu);
}
protected void onDestroy() {
super.onDestroy();
this.l = null;
this.h = null;
this.i = null;
this.j = null;
this.k = 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;
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
if (u() != null) {
u().onPrepareOptionsMenu(menu);
}
return super/*android.app.Activity*/.onPrepareOptionsMenu(menu);
}
protected void w() {
super.w();
y();
}
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) {
xl9.i(icon, ys7.e(this.q ? e67.b : e67.c));
item.setIcon(icon);
}
}
}
protected void y() {
z();
this.l.b(new a());
}
}