Code example for View

Methods: getContext

0
	public void onClick(View widget) {
		if (status == null) {
			return; 
		} 
 
		Context context = widget.getContext();
		Intent intent = new Intent();
		Bundle bundle = new Bundle();
// 
//		bundle.putInt("TYPE", Constants.EDIT_TYPE_COMMENT); 
//        bundle.putSerializable("STATUS", status); 
//		intent.putExtras(bundle); 
// 
//		intent.setClass(context, EditCommentActivity.class); 
		 
        bundle.putSerializable("STATUS", status);
		intent.putExtras(bundle);
 
		intent.setClass(context, MicroBlogActivity.class);
		((Activity)context).startActivity(intent);
	}