Display append function in another new activity

I am doing an application which contains a listview of phone contact with a checkbox. I have found a coding that suits to my project. It works well but it does not operate as i want. Here is it :

private void checkButtonClick() {

    Button myButton = (Button) findViewById(R.id.findSelected);
    final TextView textView = (TextView) findViewById(R.id.showAppend);
    myButton.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {

            StringBuffer responseText = new StringBuffer();
            responseText.append("The following were selected...n");

            ArrayList<Contacts> countryList = dataAdapter.contactList;
            for (int i = 0; i < countryList.size(); i++) {
                Contacts country = countryList.get(i);
                if (country.isSelected()) {
                    responseText.append("n" + country.getName());

            //Toast.makeText(getApplicationContext(), responseText,
            Intent startNewAct = new Intent(ListViewCheckboxesActivity.thisthis, DisplayAppendActivity.class);


I dont want ‘respondText’ appear in toast function, i just want it displayed in another new activity after the button clicked. I have tried the intent function, i put it under the toast funstion but the application does not perform. Maybe i just misplaced the function, what is the actual solution to handle this problem?
Source: android

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.