我的代码如下:
/** Called when the user clicks the Get My Image button */
final String baseUrl = "http://examplewebsite.com/";
Button viewimagebutton = null
viewimagebutton = (Button) findViewById(R.id.imagegetter);
button.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View 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() + "/";
Intent i = new Intent(Intent.ACTION_VIEW , Uri.parse(url));
startActivity(i);
}});
// Do something in response to button
}
不过上线
viewimagebutton = (Button) findViewById(R.id.imagegetter);
我收到了一个错误,其中有一些语法建议。我遵循了人们在这里所说的内容,但我现在不知所措。如果您需要更多信息,请随时询问