Friday 15 July 2011

android - Clickable button which pulls user input to create a new url -


After

is my code like this:

  / ** is called when the user receives the click My image button * / last string baseUrl = "http://examplewebsite.com/"; Button ViewButton = Null View Button = (Button) Find VVBID (RIDEgigator); button.setOnClickListener (New OnClickListener () {@Override see public void onClick (v) {EditText editText1 = (EditText) findViewById (R.id.pixelw); EditText editText2 = (EditText) findViewById (R.id.pixelh); EditText editText3 = (EditText) findViewById (R.id.pixels); string url = baseurl + editText1.getText () toString () + "/" + editText2.getText () toString () + "/" + editText3.getText .. () .toString () + "/"; mean I = new intent (Intent.ACTION_VIEW, Uri.parse (url)); startActivity (i);}}); Do something in response to the // button}   

  viewimagebutton = (Button) findViewById (R.id.imagegetter);   

I get a lot of error, in which there are some syntax suggestions. I have followed those people who have said here, but I am at a loss now. If you feel free to ask if you need more info

is perfectly possible to have it It is not told how the user inputs 3 inputs I have previously adopted 3 different 3 different EditText areas

If so, something like this will appear.

  last string baseUrl = "http://examplewebsite.com/"; button.setOnClickListener (New OnClickListener () {@Override see public void onClick (v) {String url = baseurl + editText1.getText (). toString () + "/" + editText2.getText (). toString () + '/ "+ EditText3.getText () toString () +." / "Intent I = new intent (Intent.ACTION_VIEW, URI.parse); startActivity (i);}});   

When a user clicks on the button , they will be sent to the URL, the information of the base URL + 3> Edit Text field. < / Html>

No comments:

Post a Comment