public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
flv01 = (ListView) findViewById(R.id.flv01);
flv02= (ListView) findViewById(R.id.flv02);
runable1 run1=new runable1();
runable1 run2=new runable1();
Thread thread1 = new Thread(run1);
Thread thread2 = new Thread(run1);
try {
thread1.start();
thread1.join();
thread2.start();
thread2.join();
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}}
public class runable1 implements Runnable{
@Override
public void run() {
System.out.println("本地OK!!");
dbUtil_1 = new dbUtil();
List<HashMap<String, String>> list3 = new ArrayList<HashMap<String, String>>();
list3.clear();
list3 = dbUtil_1.chakan(参数1);
System.out.println("0000000"+list3);
adapter = new SimpleAdapter(
xiancheng.this,
list3,
R.layout.lv02,
new String[]{"biaoti"},
new int[]{R.id.stv00});
System.out.println("赋值"+list3);
flv01.post(new Runnable(){
public void run(){
flv01.setAdapter(adapter);
}});}}
public class runable2 implements Runnable{
@Override
public void run() {
System.out.println("本地OK!!");
dbUtil_1 = new dbUtil();
List<HashMap<String, String>> list4 = new ArrayList<HashMap<String, String>>();
list4.clear();
list4 = dbUtil_1.chakan(参数2);
System.out.println("0000000"+list4);
adapter = new SimpleAdapter(
xiancheng.this,
list4,
R.layout.lv02,