Code example for View

Methods: getContext

0
		this.changeListener = changeListener;
	} 
 
	@Override 
	public void onClick(View v) {
        Activity activity = (Activity)v.getContext();
        SheJiaoMaoApplication sheJiaoMao = (SheJiaoMaoApplication)activity.getApplication();
        LocalAccount currentAccount = sheJiaoMao.getCurrentAccount();
        User user = (User) currentAccount.getUser();
        if (user != null) {
        	QueryUserTask queryUserTask = new QueryUserTask(activity, user, changeListener);
        	queryUserTask.execute();
        } 
	} 
 
}