50,707
社区成员
发帖
与我相关
我的任务
分享
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = mInflater.inflate(R.layout.activity_newtab, null);
convertView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(mcontext, Detail.class);
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
int version = Integer
.valueOf(android.os.Build.VERSION.SDK);
if (version >= 5) {
mcontext.startActivity(intent);
mcontext.overridePendingTransition(
android.R.anim.slide_in_left,
android.R.anim.slide_out_right);
}
}
});
}
return convertView;
}