<ListView android:id="@+id/SCHEDULE" android:layout_width="wrap_content" android:layout_height="wrap_content"></ListView>

<?xml version="1.0" encoding="utf-8"?><!-- row.xml --><LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:paddingTop="4dip"     android:paddingBottom="6dip"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:orientation="horizontal">     <TextView android:id="@+id/TRAIN_CELL"         android:layout_width="50dip"         android:layout_height="wrap_content"/>     <TextView android:id="@+id/FROM_CELL"         android:layout_width="70dip"         android:layout_height="wrap_content" android:layout_weight="1"/>     <TextView android:id="@+id/TO_CELL"         android:layout_width="60dip"         android:layout_height="wrap_content"  android:layout_weight="1"/></LinearLayout>

ListView list = (ListView) findViewById(R.id.SCHEDULE);ArrayList<HashMap<String, String>> mylist = new ArrayList<HashMap<String, String>>();HashMap<String, String> map = new HashMap<String, String>();map.put("train", "101");map.put("from", "6:30 AM");map.put("to", "7:40 AM");mylist.add(map);map = new HashMap<String, String>();map.put("train", "103(x)");map.put("from", "6:35 AM");map.put("to", "7:45 AM");mylist.add(map);// ...mSchedule = new SimpleAdapter(this, mylist, R.layout.row,            new String[] {"train", "from", "to"}, new int[] {R.id.TRAIN_CELL, R.id.FROM_CELL, R.id.TO_CELL});list.setAdapter(mSchedule);

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android入门第十六篇之Style与Theme[转]
  2. Android中Activity的四种启动模式
  3. Android中几种图像特效处理
  4. android 常用命令
  5. “分裂”的 Android(安卓)再引争议
  6. 关于Android的nodpi,xhdpi,hdpi,mdpi,ldp
  7. android 中发送短信
  8. android中的Notification使用
  9. Android之在子线程更新UI(超详细)
  10. 【Android(安卓)4.0】Android(安卓)Icon