@Override public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { convertView = View.inflate(getContext(), R.layout.list_item_friend, null); } ImageView imageView = (ImageView) convertView.findViewById(R.id.imageview_image100); ImageLoader.getInstance() .displayImage( KnownUsers.getInstance().getUserFromId(getItem(position)).getPhoto100(), imageView); return convertView; }
@Override public View onCreateView( LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { userView = inflater.inflate(R.layout.activity_user, container, false); userId = Long.parseLong(getArguments().getString(EXTRA_USER_ID)); user = KnownUsers.getInstance().getUserFromId(userId); fillFieldOnActivity(); return userView; }
private void initializeVariables() { userId = intent.getLongExtra(EXTRA_USER_ID, 1); knownUsersList.addAll(KnownUsers.getInstance().getAllKnownUsers()); userActivity = this; }