private void showBestGallery(View paramChildView, String paramFunctionId, boolean paramBoolean){
final View childview = paramChildView;
final HashMap<Integer, String> goodsname = new HashMap<Integer, String>();
goodsname.put(0, "商品名称0");
goodsname.put(1, "商品名称1");
goodsname.put(2, "商品名称2");
goodsname.put(3, "商品名称3");
goodsname.put(4, "商品名称4");
goodsname.put(5, "商品名称5");
final HashMap<Integer, String> goodsprice = new HashMap<Integer, String>();
goodsprice.put(0, "30.00");
goodsprice.put(1, "31.00");
goodsprice.put(2, "32.00");
goodsprice.put(3, "33.00");
goodsprice.put(4, "34.00");
goodsprice.put(5, "35.00");
//获取Gallery对象
gallery_best = (Gallery)paramChildView.findViewById(R.id.home_best_gallery);
//添加ImageAdapter给Gallery对象
final BestGalleryAdapter gallery_adapter = new BestGalleryAdapter(paramChildView.getContext());
gallery_best.setAdapter(gallery_adapter);
//gallery_best.setGravity();
//gallery_best.set
gallery_best.setCallbackDuringFling(false);
gallery_best.setSelection(Integer.MAX_VALUE/2); //设置初始化显示中间的图片,形成左右都可循环的效果
gallery_best.setOnItemSelectedListener(new OnItemSelectedListener(){
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
TextView goods_name = (TextView)childview.findViewById(R.id.home_best_goods_item_name);
goods_name.setText(goodsname.get(arg2%goodsname.size()));
TextView goods_price = (TextView)childview.findViewById(R.id.goods_Price);
goods_price.setText(goodsprice.get(arg2%goodsprice.size()));
gallery_adapter.setSelectItem(arg2);
}
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
});
m_bestgoods_expansionview.expand();
}