这是我的代码:
<CheckBox
android:id="@+id/sprint_checkbox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/sprint_game" />
<CheckBox
android:id="@+id/marathon_checkbox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/marathon" />
<CheckBox
android:id="@+id/never_ending_checkbox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/never_ending" />
Run Code Online (Sandbox Code Playgroud)
我想要做的是"检测"其中一个被检查,然后将另外两个设置为"禁用",因此用户只能选择一个.我试图使用".setOnCheckedChangeListener",但我不能这样做,有人可以帮我一些代码吗?非常感谢!
问题是:如何在倒计时期间从CountDownTimer添加或删除时间?
例如:用户做了好事:+ 5秒,用户做错了什么:-5秒.
有人可以帮我一些代码吗?
这是我的代码:
Tab tab = actionBar
.newTab()
.setText(R.string.friends)
.setTabListener(
new TabListener<FriendsFragment>(this, "friends_list",
FriendsFragment.class));
actionBar.addTab(tab);
tab = actionBar
.newTab()
.setText(R.string.home)
.setTabListener(
new TabListener<UserHomeFragment>(this, "user_home",
UserHomeFragment.class));
actionBar.addTab(tab);
tab = actionBar
.newTab()
.setText(R.string.highscores)
.setTabListener(
new TabListener<HighscoresFragment>(this, "highscores",
HighscoresFragment.class));
actionBar.addTab(tab);
Run Code Online (Sandbox Code Playgroud)
如何将"UserHome"设置为显示/选择的第一个选项卡?我现在想要它在中间.因此,当我的"TabActivity"开始时,它将是这样的:朋友 - 主页 - 高分榜