小编art*_*s90的帖子

在Google plus中发布Wordpress帖子?

当我写一篇新博文时,我需要一个WP插件来更新我的谷歌+.我想要一些自动的东西,不需要+1博客文章.

wordpress plugins google-plus

5
推荐指数
1
解决办法
2万
查看次数

如何在 Java(Android) 上迭代我的 RadioButton 以查找字符串

我正在开发一个小测验应用程序。正确的答案存储在字符串数组中,因此当用户选择其中一个选项(每个选项的单选按钮)时,我会进行字符串比较。

如果答案是错误的,则应该对其他单选按钮进行迭代,以验证哪个单选按钮与我的答案数组具有相同的字符串,以标记这是正确的答案。

correctAnswer = answers[position];
int currentAnswerId = optionsRadioGroup.getCheckedRadioButtonId();
    RadioButton selectedAnswer = (RadioButton) findViewById(currentAnswerId);
    if(selectedAnswer.getText().equals(correctAnswer)) {
                    selectedAnswer.setTextColor(Color.GREEN);
                }
                else {
                    selectedAnswer.setTextColor(Color.RED);
                    //search the other radioButtons for the matching string

                }
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激,我猜这并不难,但我是 Android 和 Java 开发新手。

java android

0
推荐指数
1
解决办法
1255
查看次数

标签 统计

android ×1

google-plus ×1

java ×1

plugins ×1

wordpress ×1