4

我想在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);
    }
4

1 回答 1

4

第一个解决方案:

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

 mQuestions.append(summ);

代替

 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);
    }
于 2012-12-22T15:47:55.727 回答