private void initListener() { mDrawerListView.setOnItemClickListener( new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { MenuSiteItem item = (MenuSiteItem) mAdapter.getItem(position); if (item != null) { selectItem(item.id); } } }); mUserInfoView.setOnUserInfoListener( new UserInfoView.OnUserInfoListener() { @Override public void onLoginClick() { Intent intent = new Intent(getActivity(), LoginActivity.class); startActivity(intent); } }); }
public void updateUserInfo(UserEntity user) { mUserInfoView.updateUserInfo(user); }