导航菜单

页面标题

页面副标题

bbinstant v6.24.0 - FAQWebViewActivity.java 源代码

正在查看: bbinstant v6.24.0 应用的 FAQWebViewActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.bigbasket.bbinstant.ui.help.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.FragmentTransaction;
import com.adjetter.kapchatsdk.R;
import com.bigbasket.bbinstant.App;
import com.bigbasket.bbinstant.ui.BaseActivity;
import com.bigbasket.bbinstant.ui.common.WebViewFragment;
import kotlin.jvm.internal.v;

public final class FAQWebViewActivity extends BaseActivity {
    private WebViewFragment fragment;
    private LinearLayout llWbHolder;
    private Toolbar toolbar;
    private final String tag = "FAQ";
    private final String userAgent = "BbInstantContainer";

    private final void attachWebViewFragment() {
        FragmentTransaction beginTransaction = getSupportFragmentManager().beginTransaction();
        WebViewFragment webViewFragment = this.fragment;
        if (webViewFragment == null) {
            v.throwUninitializedPropertyAccessException("fragment");
            webViewFragment = null;
        }
        beginTransaction.add(2131362271, webViewFragment, this.tag).commitAllowingStateLoss();
    }

    private final void initView() {
        View findViewById = findViewById(R.id.toolbar);
        v.checkNotNullExpressionValue(findViewById, "findViewById(R.id.toolbar)");
        Toolbar toolbar = (Toolbar) findViewById;
        this.toolbar = toolbar;
        if (toolbar == null) {
            v.throwUninitializedPropertyAccessException("toolbar");
            toolbar = null;
        }
        setSupportActionBar(toolbar);
        ActionBar supportActionBar = getSupportActionBar();
        v.checkNotNull(supportActionBar);
        supportActionBar.setDisplayHomeAsUpEnabled(true);
        View findViewById2 = findViewById(2131362271);
        v.checkNotNullExpressionValue(findViewById2, "findViewById(R.id.ll_faq_fragment_holder)");
        this.llWbHolder = (LinearLayout) findViewById2;
        WebViewFragment init = WebViewFragment.init(App.get().getContext().getString(2131886494), this.userAgent);
        v.checkNotNullExpressionValue(init, "init(\n            App.ge…      userAgent\n        )");
        this.fragment = init;
        setTitle(this.tag);
    }

    public static final void onCreate$lambda$0(FAQWebViewActivity fAQWebViewActivity, View view) {
        v.checkNotNullParameter(fAQWebViewActivity, "this$0");
        WebViewFragment webViewFragment = fAQWebViewActivity.fragment;
        WebViewFragment webViewFragment2 = null;
        if (webViewFragment == null) {
            v.throwUninitializedPropertyAccessException("fragment");
            webViewFragment = null;
        }
        if (!webViewFragment.getWebView().canGoBack()) {
            fAQWebViewActivity.onBackPressed();
            return;
        }
        WebViewFragment webViewFragment3 = fAQWebViewActivity.fragment;
        if (webViewFragment3 == null) {
            v.throwUninitializedPropertyAccessException("fragment");
        } else {
            webViewFragment2 = webViewFragment3;
        }
        webViewFragment2.getWebView().goBack();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2131558435);
        initView();
        attachWebViewFragment();
        Toolbar toolbar = this.toolbar;
        if (toolbar == null) {
            v.throwUninitializedPropertyAccessException("toolbar");
            toolbar = null;
        }
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                FAQWebViewActivity.onCreate$lambda$0(FAQWebViewActivity.this, view);
            }
        });
    }
}