How to assingn Variables Data to Methods in android
<p>In my application one form is there when i fill all fields after tab on submit button then data is storing on DB well. But my intention is when i retrieve data from database i need to assign the to that filed. In my field radio buttons check-boxes, Edit Boxes are available.Below is my code  </p>

<pre><code>submit.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
                Intent screening=new Intent(NewScreening.this,Screening.class);

                final Bundle bundle = new Bundle();             
                String Dateone = DateText.getText().toString();
                bundle.putString("Date1", Dateone); 
                screening.putExtras(bundle);
                NewScreening.this.startActivity(screening);
                setResult(1,screening);

                values2=new ContentValues();
                values2.put("ddlTestingSession", cometoknowspinner.getSelectedItem().toString());
                values2.put("txtReason",txtReason.getText().toString() );
                values2.put("txthowmany", txthowmany.getText().toString());
                values2.put("txtques1", howold_edittext.getText().toString());
                values2.put("rblques2a", getRblques2aText());
                values2.put("rblques2b", getRblques2bText());
                values2.put("rblques3", getRblques3Text());
                values2.put("txtques4",txtques4.getText().toString());
                values2.put("rblques5", getRblques5Text());
                values2.put("rblques6", getRblques6Text());
                values2.put("rblques7", getRblques7Text());
                values2.put("rblques8", getRblques8Text());
                values2.put("rblques9", getRblques9Text());
                values2.put("ddlsick", contactto_spinner.getSelectedItem().toString());
                values2.put("txtques11", txtques11.getText().toString());
                values2.put("rblques12", getRblques12Text());
                values2.put("txtques13", txtques13.getText().toString());
                values2.put("txtques14", txtques14.getText().toString());
                values2.put("rblques15", getRblques15Text());
                values2.put("rblques16", getRblques16Text());
                values2.put("rblques17", getRblques17Text());
                values2.put("txtques18", txtques18.getText().toString());
                values2.put("txtVCT", txtVCT.getText().toString());
                values2.put("Date", DateText.getText().toString());
                values2.put("PretestID", AndroidId.getBytes().toString() );
                db.insert("tbl_pre_test", "ID", values2);
                Screening.addrow=true;
            }

            private String getRblques17Text() {
                // TODO Auto-generated method stub
                if(radiobutton1_twenty.isChecked())
                {
                    return "Y";
                }
                else if(radiobutton2_twenty.isChecked()){

                    return "N";
                }
                else
                    return null;
            }

            private String getRblques16Text() {
                // TODO Auto-generated method stub
                if(radiobutton1_nineteen.isChecked())
                {
                    return "Y";
                }
                else if(radiobutton2_nineteen.isChecked()){

                    return "N";
                }
                else
                    return null;
            }

            private String getRblques15Text() {
                // TODO Auto-generated method stub
                if(radiobutton1_eighteen.isChecked())
                {
                    return "Y";
                }
                else if(radiobutton2_eighteen.isChecked()){

                    return "N";
                }
                else
                    return null;
            }

            private String getRblques12Text() {
                // TODO Auto-generated method stub
                if(radiobutton1_fifteen.isChecked())
                {
                    return "Y";
                }
                else if(radiobutton2_fifteen.isChecked()){

                    return "N";
                }
                else
                    return null;
            }

            private String getRblques9Text() {
                // TODO Auto-generated method stub

                if(radiobutton1_twelth.isChecked())
                {
                    return "Y";
                }
                else if(radiobutton2_twelth.isChecked()){

                    return "N";
                }
                else
                    return null;
            }

            private String getRblques8Text() {
                // TODO Auto-generated method stub
                if(radiobutton1_eleventh.isChecked())
                {
                    return "Y";
                }
                else if(radiobutton2_eleventh.isChecked()){

                    return "N";
                }
                else
                    return null;
            }
-------------------------------------------------------
-------------------------------------------------------



