导航菜单

页面标题

页面副标题

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

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

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


package com.lzy.imagepicker.ui;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.lzy.imagepicker.R;
import com.lzy.imagepicker.view.CropImageView;
import java.io.File;
import java.util.ArrayList;
import kp1AiJpjqJHu1Tcnj96z.CClEfcQBIieeSntHv4xl.zSFvmU2XOpXZrEfUxlHp.C0393;
import kp1AiJpjqJHu1Tcnj96z.CClEfcQBIieeSntHv4xl.zSFvmU2XOpXZrEfUxlHp.IRnPlw4EC2IclzeuBbCK.C0359;
import kp1AiJpjqJHu1Tcnj96z.CClEfcQBIieeSntHv4xl.zSFvmU2XOpXZrEfUxlHp.YtIwzuk71RZuqsQkeRfV.C0369;

public class ImageCropActivity extends ImageBaseActivity implements View.OnClickListener, CropImageView.InterfaceC0084 {

    private int f369;

    private Bitmap f370;

    private int f371;

    private ArrayList<C0359> f372;

    private boolean f373;

    private C0393 f374;

    private CropImageView f375;

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.btn_back) {
            setResult(0);
            finish();
        } else if (id == R.id.btn_ok) {
            this.f375.m288(this.f374.m2763(this), this.f371, this.f369, this.f373);
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_image_crop);
        this.f374 = C0393.m2734();
        findViewById(R.id.btn_back).setOnClickListener(this);
        Button button = (Button) findViewById(R.id.btn_ok);
        button.setText(getString(R.string.complete));
        button.setOnClickListener(this);
        ((TextView) findViewById(R.id.tv_des)).setText(getString(R.string.photo_crop));
        CropImageView cropImageView = (CropImageView) findViewById(R.id.cv_crop_image);
        this.f375 = cropImageView;
        cropImageView.setOnBitmapSaveCompleteListener(this);
        this.f371 = this.f374.m2741();
        this.f369 = this.f374.m2750();
        this.f373 = this.f374.m2748();
        ArrayList<C0359> m2760 = this.f374.m2760();
        this.f372 = m2760;
        String str = m2760.get(0).f2293;
        this.f375.setFocusStyle(this.f374.m2759());
        this.f375.setFocusWidth(this.f374.m2756());
        this.f375.setFocusHeight(this.f374.m2736());
        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inJustDecodeBounds = true;
        BitmapFactory.decodeFile(str, options);
        DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
        options.inSampleSize = m258(options, displayMetrics.widthPixels, displayMetrics.heightPixels);
        options.inJustDecodeBounds = false;
        Bitmap decodeFile = BitmapFactory.decodeFile(str, options);
        this.f370 = decodeFile;
        CropImageView cropImageView2 = this.f375;
        cropImageView2.setImageBitmap(cropImageView2.m289(decodeFile, C0369.m2697(str)));
    }

    public void onDestroy() {
        super.onDestroy();
        this.f375.setOnBitmapSaveCompleteListener(null);
        Bitmap bitmap = this.f370;
        if (bitmap == null || bitmap.isRecycled()) {
            return;
        }
        this.f370.recycle();
        this.f370 = null;
    }

    public int m258(BitmapFactory.Options options, int i, int i2) {
        int i3 = options.outWidth;
        int i4 = options.outHeight;
        if (i4 > i2 || i3 > i) {
            return i3 > i4 ? i3 / i : i4 / i2;
        }
        return 1;
    }

    @Override
    public void mo259(File file) {
        this.f372.remove(0);
        C0359 c0359 = new C0359();
        c0359.f2293 = file.getAbsolutePath();
        this.f372.add(c0359);
        Intent intent = new Intent();
        intent.putExtra(C0393.f2402, this.f372);
        setResult(1004, intent);
        finish();
    }

    @Override
    public void mo260(File file) {
    }
}