Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了android – 无法正确打印字符串大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我想在EditText中获得整个字符串的答案.但我只有最后一个问题.这可能是因为它覆盖了价值.谁能帮我.

String question[]={
            "Is the condition of the security post organized and clean?","Is the officer aware of the U.s. Security ISO 9001:2008 Quality Program?","Does the officer have a security officer guidebook?","Does the officer have a current,valid security guard license?","Are the post orders complete?","Are the security officer key goals included in the post orders?","Is there a client emergency list of phone numbers?","Has the officer signed off that he/she read and understands the post orders","Has the officer received US Security Academy Training or state mandated Training?","Has the officer received site specific Training?","If the officer drives a vehicle on duty,does he/she have a verified valid drivers license?","Is the officer in proper uniform?","Does the officer kNow the client contact?","Does the officer kNow how to contact his/her supervisor?","Is the site on Post Positive?","Is the officer Trained and kNowledgeable on the use of Post Positive?","Are the daily activity reports up to date?","Did the inspecTing supervisor sign daily activity reports inDicaTing date and time of inspection?","Does the security officer have any safety or security concerns regarding this client LOCATIOn?",};
    for(int i=0;i<19;i++)
    {
        //summ+=summ;
        s=sq[i].split("&");


        summ=question[i]+" "+s[0];
        //Toast.makeText(getApplicationContext(),summ,Toast.LENGTH_LONG).show();
         mQuestions.setText(summ);
    }

解决方法

第一解决方

使用EditText.append将新字符串添加到EditText中的现有文本

@H_230_7@mQuestions.append(summ);

代替

@H_230_7@mQuestions.setText(summ);

解决方案:

String summ="";
for(int i=0;i<19;i++)
    {
        //summ+=summ;
        s=sq[i].split("&");

        summ +=question[i]+" "+s[0];

        mQuestions.setText(summ);
    }

大佬总结

以上是大佬教程为你收集整理的android – 无法正确打印字符串全部内容,希望文章能够帮你解决android – 无法正确打印字符串所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。