APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Class 9 Nepali Solutions
版本号:12.0
包名称:com.kakideveloper.class9nepalinote

MD5 校验值:abac416d58de62cbb13589224e25fe1c

反编译源代码说明

DetailsActivity.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package com.kakideveloper.class9nepalinote.activity;

import android.app.Activity;
import android.app.WallpaperManager;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.ads.AdView;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.kakideveloper.class9nepalinote.R;
import com.kakideveloper.class9nepalinote.utility.i;
import d2.f;
import k2.f;
import k2.o;

public class DetailsActivity extends h5.a {
    private Activity J;
    private Context K;
    private m5.a L;
    private ImageView M;
    private TextView N;
    private FloatingActionButton O;
    private i P;
    private boolean Q = false;
    private String R;
    private MenuItem S;
    private Bitmap T;
    private WebView U;
    private o5.b V;

    public class a implements l5.b {
        a() {
        }

        @Override
        public void E() {
            DetailsActivity.this.T();
        }

        @Override
        public void a(int i6) {
        }

        @Override
        public void b() {
            DetailsActivity.this.N();
        }

        @Override
        public void c(String str) {
        }

        @Override
        public void d() {
            DetailsActivity.this.S();
        }
    }

    public class b implements View.OnClickListener {
        b() {
        }

        @Override
        public void onClick(View view) {
            String packageName = DetailsActivity.this.J.getPackageName();
            Intent intent = new Intent();
            intent.setAction("android.intent.action.SEND");
            intent.putExtra("android.intent.extra.TEXT", ((Object) Html.fromHtml(DetailsActivity.this.L.d() + DetailsActivity.this.L.a())) + "" + DetailsActivity.this.J.getResources().getString(R.string.share_text) + " https://play.google.com/store/apps/details?id=" + packageName);
            intent.setType("text/plain");
            DetailsActivity detailsActivity = DetailsActivity.this;
            detailsActivity.startActivity(Intent.createChooser(intent, detailsActivity.getResources().getText(R.string.send_to)));
        }
    }

    public class c extends f<Bitmap> {
        c() {
        }

        @Override
        public void b(Bitmap bitmap, e2.b<? super Bitmap> bVar) {
            DetailsActivity.this.T = bitmap;
        }
    }

    private void Y() {
        this.P = new i(this.J);
        String b6 = this.L.b();
        if (b6 != null && !b6.isEmpty()) {
            f1.c.t(this.K).o(b6).n(this.M);
        }
        X();
        this.N.setText(Html.fromHtml(this.L.d()));
        StringBuilder sb = new StringBuilder(Html.fromHtml(this.L.d()));
        sb.append((CharSequence) Html.fromHtml(this.L.a()));
        this.R = sb.toString();
        this.V.p(this.L.a());
    }

    private void Z() {
        this.O.setOnClickListener(new b());
    }

    private void a0() {
        this.J = this;
        this.K = getApplicationContext();
        Intent intent = getIntent();
        if (intent != null) {
            this.L = (m5.a) intent.getParcelableExtra("item");
        }
    }

    private void b0() {
        setContentView(R.layout.activity_details);
        this.M = (ImageView) findViewById(R.id.post_img);
        this.N = (TextView) findViewById(R.id.title_text);
        this.O = (FloatingActionButton) findViewById(R.id.share_post);
        c0();
        com.kakideveloper.class9nepalinote.utility.b.a(this);
        P();
        Q(false);
        ((CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar)).setTitle(Html.fromHtml(this.L.d()));
        L();
    }

    private void e0() {
        boolean z6;
        if (this.Q) {
            this.P.g();
            z6 = false;
        } else {
            this.P.i(this.R);
            z6 = true;
        }
        this.Q = z6;
        f0();
    }

    private void f0() {
        MenuItem menuItem;
        int i6;
        if (this.Q) {
            menuItem = this.S;
            i6 = R.string.site_menu_stop_reading;
        } else {
            menuItem = this.S;
            i6 = R.string.read_post;
        }
        menuItem.setTitle(i6);
    }

    public void X() {
        f1.c.t(this.K).j().q(this.L.b()).j(new c());
    }

    public void c0() {
        WebView webView = (WebView) findViewById(R.id.web_view);
        this.U = webView;
        o5.b bVar = new o5.b(webView, this.J);
        this.V = bVar;
        bVar.l();
        this.V.k(new a());
    }

    public void customAds(View view) {
        startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=com.kakideveloper.nepaliquiz")));
    }

    public void d0() {
        o.a(this, getString(R.string.banner_id_admob));
        ((AdView) findViewById(R.id.adsView)).b(new f.a().d());
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        a0();
        b0();
        Y();
        Z();
        d0();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_details, menu);
        this.S = menu.findItem(R.id.menus_read_article);
        return true;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.P.g();
        this.L = null;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        Context applicationContext;
        int i6;
        int itemId = menuItem.getItemId();
        if (itemId == 16908332) {
            finish();
            return true;
        }
        if (itemId != R.id.menus_copy_text) {
            switch (itemId) {
                case R.id.menus_download_image:
                    if (this.L != null) {
                        com.kakideveloper.class9nepalinote.utility.c.a(this.K, this.J, this.T);
                        break;
                    }
                    break;
                case R.id.menus_read_article:
                    if (this.L != null) {
                        e0();
                    }
                    return true;
                case R.id.menus_set_image:
                    if (this.L != null) {
                        try {
                            WallpaperManager.getInstance(this.K).setBitmap(this.T);
                            Toast.makeText(this.J, getString(R.string.wallpaper_set), 0).show();
                            break;
                        } catch (Exception e6) {
                            e6.printStackTrace();
                            applicationContext = this.J;
                            i6 = R.string.wallpaper_set_failed;
                            break;
                        }
                    }
                    break;
            }
        } else if (this.L != null) {
            ((ClipboardManager) getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText("Text Label", Html.fromHtml(this.L.d() + "" + this.L.a())));
            applicationContext = getApplicationContext();
            i6 = R.string.copy_to_clipboard;
            Toast.makeText(applicationContext, getString(i6), 0).show();
        }
        return super.onOptionsItemSelected(menuItem);
    }

    @Override
    public void onResume() {
        super.onResume();
        if (this.Q) {
            this.Q = false;
            this.S.setTitle(R.string.read_post);
        }
    }

    @Override
    public void onStop() {
        super.onStop();
        this.P.g();
    }
}