android - viewflipper add view not showing -
this code works in project.setcontentview(a viewgroup).this view group addview(mainview),i think thats problem,but dont know how slove it
mainview = mlinflater.inflate(r.layout.playsong, null); mflipper = (myflipper) mainview.findviewbyid(r.id.viewflipper); protected void onpostexecute(void result) { super.onpostexecute(result); mflipper.removeallviews(); for(int i=0;i<listbitmap.size();i++) { mflipper.addview(addimageview(listbitmap.get(i))); } mflipper.invalidate(); mflipper.shownext(); } private view addimageview(bitmap bitmap) { imageview imageview = new imageview(playingsongactivity.this); imageview.setimagebitmap(bitmap); imageview.setscaletype(imageview.scaletype.center); return imageview; } <cn.duole.util.myflipper android:layout_width="fill_parent" android:layout_height="200dip" android:background="@android:color/white" android:id="@+id/viewflipper" android:layout_margintop="40dip" android:padding="20dip" android:layout_gravity="center_horizontal" />
after code, viewflipper
not showing @ all.please me,i dont know whats problem.addimageview(listbitmap.get(i)) right.i wonder if problem viewflipper not refreshed
Comments
Post a Comment