导航菜单

页面标题

页面副标题

Adobe Acrobat v15.3 - SGCropActivity.java 源代码

正在查看: Adobe Acrobat v15.3 应用的 SGCropActivity.java JAVA 源代码文件

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


package com.adobe.libs.signature.ui;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.ViewGroup;
import android.widget.ImageView;

public class SGCropActivity extends Activity {

    private k f242a;
    private boolean b;

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(null);
        setContentView(com.adobe.libs.signature.g.signature_crop_layout);
        com.adobe.libs.signature.l.a();
        Bitmap b = com.adobe.libs.signature.l.b();
        Intent intent = getIntent();
        if (b == null || intent == null) {
            com.adobe.libs.signature.a.c.g();
            finish();
            return;
        }
        ImageView imageView = (ImageView) findViewById(com.adobe.libs.signature.f.signature_imageview);
        imageView.setImageBitmap(b);
        this.f242a = new k(this, com.adobe.libs.signature.e.c_sign_croparea, new Rect(0, 0, b.getWidth(), b.getHeight()));
        imageView.getViewTreeObserver().addOnGlobalLayoutListener(new d(this));
        ((ViewGroup) findViewById(com.adobe.libs.signature.f.crop_main_layout)).addView(this.f242a);
        ((SGSignatureImageLinearLayout) findViewById(com.adobe.libs.signature.f.signature_imageview_layout)).setOnSizeChangedListener(new e(this));
        new j(b, true, new f(this, b)).taskExecute(new Void[0]);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuItem findItem;
        getMenuInflater().inflate(com.adobe.libs.signature.h.crop_menu, menu);
        if (menu == null || (findItem = menu.findItem(com.adobe.libs.signature.f.action_crop_rotate)) == null) {
            return true;
        }
        findItem.getIcon().setColorFilter(getResources().getColor(com.adobe.libs.signature.c.action_bar_icon_filter_color), PorterDuff.Mode.SRC_ATOP);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        int itemId = menuItem.getItemId();
        if (itemId == com.adobe.libs.signature.f.action_crop_done) {
            Bitmap b = this.f242a.b();
            if (b == null) {
                return true;
            }
            new j(b, false, new h(this)).taskExecute(new Void[0]);
            return true;
        }
        if (itemId != com.adobe.libs.signature.f.action_crop_rotate) {
            return super.onOptionsItemSelected(menuItem);
        }
        this.f242a.a();
        this.b = false;
        return true;
    }

    @Override
    protected void onSaveInstanceState(Bundle bundle) {
    }
}