Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid listview first row
    primarykey
    data
    text
    <p>I have news application that needs to download data from the url and display it in listview , but i want first row to be diferent from others because in there will be displayed main news lets say , i have this adapter class to display all rows same , and i cant modify it in order to do what i wrote above , can anybody help me </p> <p>here is the code of adapter class </p> <pre><code>public class LazyAdapter extends BaseAdapter { private Activity activity; private ArrayList&lt;HashMap&lt;String, String&gt;&gt; data; private static LayoutInflater inflater=null; public ImageLoader imageLoader; public LazyAdapter(Activity a, ArrayList&lt;HashMap&lt;String, String&gt;&gt; d) { activity = a; data=d; inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); imageLoader=new ImageLoader(activity.getApplicationContext()); } public int getCount() { return data.size(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; if(convertView==null){ vi = inflater.inflate(R.layout.list_row, null); } TextView title = (TextView)vi.findViewById(R.id.title); // title //TextView artist = (TextView)vi.findViewById(R.id.artist); // artist name TextView author = (TextView)vi.findViewById(R.id.einfo1); // duration TextView datetime = (TextView)vi.findViewById(R.id.einfo); TextView story = (TextView)vi.findViewById(R.id.einfo2); ImageView thumb_image=(ImageView)vi.findViewById(R.id.list_image); // thumb image HashMap&lt;String, String&gt; n = new HashMap&lt;String, String&gt;(); n = data.get(position); // Setting all values in listview title.setText(n.get(Home.TAG_TITLE)); author.setText(n.get(Home.TAG_AUTHOR)); datetime.setText(n.get(Home.TAG_DATETIME)); story.setText(n.get(Home.TAG_STORY)); thumb_image.setTag(n.get(Home.TAG_IMG)); imageLoader.DisplayImage(n.get(Home.TAG_IMG), thumb_image); return vi; } } </code></pre>
    singulars
    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.
 

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