package com.github.material.monitor.demo.mock;

import android.app.Activity;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.ImageView;

import com.github.material.monitor.demo.R;

/**
 * 本地 JPEG 大图预览（Gallery 点击项进入）。
 */
public final class MockFramePreviewActivity extends Activity {

    static final String EXTRA_FILE_PATH = "file_path";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mock_frame_preview);
        ImageView imageView = findViewById(R.id.iv_preview);
        String path = getIntent().getStringExtra(EXTRA_FILE_PATH);
        if (!TextUtils.isEmpty(path)) {
            imageView.setImageBitmap(BitmapFactory.decodeFile(path));
        }
    }
}
