我可以在视图脚蹼中传递意图吗?我在同一页面中使用 2 个 vlipper 并且都加载了不同的内容,但所有数据的活动都相同?
//ViewFlipper vf1=(ViewFlipper)findViewById(R.id.viewFlipper1);
ViewFlipper vf2=(ViewFlipper)findViewById(R.id.viewFlipper2);
LayoutInflater inflater = (LayoutInflater)getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if(ViewFlipper==vf1){
View v1 = inflater.inflate(R.layout.branchlist, null);
View v2 = inflater.inflate(R.layout.year_list, null);
View v3 = inflater.inflate(R.layout.semester_list, null);
vf1.addView(v1);
vf1.addView(v2);
vf1.addView(v3);
vf1.showNext();
vf1.showPrevious();
}
if(ViewFlipper==vf2){
View v1 = inflater.inflate(R.layout.branchlist, null);
View v2 = inflater.inflate(R.layout.semester_list, null);
vf2.addView(v1);
vf2.addView(v2);
vf2.showNext();
vf2.showPrevious();
}