case 21:
                    cometoknow_layout.setVisibility(View.GONE);
                    whytoday_layout.setVisibility(View.GONE);
                    nooftest_layout.setVisibility(View.GONE);
                    howold.setVisibility(View.GONE);
                    fifth.setVisibility(View.GONE);
                    sixth.setVisibility(View.GONE);
                    seventh.setVisibility(View.GONE);
                    eight.setVisibility(View.GONE);
                    ninth.setVisibility(View.GONE);
                    tenth.setVisibility(View.GONE);
                    eleventh.setVisibility(View.GONE);
                    twelth.setVisibility(View.GONE);
                    therteen.setVisibility(View.GONE);
                    fourteen.setVisibility(View.GONE);
                    fifteen.setVisibility(View.GONE);
                    sixteen.setVisibility(View.GONE);
                    seventeen.setVisibility(View.GONE);
                    eighteen.setVisibility(View.GONE);
                    ninteen.setVisibility(View.GONE);
                    twenty.setVisibility(View.GONE);

                    twentytwo.setVisibility(View.GONE);
                    twentythree.setVisibility(View.VISIBLE);
                    submit.setVisibility(View.VISIBLE);
                    next.setVisibility(View.GONE);
                    break;

                default:
                    break;
                }
            }
        });


    }

     public void getParameters() {  

            if (NewScreening.this.getIntent().getExtras() != null)
            {
                Bundle bundle = getIntent().getExtras();

                txtReason=(EditText)findViewById(R.id.reason);
                txtReason.setText(bundle.getString("reasonValue"));
                //Toast.makeText(getApplicationContext(), bundle.getString("reasonValue"), Toast.LENGTH_SHORT).show();

                txthowmany=(EditText)findViewById(R.id.txthowmany);
                txthowmany.setText(bundle.getString("howmanyValue"));
                howold_edittext=(EditText)findViewById(R.id.howold_edittext);
                howold_edittext.setText(bundle.getString("textqus1Value"));
                txtques4=(EditText)findViewById(R.id.txtques4);
                txtques4.setText(bundle.getString("rbqs4Value"));
                txtques11=(EditText)findViewById(R.id.txtques11);
                txtques11.setText(bundle.getString("tq11Value"));
                txtques13=(EditText)findViewById(R.id.txtques13);
                txtques13.setText(bundle.getString("tq13Value"));
                txtques14=(EditText)findViewById(R.id.txtques14);
                txtques14.setText(bundle.getString("tq14Value"));
                txtques18=(EditText)findViewById(R.id.txtques18);
                txtques18.setText(bundle.getString("rbqs18Value"));

                txtVCT=(EditText)findViewById(R.id.txtVCT);
                txtVCT.setText(bundle.getString("TT"));
                Toast.makeText(getApplicationContext(), bundle.getString("TT"), Toast.LENGTH_LONG).show();
                contactto_spinner=(Spinner)findViewById(R.id.contactto_spinner);
                contactto_spinner.setTag(bundle.getString("ddlsValue"));
                cometoknowspinner=(Spinner)findViewById(R.id.cometoknow_spinner);
                cometoknowspinner.setTag(bundle.getString("ddltsValue"));
                DateText = new TextView(this);
                DateText.setText(bundle.getString("DateValue"));


                getRblques2aText(bundle.getString("textqus2aValue"));

                getRblques2bText(bundle.getString("textqus2bValue"));

                getRblques3Text(bundle.getString("rbqs3Value"));

                getRblques5Text(bundle.getString("rbqs5Value"));
                getRblques6Text(bundle.getString("rbqs6Value"));
                getRblques7Text(bundle.getString("rbqs7Value"));
                getRblques8Text(bundle.getString("rbqs8Value"));
                getRblques9Text(bundle.getString("rbqs9Value"));

                getRblques12Text(bundle.getString("tq12Value"));
                getRblques15Text(bundle.getString("rbqs15Value"));
                getRblques16Text(bundle.getString("rbqs16Value"));
                getRblques17Text(bundle.getString("rbqs17Value"));

            }

        }
</code></pre>
