Android spinner data transfer
<pre><code>package com.example.spinner;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;

public class MainActivity extends Activity {

    int i=0;
    int j=0;
    int k=0;
    private class Download extends AsyncTask&lt;Void, Void, String&gt; {
        @Override
        protected String doInBackground(Void... params) {
                String html;
            try {
                URLConnection conn;
                conn = new URL("http://logproj.500mb.net/detlist.php?type=wall").openConnection();
                conn.setRequestProperty("Referer", "http://google.com/http.example.html");
                conn.setRequestProperty("Cookie", "a=1");
                html = readStreamToString(conn.getInputStream(), "UTF-8");
                } catch (IOException ex) {
                    html="";
                }
            return html;
        }
        protected void onPostExecute(String html)
        {
            String[] adata = html.split("\n");
            List&lt;String&gt; data = new ArrayList&lt;String&gt;(Arrays.asList(adata));
            ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(MainActivity.this, android.R.layout.simple_spinner_item, data);        
            adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);                
            Spinner spinner;
            spinner = (Spinner) findViewById(R.id.spinner1);        
            spinner.setAdapter(adapter);           
            spinner.setPrompt("Стена");       
            //spinner.setSelection(2);              
            spinner.setOnItemSelectedListener(new OnItemSelectedListener() {

                @Override
                public void onItemSelected(AdapterView&lt;?&gt; parent, View view,
                        int position, long id) {    
                    // TODO Auto-generated method stub
                if(i&gt;0){    
                    TextView text;
                    text = (TextView) findViewById(R.id.text);
                    text.setText((CharSequence) parent.getItemAtPosition(position));
                }
                else i++;
                }

                @Override
                public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
                    // TODO Auto-generated method stub

                }      
            });
        }
    }
    private class Download2 extends AsyncTask&lt;Void, Void, String&gt; {
        @Override
        protected String doInBackground(Void... params) {
                String html;
            try {
                URLConnection conn;
                conn = new URL("http://logproj.500mb.net/detlist.php?type=row").openConnection();
                conn.setRequestProperty("Referer", "http://google.com/http.example.html");
                conn.setRequestProperty("Cookie", "a=1");
                html = readStreamToString(conn.getInputStream(), "UTF-8");
                } catch (IOException ex) {
                    html="";
                }
            return html;
        }
        protected void onPostExecute(String html)
        {
            String[] adata = html.split("\n");
            List&lt;String&gt; data = new ArrayList&lt;String&gt;(Arrays.asList(adata));
            ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(MainActivity.this, android.R.layout.simple_spinner_item, data);        
            adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);                
            Spinner spinner;
            spinner = (Spinner) findViewById(R.id.spinner2);        
            spinner.setAdapter(adapter);           
            spinner.setPrompt("Венец");       
            //spinner.setSelection(2);              
            spinner.setOnItemSelectedListener(new OnItemSelectedListener() {

                @Override
                public void onItemSelected(AdapterView&lt;?&gt; parent, View view,
                        int position, long id) {    
                    // TODO Auto-generated method stub
                if(i&gt;0){    
                    TextView text;
                    text = (TextView) findViewById(R.id.text);
                    text.setText((CharSequence) parent.getItemAtPosition(position));
                }
                else i++;
                }

                @Override
                public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
                    // TODO Auto-generated method stub

                }      
            });
        }
    }
    private class Download3 extends AsyncTask&lt;Void, Void, String&gt; {
        @Override
        protected String doInBackground(Void... params) {
                String html;
            try {
                URLConnection conn;
                conn = new URL("http://logproj.500mb.net/detlist.php?type=place").openConnection();
                conn.setRequestProperty("Referer", "http://google.com/http.example.html");
                conn.setRequestProperty("Cookie", "a=1");
                html = readStreamToString(conn.getInputStream(), "UTF-8");
                } catch (IOException ex) {
                    html="";
                }
            return html;
        }
        protected void onPostExecute(String html)
        {
            String[] adata = html.split("\n");
            List&lt;String&gt; data = new ArrayList&lt;String&gt;(Arrays.asList(adata));
            ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(MainActivity.this, android.R.layout.simple_spinner_item, data);        
            adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);                
            Spinner spinner;
            spinner = (Spinner) findViewById(R.id.spinner3);        
            spinner.setAdapter(adapter);           
            spinner.setPrompt("Простенок");       
            //spinner.setSelection(2);              
            spinner.setOnItemSelectedListener(new OnItemSelectedListener() {

                @Override
                public void onItemSelected(AdapterView&lt;?&gt; parent, View view,
                        int position, long id) {    
                    // TODO Auto-generated method stub
                if(i&gt;0){    
                    TextView text;
                    text = (TextView) findViewById(R.id.text);
                    text.setText((CharSequence) parent.getItemAtPosition(position));
                }
                else i++;
                }

                @Override
                public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
                    // TODO Auto-generated method stub

                }      
            });
        }
    }
    public class QueryString {
         private StringBuffer query;
         public QueryString() {
         query = new StringBuffer();
         }
         public synchronized QueryString add(Object name, Object value)
         throws UnsupportedEncodingException {
         if (!query.toString().trim().equals("")) {
         query.append("&amp;");
         }
         query.append(URLEncoder.encode(name.toString(), "utf-8"));
         query.append("=");
         query.append(URLEncoder.encode(value.toString(), "utf-8"));
         return this;
         }
        // Last Stand;
           @Override
         public String toString() {
         return query.toString();
         }

         }
         private String readStreamToString(InputStream in, String encoding) throws IOException {
         StringBuilder b = new StringBuilder();
         InputStreamReader r = new InputStreamReader(in, encoding);
         int c;
         while ((c = r.read()) != -1) {
         b.append((char)c);
         }
         return b.toString();
         }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        AsyncTask&lt;Void, Void, String&gt; html;
        AsyncTask&lt;Void, Void, String&gt; html2;
        AsyncTask&lt;Void, Void, String&gt; html3;
        html=new Download().execute();
        html2=new Download2().execute();
        html3=new Download3().execute();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

}
</code></pre>

<p>Here is my code. I need somehow change items in all other spinners when user selects an item from one of them. 
Maybe I can make this code easier someway, maybe make some classes or something I don't know because new to android development.</p>
