简体   繁体   中英

How to make a ListView in android with images in it?

I need an organized way to organize my app and buttons are starting to look sloppy in my opinion. Below is my code. I have the XML set up to a List View. Not sure if it is right or not.

</LinearLayout>

Here is my java code. I didn't change it yet,, except for the imports from previous attempts to do this. package com.apw.listview.test;

import android.app.*; 
import android.os.*; 
import android.view.*; 
import android.widget.*; 
import android.content.*; 

public class Species extends Activity
{ 


/** Called when the activity is first created. */ 
@Override 
public void onCreate(Bundle savedInstanceState)
{ 
    super.onCreate(savedInstanceState);
    setContentView(R.layout.species);

} 



}

使用ListView的最佳方法是使用适配器,例如,请参见该教程: http : //www.vogella.com/tutorials/AndroidListView/article.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM