正在查看: moonshot.企业版 v5.53.33 应用的 ImageCropActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: moonshot.企业版 v5.53.33 应用的 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 jnksI9k6J1HFuFo5YzBf.t53cCoLViFIKJxicLKwJ.UBVL9U3WwxbAPwDW6rA5.C1543;
import jnksI9k6J1HFuFo5YzBf.t53cCoLViFIKJxicLKwJ.UBVL9U3WwxbAPwDW6rA5.YnR9PkHnmHvkveDfytYE.C1520;
import jnksI9k6J1HFuFo5YzBf.t53cCoLViFIKJxicLKwJ.UBVL9U3WwxbAPwDW6rA5.upyuhngDCr2AObMMnNNw.C1540;
public class ImageCropActivity extends ImageBaseActivity implements View.OnClickListener, CropImageView.InterfaceC0086 {
private ArrayList<C1540> f369;
private boolean f370;
private Bitmap f371;
private CropImageView f372;
private C1543 f373;
private int f374;
private int 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.f372.m288(this.f373.m7905(this), this.f374, this.f375, this.f370);
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_image_crop);
this.f373 = C1543.m7891();
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.f372 = cropImageView;
cropImageView.setOnBitmapSaveCompleteListener(this);
this.f374 = this.f373.m7924();
this.f375 = this.f373.m7893();
this.f370 = this.f373.m7932();
ArrayList<C1540> m7914 = this.f373.m7914();
this.f369 = m7914;
String str = m7914.get(0).f5369;
this.f372.setFocusStyle(this.f373.m7896());
this.f372.setFocusWidth(this.f373.m7910());
this.f372.setFocusHeight(this.f373.m7895());
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(str, options);
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
options.inSampleSize = m259(options, displayMetrics.widthPixels, displayMetrics.heightPixels);
options.inJustDecodeBounds = false;
Bitmap decodeFile = BitmapFactory.decodeFile(str, options);
this.f371 = decodeFile;
CropImageView cropImageView2 = this.f372;
cropImageView2.setImageBitmap(cropImageView2.m289(decodeFile, C1520.m7858(str)));
}
public void onDestroy() {
super.onDestroy();
this.f372.setOnBitmapSaveCompleteListener(null);
Bitmap bitmap = this.f371;
if (bitmap == null || bitmap.isRecycled()) {
return;
}
this.f371.recycle();
this.f371 = null;
}
@Override
public void mo258(File file) {
this.f369.remove(0);
C1540 c1540 = new C1540();
c1540.f5369 = file.getAbsolutePath();
this.f369.add(c1540);
Intent intent = new Intent();
intent.putExtra(C1543.f5383, this.f369);
setResult(1004, intent);
finish();
}
public int m259(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 mo260(File file) {
}
}