public class PublicActivity extends BaseActivity implements View.OnClickListener {这个没什么好说的。
private TextView txt_title;
private ImageView img_back;
@Override
public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_web);
super.onCreate(savedInstanceState);
}
@Override
protected void initControl() {
txt_title = (TextView) findViewById(R.id.txt_title);
String Name = getIntent().getStringExtra(Constants.NAME);
txt_title.setText(Name);
img_back = (ImageView) findViewById(R.id.img_back);
img_back.setVisibility(View.VISIBLE);
}
@Override
protected void initView() {
}
@Override
protected void initData() {
}
@Override
protected void setListener() {
img_back.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.img_back:
Utils.finish(PublicActivity.this);
break;
default:
break;
}
}
}
44、公共页面PublicActivity
最新推荐文章于 2021-05-26 21:50:49 发布