导航菜单

页面标题

页面副标题

moonshot.企业版 v8.14.46 - ImagePreviewActivity.java 源代码

正在查看: moonshot.企业版 v8.14.46 应用的 ImagePreviewActivity.java JAVA 源代码文件

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


package com.lzy.imagepicker.ui;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.format.Formatter;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;
import com.lzy.imagepicker.R;
import com.lzy.imagepicker.view.SuperCheckBox;
import java.util.Iterator;
import kp1AiJpjqJHu1Tcnj96z.CClEfcQBIieeSntHv4xl.zSFvmU2XOpXZrEfUxlHp.C0393;
import kp1AiJpjqJHu1Tcnj96z.CClEfcQBIieeSntHv4xl.zSFvmU2XOpXZrEfUxlHp.IRnPlw4EC2IclzeuBbCK.C0359;

public class ImagePreviewActivity extends ImagePreviewBaseActivity implements C0393.InterfaceC0394, View.OnClickListener, CompoundButton.OnCheckedChangeListener {

    public static final String f394 = "isOrigin";

    private Button f395;

    private SuperCheckBox f396;

    private View f397;

    private boolean f398;

    private SuperCheckBox f399;

    public class C0078 extends ViewPager.頗櫔莠扶菐亗葫悶蹊禼鐹掷 {
        public C0078() {
        }

        public void onPageSelected(int i) {
            ImagePreviewActivity imagePreviewActivity = ImagePreviewActivity.this;
            imagePreviewActivity.f407 = i;
            ImagePreviewActivity.this.f396.setChecked(ImagePreviewActivity.this.f411.m2746(imagePreviewActivity.f404.get(i)));
            ?? r7 = ImagePreviewActivity.this;
            r7.f405.setText(r7.getString(R.string.preview_image_count, new Object[]{Integer.valueOf(r7.f407 + 1), Integer.valueOf(ImagePreviewActivity.this.f404.size())}));
        }
    }

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

        @Override
        public void onClick(View view) {
            ImagePreviewActivity imagePreviewActivity = ImagePreviewActivity.this;
            C0359 c0359 = imagePreviewActivity.f404.get(imagePreviewActivity.f407);
            int m2753 = ImagePreviewActivity.this.f411.m2753();
            if (!ImagePreviewActivity.this.f396.isChecked() || ImagePreviewActivity.this.f402.size() < m2753) {
                ImagePreviewActivity imagePreviewActivity2 = ImagePreviewActivity.this;
                imagePreviewActivity2.f411.m2764(imagePreviewActivity2.f407, c0359, imagePreviewActivity2.f396.isChecked());
            } else {
                AppCompatActivity appCompatActivity = ImagePreviewActivity.this;
                Toast.makeText((Context) appCompatActivity, (CharSequence) appCompatActivity.getString(R.string.select_limit, new Object[]{Integer.valueOf(m2753)}), 0).show();
                ImagePreviewActivity.this.f396.setChecked(false);
            }
        }
    }

    public void onBackPressed() {
        Intent intent = new Intent();
        intent.putExtra(f394, this.f398);
        setResult(1005, intent);
        finish();
        super/*androidx.activity.ComponentActivity*/.onBackPressed();
    }

    @Override
    public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
        if (compoundButton.getId() == R.id.cb_origin) {
            if (!z) {
                this.f398 = false;
                this.f399.setText(getString(R.string.origin));
                return;
            }
            long j = 0;
            Iterator<C0359> it = this.f402.iterator();
            while (it.hasNext()) {
                j += it.next().f2287;
            }
            String formatFileSize = Formatter.formatFileSize(this, j);
            this.f398 = true;
            this.f399.setText(getString(R.string.origin_size, new Object[]{formatFileSize}));
        }
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.btn_ok) {
            Intent intent = new Intent();
            intent.putExtra(C0393.f2402, this.f411.m2760());
            setResult(1004, intent);
            finish();
            return;
        }
        if (id == R.id.btn_back) {
            Intent intent2 = new Intent();
            intent2.putExtra(f394, this.f398);
            setResult(1005, intent2);
            finish();
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.f398 = getIntent().getBooleanExtra(f394, false);
        this.f411.m2745(this);
        Button button = (Button) this.f410.findViewById(R.id.btn_ok);
        this.f395 = button;
        button.setVisibility(0);
        this.f395.setOnClickListener(this);
        View findViewById = findViewById(R.id.bottom_bar);
        this.f397 = findViewById;
        findViewById.setVisibility(0);
        this.f396 = (SuperCheckBox) findViewById(R.id.cb_check);
        SuperCheckBox superCheckBox = (SuperCheckBox) findViewById(R.id.cb_origin);
        this.f399 = superCheckBox;
        superCheckBox.setText(getString(R.string.origin));
        this.f399.setOnCheckedChangeListener(this);
        this.f399.setChecked(this.f398);
        mo270(0, null, false);
        boolean m2746 = this.f411.m2746(this.f404.get(this.f407));
        this.f405.setText(getString(R.string.preview_image_count, new Object[]{Integer.valueOf(this.f407 + 1), Integer.valueOf(this.f404.size())}));
        this.f396.setChecked(m2746);
        this.f403.addOnPageChangeListener(new C0078());
        this.f396.setOnClickListener(new ViewOnClickListenerC0079());
    }

    public void onDestroy() {
        this.f411.m2766(this);
        super.onDestroy();
    }

    @Override
    public void mo272() {
        if (this.f410.getVisibility() == 0) {
            this.f410.setAnimation(AnimationUtils.loadAnimation(this, R.anim.top_out));
            this.f397.setAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_out));
            this.f410.setVisibility(8);
            this.f397.setVisibility(8);
            this.f368.m2665(R.color.transparent);
            return;
        }
        this.f410.setAnimation(AnimationUtils.loadAnimation(this, R.anim.top_in));
        this.f397.setAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_in));
        this.f410.setVisibility(0);
        this.f397.setVisibility(0);
        this.f368.m2665(R.color.status_bar);
    }

    @Override
    public void mo270(int i, C0359 c0359, boolean z) {
        if (this.f411.m2770() > 0) {
            this.f395.setText(getString(R.string.select_complete, new Object[]{Integer.valueOf(this.f411.m2770()), Integer.valueOf(this.f411.m2753())}));
            this.f395.setEnabled(true);
        } else {
            this.f395.setText(getString(R.string.complete));
            this.f395.setEnabled(false);
        }
        if (this.f399.isChecked()) {
            long j = 0;
            Iterator<C0359> it = this.f402.iterator();
            while (it.hasNext()) {
                j += it.next().f2287;
            }
            this.f399.setText(getString(R.string.origin_size, new Object[]{Formatter.formatFileSize(this, j)}));
        }
    }
}