zoukankan      html  css  js  c++  java
  • listview数据的添加

    /**
    * 加载notification内容
    */
    private void loadNotifiListView() {
    notifiListView = (ListView) findViewById(R.id.notifi_list);
    ArrayList list = new ArrayList();
    HashMap map;
    map = new HashMap();
    map.put("id", 1);
    map.put("notiIcon", R.drawable.ic_launcher);
    map.put("notiInfo",
    "您的支付P123456798已经生成,请确认付款之后通过Live Chat联系SEAGM在线客服在核实汇款信息后将为您支付订单。");
    map.put("notiTime", "2 hours ago");
    list.add(map);
    map = new HashMap();
    map.put("id", 2);
    map.put("notiIcon", R.drawable.ic_launcher);
    map.put("notiInfo",
    "您的支付P123456798已经生成,请确认付款之后通过Live Chat联系SEAGM在线客服在核实汇款信息后将为您支付订单。");
    map.put("notiTime", "2 hours ago");
    list.add(map);
    SimpleAdapter adapter = new SimpleAdapter(this, list,
    R.layout.notification_list_item, new String[] { "notiIcon",
    "notiInfo", "notiTime" }, new int[]{R.id.item_image,R.id.item_info,R.id.item_time});
    notifiListView.setAdapter(adapter);
    notifiListView.setOnItemClickListener(new OnItemClickListener() {

    @Override
    public void onItemClick(AdapterView<?> parent, View view,
    int position, long id) {
    // TODO Auto-generated method stub
    HashMap map = (HashMap) parent.getItemAtPosition(position);
    Log.e("error123", map.get("id").toString());
    }
    });
    }

  • 相关阅读:
    巡风安装配置 -windows
    Struts2-052 RCE CVE-2017-9805
    CVE-2017-12615和CVE-2017-12616
    Nmap使用指南
    理解HTTP协议
    缓慢拒绝服务攻击- slowloris.pl
    SSL&TLS渗透测试
    Nmap版本检测
    Protocol Buffer学习教程之编译器与类文件(三)
    64位Windows系统下32位应用程序连接MySql
  • 原文地址:https://www.cnblogs.com/xingmeng/p/2446103.html
Copyright © 2011-2022 走看看