package com.uiui.zyappstore.activity;

import android.content.Intent;
import android.graphics.Paint;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.uiui.zyappstore.BuildConfig;
import com.uiui.zyappstore.R;
import com.uiui.zyappstore.base.BaseActivity;

public class AboutActivity extends BaseActivity {
    private ImageView iv_exit;
    private TextView tv_version, tv_copyright;


    @Override
    protected int setLayoutResourceID() {
        return R.layout.activity_about;
    }

    @Override
    protected void initView() {
        iv_exit = findViewById(R.id.iv_exit);
        iv_exit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        tv_version = findViewById(R.id.tv_version);
        tv_version.setText("版本：" + BuildConfig.VERSION_NAME);
        tv_copyright = findViewById(R.id.tv_copyright);
        tv_copyright.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG); //下划线
        tv_copyright.getPaint().setAntiAlias(true);//抗锯齿
        tv_copyright.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                startActivity(new Intent(AboutActivity.this, CopyrightActivity.class));
                Intent i = new Intent(Intent.ACTION_MAIN);
                i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                i.addCategory(Intent.CATEGORY_HOME);
                startActivity(i);
            }
        });
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void setListener() {

    }
}
