package com.example.administrator.zhapp.activity;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.view.WindowManager;
import android.widget.ImageView;

import com.example.administrator.zhapp.R;


public class PhotoActivity extends AppCompatActivity {


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //设置全屏
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_test);
        initView();
    }

    private void initView() {
        setTitle(getIntent().getExtras().getString("fileName"));
        ImageView iv = (ImageView) findViewById(R.id.iv);
        Bitmap bitmap = BitmapFactory.decodeFile(getIntent().getExtras().getString("path"));
        iv.setImageBitmap(bitmap);
    }
}
