我怎样才能循环这可以是任何循环?我怎样才能循环这个
ActionBar.Tab tab1 = mActionBar.newTab();
tab1.setText("Tab 1");
tab1.setTabListener(this);
ActionBar.Tab tab2 = mActionBar.newTab();
tab2.setText("Tab 2");
tab2.setTabListener(this);
//so that i cannot repeat the code again and again
//enhance for loop/ while /for
ActionBar.Tab tab3 = mActionBar.newTab();
tab3.setText("Tab 3");
tab3.setTabListener(this);
//i have declare three taps for swipe app
mActionBar.addTab(tab1);
mActionBar.addTab(tab2);
mActionBar.addTab(tab3);
我在Java初学者和Android工作室他们是Java对象,这就是为什么我不能循环它
我不知道为什么人们downvoting这个问题。显然,OP是编程的新手。 – SMR