-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
各位老哥们,双填空有思路吗 #83
Comments
function getFitbQuestion() {
var questionCollections = className("EditText").findOnce().parent().parent();
var questionArray = [];
var findBlank = false;
var blankCount = 0;
var blankNumStr = "";
var i = 0;
questionCollections.children().forEach(item => {
if (item.className() != "android.widget.EditText") {
if (item.text() != "") {//题目段
if (findBlank) {
blankNumStr = "|" + blankCount.toString();
questionArray.push(blankNumStr);
findBlank = false;
}
questionArray.push(item.text());
}
else {
findBlank = true;
blankCount = (className("EditText").findOnce(i).parent().childCount() - 1);
i++;
}
}
});
return questionArray;
} |
感谢老哥!!!困扰我很久的问题终于解决了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
每周答题会出现双填空,研究了下,还是不懂,求解!
The text was updated successfully, but these errors were encountered: