Three Check Box values in One string
<p>I have three check box like below</p>

<p>Facebook    CheckBox1
 GooglePlus  CheckBox2
 Twitter     CheckBox3</p>

<p>I had tried the below code : </p>

<pre><code>if (facebookChackbox.isChecked()) 
    {
        facebook_checkbox = true;

        AppUtil.facebookNetworkList_EditPost ="Facebook";
        list.add("facebook");
        Intent i = new Intent();
        i.putExtra("facebook_boolean", true);
        Log.e("facebook checkbox", "facebook checkbox" + facebook_checkbox);
    }
    else
    {
        AppUtil.facebookNetworkList_EditPost ="";
    }
    if (twitterChackbox.isChecked()) 
    {
        twitter_checkbox = true;
        AppUtil.twitterNetworkList_EditPost ="Twitter";
        list.add("twitter");
        Intent i = new Intent();
        i.putExtra("twitter_boolean", true);
        Log.e("twitter  checkbox", "twitter  checkbox" + twitter_checkbox);

    }
    else
    {
        AppUtil.twitterNetworkList_EditPost ="";
    }
    if (googleChackbox.isChecked()) 
    {
        AppUtil.gpNetworkList_EditPost ="Google Plus";
        googleplus_checkbox = true;
        list.add("gplus");
        Intent i = new Intent();
        i.putExtra("google_plus_boolean", true);
        Log.e("google plus checkbox", "google plus checkbox" + googleplus_checkbox);

    }
    else
    {
        AppUtil.gpNetworkList_EditPost ="";
    }

    AppUtil.SocialNetworkingList_EditPost = AppUtil.facebookNetworkList_EditPost+""+AppUtil.twitterNetworkList_EditPost+""+AppUtil.gpNetworkList_EditPost;
</code></pre>

<p>I have declared all these Static string in APPUTIL class .</p>

<p>When i had check all the check box ,or one or two ,it is giving me null,null,null depends on checking the chechk  box.</p>

<p>I want the value of checkbox with checkedbox which is selected.</p>

<pre><code>private void processCheckboxes() {
    // TODO Auto-generated method stub

    list = new ArrayList&lt;String&gt;();
    sb = new StringBuilder();

    if (facebookChackbox.isChecked()) 
    {
        facebook_checkbox = true;

        AppUtil.facebookNetworkList_EditPost ="Facebook";
        list.add("facebook");
        Intent i = new Intent();
        i.putExtra("facebook_boolean", true);
        Log.e("facebook checkbox", "facebook checkbox" + facebook_checkbox);
    }
    else
    {
        AppUtil.facebookNetworkList_EditPost ="";
    }
    if (twitterChackbox.isChecked()) 
    {
        twitter_checkbox = true;
        AppUtil.twitterNetworkList_EditPost ="Twitter";
        list.add("twitter");
        Intent i = new Intent();
        i.putExtra("twitter_boolean", true);
        Log.e("twitter  checkbox", "twitter  checkbox" + twitter_checkbox);

    }
    else
    {
        AppUtil.twitterNetworkList_EditPost ="";
    }
    if (googleChackbox.isChecked()) 
    {
        AppUtil.gpNetworkList_EditPost ="Google Plus";
        googleplus_checkbox = true;
        list.add("gplus");
        Intent i = new Intent();
        i.putExtra("google_plus_boolean", true);
        Log.e("google plus checkbox", "google plus checkbox" + googleplus_checkbox);

    }
    else
    {
        AppUtil.gpNetworkList_EditPost ="";
    }

    AppUtil.SocialNetworkingList_EditPost = AppUtil.facebookNetworkList_EditPost+""+AppUtil.twitterNetworkList_EditPost+""+AppUtil.gpNetworkList_EditPost;


    for (int zz = 0; zz &lt; list.size(); zz++) {

        network = list.get(zz);

        if (zz &lt; list.size() - 1) 
        {

            Log.i("list.size()",""+list.size());
            Log.i("list.size() - 1",""+list.size());
            Log.i("network",""+network);

            sb.append(network + "," + network + "," + network);

            Log.i("sb",""+sb);
        } 
        else
        {
            Log.e("log", "List----" + zz + network);
            network_list = network;

            network_list = network + "," + network + "," + network;
            // network_list=network+""+network+"&amp;gplus="+network+"&amp;twitter"+
            // "" +network;

            sb.append(network + "," + network + "," + network);
        }
    }
}
</code></pre>

<p>Above is the method which i am calling now ,i want to store the checked value in the string and want to use that for setting the text.But i am getting the facebookfacebookfacebook,means repeating of the string is happening.</p>
