标签:activity roi java file onclick instance oid androi text
Context context = view.getContext(); if (context instanceof Activity){ Activity activity = (Activity)context; }
//应用 public View.OnClickListener onClickListener = new View.OnClickListener() { public void onClick(View v) { Activity currentActivity = (Activity) v.getContext(); Intent i = new Intent(currentActivity, ScreenTransitionLab.class); currentActivity.startActivity(i); } };
标签:activity roi java file onclick instance oid androi text
原文地址:http://www.cnblogs.com/gavanwanggw/p/7267979.html