导航菜单

页面标题

页面副标题

moonshot.企业版 v5.53.33 - ImagePreviewActivity.java 源代码

正在查看: moonshot.企业版 v5.53.33 应用的 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 jnksI9k6J1HFuFo5YzBf.t53cCoLViFIKJxicLKwJ.UBVL9U3WwxbAPwDW6rA5.C1543;
import jnksI9k6J1HFuFo5YzBf.t53cCoLViFIKJxicLKwJ.UBVL9U3WwxbAPwDW6rA5.upyuhngDCr2AObMMnNNw.C1540;

public class ImagePreviewActivity extends ImagePreviewBaseActivity implements C1543.InterfaceC1544, View.OnClickListener, CompoundButton.OnCheckedChangeListener {

    public static final String f394 = "isOrigin";

    private View f395;

    private boolean f396;

    private SuperCheckBox f397;

    private SuperCheckBox f398;

    private Button f399;

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

        @Override
        public void onClick(View view) {
            ImagePreviewActivity imagePreviewActivity = ImagePreviewActivity.this;
            C1540 c1540 = imagePreviewActivity.f406.get(imagePreviewActivity.f403);
            int m7923 = ImagePreviewActivity.this.f408.m7923();
            if (!ImagePreviewActivity.this.f398.isChecked() || ImagePreviewActivity.this.f411.size() < m7923) {
                ImagePreviewActivity imagePreviewActivity2 = ImagePreviewActivity.this;
                imagePreviewActivity2.f408.m7894(imagePreviewActivity2.f403, c1540, imagePreviewActivity2.f398.isChecked());
            } else {
                AppCompatActivity appCompatActivity = ImagePreviewActivity.this;
                Toast.makeText((Context) appCompatActivity, (CharSequence) appCompatActivity.getString(R.string.select_limit, new Object[]{Integer.valueOf(m7923)}), 0).show();
                ImagePreviewActivity.this.f398.setChecked(false);
            }
        }
    }

    public class C0079 extends ViewPager.爀錹涢萻陓嗼 {
        public C0079() {
        }

        public void onPageSelected(int i) {
            ImagePreviewActivity imagePreviewActivity = ImagePreviewActivity.this;
            imagePreviewActivity.f403 = i;
            ImagePreviewActivity.this.f398.setChecked(ImagePreviewActivity.this.f408.m7904(imagePreviewActivity.f406.get(i)));
            ?? r7 = ImagePreviewActivity.this;
            r7.f410.setText(r7.getString(R.string.preview_image_count, new Object[]{Integer.valueOf(r7.f403 + 1), Integer.valueOf(ImagePreviewActivity.this.f406.size())}));
        }
    }

    public void onBackPressed() {
        Intent intent = new Intent();
        intent.putExtra(f394, this.f396);
        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.f396 = false;
                this.f397.setText(getString(R.string.origin));
                return;
            }
            long j = 0;
            Iterator<C1540> it = this.f411.iterator();
            while (it.hasNext()) {
                j += it.next().f5368;
            }
            String formatFileSize = Formatter.formatFileSize(this, j);
            this.f396 = true;
            this.f397.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(C1543.f5383, this.f408.m7914());
            setResult(1004, intent);
            finish();
            return;
        }
        if (id == R.id.btn_back) {
            Intent intent2 = new Intent();
            intent2.putExtra(f394, this.f396);
            setResult(1005, intent2);
            finish();
        }
    }

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

    public void onDestroy() {
        this.f408.m7902(this);
        super.onDestroy();
    }

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

    @Override
    public void mo270(int i, C1540 c1540, boolean z) {
        if (this.f408.m7916() > 0) {
            this.f399.setText(getString(R.string.select_complete, new Object[]{Integer.valueOf(this.f408.m7916()), Integer.valueOf(this.f408.m7923())}));
            this.f399.setEnabled(true);
        } else {
            this.f399.setText(getString(R.string.complete));
            this.f399.setEnabled(false);
        }
        if (this.f397.isChecked()) {
            long j = 0;
            Iterator<C1540> it = this.f411.iterator();
            while (it.hasNext()) {
                j += it.next().f5368;
            }
            this.f397.setText(getString(R.string.origin_size, new Object[]{Formatter.formatFileSize(this, j)}));
        }
    }
}