package com.danding.yang800;

import android.graphics.Bitmap;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;
import com.danding.yang800.Util.ImgUtils;
import com.danding.yang800.Util.StatusColorUtil;
import com.danding.yang800.Util.ToastUtil;
import com.danding.yang800.View.XScrollView;
import com.yanzhenjie.sofia.Sofia;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AssureActivity extends BaseActivity {
    @BindView(R.id.assure_backTv)
    TextView assure_backTv;
    @BindView(R.id.assure_scrollView)
    XScrollView assure_scrollView;
    ImageView assure_Iv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        int type = StatusColorUtil.StatusBarLightMode(this);
//        if (type > 0) {
//            StatusColorUtil.setStatusBarColor(this, R.color.white);
//            StatusColorUtil.StatusBarLightMode(this, type);
//        }
        setContentView(R.layout.activity_assure);
        Sofia.with(this).statusBarDarkFont().statusBarBackground(ContextCompat.getColor(this, R.color.white));
        ButterKnife.bind(this);
        assure_scrollView.setPullRefreshEnable(false);
        assure_scrollView.setPullLoadEnable(false);
        View content = LayoutInflater.from(this).inflate(R.layout.assure_content, null);
        assure_Iv = (ImageView) content.findViewById(R.id.assure_Iv);
        Glide.with(this).load(R.drawable.assure).asBitmap().into(new SimpleTarget<Bitmap>() {
            @Override
            public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
                assure_Iv.setImageBitmap(resource);
            }
        });
        assure_scrollView.setView(content);
    }

    @OnClick({R.id.assure_backTv})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.assure_backTv:
                finish();
                break;

        }
    }
}
