Note that there are some explanatory texts on larger screens.

plurals
  1. POSet a Listview's item image from URL after loading the list
    primarykey
    data
    text
    <p>I need to load only the second item's image from a URL. I've searched for libraries and methods to make lists with URL images and text, but i only need the second item's image to be loaded. </p> <pre><code>public void prepareArrayLits() { menuItemList = new ArrayList&lt;Object&gt;(); AddObjectToList(R.drawable.icon_door, "Pet Open"); AddObjectToList(R.drawable.icon_profile_small, GlobalData.fullname); AddObjectToList(R.drawable.icon_messages, "Messages"); AddObjectToList(R.drawable.icon_people, "People"); AddObjectToList(R.drawable.icon_settings, "Settings"); AddObjectToList(R.drawable.icon_logout, "Log Out"); } </code></pre> <p>I wouldn't like to change the adapter, so what if i could change the second item's image after the list was made. Is there any way i could do this?</p> <p><em>other items images' from list cannot be loaded from url</em></p> <hr> <pre><code>@Override public Object getItem(int position) { // TODO Auto-generated method stub return menuItemList.get(position); } @Override public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub ViewHolder holder; if(convertView==null) { holder = new ViewHolder(); convertView = inflater.inflate(R.layout.menu_drawer_left, null); holder.listMenuIcon = (ImageView) convertView.findViewById(R.id.ic_menu); holder.listMenuText = (TextView) convertView.findViewById(R.id.txt_menu); convertView.setTag(holder); } else holder=(ViewHolder)convertView.getTag(); MenuItemBean bean = (MenuItemBean) menuItemList.get(position); holder.listMenuIcon.setImageResource(bean.getMenuIcon()); holder.listMenuText.setText(bean.getMenuText()); return convertView; } </code></pre> <p>If the count starts from 0, i would like to change the item with id 1. How do i change it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload