title: How to pass the edit text value to adapter class
body: <p>I want to pass the text value from below activity to TextAdapter class.<br>
  public class SecondActivity extends Activity  {</p>
  
  <pre><code>EditText et1;
  TextView t1,t2;
  Button b1,b2;
  String result;
  Context context = null;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_sec);
  et1 = (EditText) this.findViewById(R.id.editText1);
  t1 = (TextView) this.findViewById(R.id.textView1);
  t2 = (TextView) this.findViewById(R.id.textView2);
  b1 = (Button) this.findViewById(R.id.button1);
  b2 = (Button) this.findViewById(R.id.button2);
  b1.setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View v) {
  t2.setText(et1.getText());
  }
  });
  b2.setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View v) {
  Intent i = new Intent(v.getContext(),ThirdActivity.class);
  startActivity(i);
  }
  });
  }
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  </code></pre>
  
  <p>This values are to be added in the array
  public class TextAdapter extends PagerAdapter{</p>
  
  <pre><code>    private String[] textViewer = new String[]{
  "Hai"--------------(Here i want the edit text value)
  };
  public TextAdapter (Context context){
  this.context= context;
  }
  
  @Override
  public int getCount() {
  return textViewer.length;
  }
  
  @Override
  public boolean isViewFromObject(View view, Object object) {
  return view==((TextView)object);
  }
  public Object instantiateItem(ViewGroup container, int position) {
  TextView textView = new TextView(context);
  textView.setText(textViewer[position]);
  ((ViewPager) container).addView(textView, 0);
  return textView;
  }
  
  @Override
  public void destroyItem(ViewGroup container, int position, Object object) {
  ((ViewPager) container).removeView((TextView) object);
  }
  </code></pre>
  
  <p>}</p>