求人帮忙做个程序 本人急着做毕业设计,还有1周多点要交了但是做不出来,前几天发帖问了也没搞懂,课题是做一个房屋信息查询系统,界面已经做好,数据库也好了,我想把数据库导入到虚拟机对应的文件夹后,程序就查询这个数据库并显示出来,求好心人帮忙啊,急啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SimpleAdapter simpleAdapter的扩展性最好,可以定义各种各样的布局出来,可以放上ImageView(图片),还可以放上Button(按 钮),CheckBox(复选框)等等。下面的代码都直接继承了ListActivity,ListActivity和普通的Activity没有太大的 差别,不同就是对显示ListView做了许多优化,方面显示而已。下面的程序是实现一个带有图片的类表。首先需要定义好一个用来显示每一个列内容的xmlvlist.xml 01 <? xml version = "1.0" encoding = "utf-8" ?>02 < LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android "03 android:orientation = "horizontal" android:layout_width = "fill_parent"04 android:layout_height = "fill_parent" >05 06 07 < ImageView android:id = "@+id/img"08 android:layout_width = "wrap_content"09 android:layout_height = "wrap_content"10 android:layout_margin = "5px" />11 12 < LinearLayout android:orientation = "vertical"13 android:layout_width = "wrap_content"14 android:layout_height = "wrap_content" >15 16 < TextView android:id = "@+id/title"17 android:layout_width = "wrap_content"18 android:layout_height = "wrap_content"19 android:textColor = "#FFFFFFFF"20 android:textSize = "22px" />21 < TextView android:id = "@+id/info"22 android:layout_width = "wrap_content"23 android:layout_height = "wrap_content"24 android:textColor = "#FFFFFFFF"25 android:textSize = "13px" />26 27 </ LinearLayout >28 29 30 </ LinearLayout >下面是实现代码: 01 /**02 * @author allin03 *04 */05 public class MyListView3 extends ListActivity {06 07 08 // private List<String> data = new ArrayList<String>();09 @Override10 public void onCreate(Bundle savedInstanceState) {11 super .onCreate(savedInstanceState);12 13 SimpleAdapter adapter = new SimpleAdapter( this ,getData(),R.layout.vlist,14 new String[]{ "title" , "info" , "img" },15 new int []{R.id.title,R.id.info,R.id.img});16 setListAdapter(adapter);17 }18 19 private List<Map<String, Object>> getData() {20 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();21 22 Map<String, Object> map = new HashMap<String, Object>();23 map.put( "title" , "G1" );24 map.put( "info" , "google 1" );25 map.put( "img" , R.drawable.i1);26 list.add(map);27 28 map = new HashMap<String, Object>();29 map.put( "title" , "G2" );30 map.put( "info" , "google 2" );31 map.put( "img" , R.drawable.i2);32 list.add(map);33 34 map = new HashMap<String, Object>();35 map.put( "title" , "G3" );36 map.put( "info" , "google 3" );37 map.put( "img" , R.drawable.i3);38 list.add(map);39 40 return list;41 }42 } stdio.h引用的是哪个 findViewById() 异常问题.大侠解决一下 地图应用中关于map key的问题 Android NDK 开发问题 传递值的问题,各位大大帮帮忙吧. xml中的引用 android使用NDK编译ffmpeg或者有最新的ffmpeg 2.0打包的库 服务器网络测试 最令程序员恶心的循环 做个公交查询软件,但WebView为什么打不开百度地图,各位大牛帮帮小弟,setJavaScriptEnabled(true)也写了。从别的浏览器可以正常访问。 菜鸟问题:为什么我的代码无法调出闹钟? android 天气查询 WebService 出错 求指导
02 < LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android "
03 android:orientation = "horizontal" android:layout_width = "fill_parent"
04 android:layout_height = "fill_parent" >
05
06
07 < ImageView android:id = "@+id/img"
08 android:layout_width = "wrap_content"
09 android:layout_height = "wrap_content"
10 android:layout_margin = "5px" />
11
12 < LinearLayout android:orientation = "vertical"
13 android:layout_width = "wrap_content"
14 android:layout_height = "wrap_content" >
15
16 < TextView android:id = "@+id/title"
17 android:layout_width = "wrap_content"
18 android:layout_height = "wrap_content"
19 android:textColor = "#FFFFFFFF"
20 android:textSize = "22px" />
21 < TextView android:id = "@+id/info"
22 android:layout_width = "wrap_content"
23 android:layout_height = "wrap_content"
24 android:textColor = "#FFFFFFFF"
25 android:textSize = "13px" />
26
27 </ LinearLayout >
28
29
30 </ LinearLayout >
下面是实现代码: 01 /**
02 * @author allin
03 *
04 */
05 public class MyListView3 extends ListActivity {
06
07
08 // private List<String> data = new ArrayList<String>();
09 @Override
10 public void onCreate(Bundle savedInstanceState) {
11 super .onCreate(savedInstanceState);
12
13 SimpleAdapter adapter = new SimpleAdapter( this ,getData(),R.layout.vlist,
14 new String[]{ "title" , "info" , "img" },
15 new int []{R.id.title,R.id.info,R.id.img});
16 setListAdapter(adapter);
17 }
18
19 private List<Map<String, Object>> getData() {
20 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
21
22 Map<String, Object> map = new HashMap<String, Object>();
23 map.put( "title" , "G1" );
24 map.put( "info" , "google 1" );
25 map.put( "img" , R.drawable.i1);
26 list.add(map);
27
28 map = new HashMap<String, Object>();
29 map.put( "title" , "G2" );
30 map.put( "info" , "google 2" );
31 map.put( "img" , R.drawable.i2);
32 list.add(map);
33
34 map = new HashMap<String, Object>();
35 map.put( "title" , "G3" );
36 map.put( "info" , "google 3" );
37 map.put( "img" , R.drawable.i3);
38 list.add(map);
39
40 return list;
41 }
42 }