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);

2番目の解決策:

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 に答える