package kcl.com.fqinqin.ui;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;
/**
* 统一方法接口
*/
public class BaseActivity extends AppCompatActivity implements View.OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
protected void initView(){}
protected void initData(){}
protected void sovle(){}
protected void showBackButton(){
//显示返回键
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
//菜单栏操作
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()){
case android.R.id.home:
finish();
break;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onClick(View v) {
}
}