package com.tjzhxx.union.activity;

import android.os.Bundle;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.github.chrisbanes.photoview.PhotoView;
import com.tjzhxx.union.R;
import com.tjzhxx.union.system.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 描述:
 *
 * @author yhx
 * @create 2021/9/8  11:54 PM
 */
public class PhotoPreviewActivity extends BaseActivity {
    @BindView(R.id.photoview)
    PhotoView photoview;
    @BindView(R.id.remark)
    TextView remark;

    @Override
    public int getContentViewLayoutID() {
        return R.layout.activity_photo_preview;
    }

    @Override
    public void bindViewAndEvent(Bundle savedInstanceState) {
        String url = getIntent().getStringExtra("url");
        Glide.with(this)
                .load(url)
                .fitCenter()
                .error(R.mipmap.loading)
                .placeholder(R.mipmap.loading)
                .into(photoview);
    }



    @OnClick(R.id.close)
    public void onClick() {
        finish();
    }
}
