我已经制作了所有按钮和所有链接都可以正常工作,但我遇到的问题是我必须从顶部按钮开始并选择它,然后才能继续使用后续按钮才能使每个按钮正常工作。换句话说,在我按顺序选择每个按钮之前,没有一个按钮起作用。我确定我在这里遗漏了一些简单的东西,只是对我在这里所做的事情一无所知。任何帮助表示赞赏,谢谢!
package rainbow.cheetah.go.sms;
import android.app.Activity;
import android.os.Bundle;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class RainbowCheetahGOSMSActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button btn = (Button) findViewById(R.id.More);
btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent myWebLink = new Intent(android.content.Intent.ACTION_VIEW);
myWebLink.setData(Uri.parse("https://play.google.com/store/search?q=stealthychief&c=apps"));
startActivity(myWebLink);
Button btn = (Button) findViewById(R.id.match);
btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent myWebLink = new Intent(android.content.Intent.ACTION_VIEW);
myWebLink.setData(Uri.parse("https://play.google.com/store/search?q=rainbow+cheetah+stealthychief&c=apps"));
startActivity(myWebLink);
Button btn = (Button) findViewById(R.id.rate);
btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent myWebLink = new Intent(android.content.Intent.ACTION_VIEW);
myWebLink.setData(Uri.parse("https://play.google.com/store/apps/details?id=rainbow.cheetah.go.sms&feature=search_result#?t=W251bGwsMSwxLDEsInJhaW5ib3cuY2hlZXRhaC5nby5zbXMiXQ.."));
startActivity(myWebLink);
Button btn = (Button) findViewById(R.id.twitter);
btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent myWebLink = new Intent(android.content.Intent.ACTION_VIEW);
myWebLink.setData(Uri.parse("https://twitter.com/#!/Stealthychief"));
startActivity(myWebLink);
Button btn = (Button) findViewById(R.id.google);
btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent myWebLink = new Intent(android.content.Intent.ACTION_VIEW);
myWebLink.setData(Uri.parse("https://plus.google.com/u/0/105194414710791941012/posts"));
startActivity(myWebLink); }
});
}
});
}
});
}
});
}});
}};