private void initView() { // TODO Auto-generated method stub sessionId mySharedPreferences = getSharedPreferences("Teleshopping", MODE_PRIVATE); sessionId = mySharedPreferences.getString("sessionId", "sessionId"); merchantId = mySharedPreferences.getLong("merchantId", 10000); System.out.println("sessionId---" + sessionId + "--id---" + merchantId); csz_ll = (LinearLayout) findViewById(R.id.csz_ll); csz_ll.setOnClickListener(this); dsj_ll = (LinearLayout) findViewById(R.id.dsj_ll); dsj_ll.setOnClickListener(this); lv = (XListView) findViewById(R.id.lv); lv.setPullLoadEnable(true); lv.setXListViewListener(this); lv.setDivider(null); lv.setOnItemClickListener( new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // TODO Auto-generated method stub Intent i = new Intent(getApplicationContext(), GoodsDetail.class); i.putExtra("goodsInfoId", myList.get(position - 1).getId() + ""); System.out.println("goodsInfoId" + myList.get(position - 1).getId()); startActivity(i); } }); myAdapter = new MerchantManagerAdapter(MerchantManager.this, myList); lv.setAdapter(myAdapter); }
private void initView() { titleback_image_back = (ImageView) findViewById(R.id.titleback_image_back); search = (ImageView) findViewById(R.id.search); order_listview = (XListView) findViewById(R.id.order_listview); order_listview.setDivider(null); order_listview.setPullLoadEnable(true); order_listview.setXListViewListener(this); titleback_image_back.setOnClickListener(this); search.setOnClickListener(this); order_listview.setOnItemClickListener( new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { index = arg2 - 1; Intent intent = new Intent(); intent.setClass(getApplicationContext(), TodayOederDetailsActivity.class); intent.putExtra("merchantOrderId", orderList.get(arg2 - 1).getMerchantOrderId()); startActivityForResult(intent, 0); } }); }
@Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_allorder); myApplication = (MyApplication) getApplication(); myApplication.addActivity(this); preferences = getSharedPreferences(Config.SHARED, Context.MODE_PRIVATE); String release = android.os.Build.VERSION.RELEASE; // android系统版本号 version = Integer.parseInt(release.substring(0, 1)); sessionId = preferences.getString("sessionId", "sessionId"); merchantId = preferences.getLong("merchantId", 10000); initView(); setButton(); mAdapter = new TodayOrderAdapter(this, orderList); order_listview.setAdapter(mAdapter); if (Tools.isConnect(getApplicationContext())) { builder = Tools.showLoading(this, "加载中"); getOrderList(); } else { handler.sendEmptyMessage(2); } }
private void onLoad() { lv.stopRefresh(); lv.stopLoadMore(); lv.setRefreshTime(Tools.getHourAndMin()); }
private void onLoad() { order_listview.stopRefresh(); order_listview.stopLoadMore(); order_listview.setRefreshTime(Tools.getHourAndMin()); }