开发者

Changing Activity on a clickable layout

I have this clickable LinearLayout view, im trying to have it change Activity when clicked by every time i click the object i get a error.

final LinearLayout lindet = (LinearLayout) findViewById(R.id.detials);
lindet.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
        Intent i = new Intent(SellingActivity.this, DetailsActivity.class);
        startActivity(i);
        finish();
   开发者_StackOverflow }
});


Did you remember to add the DetailsActivity to the AndroidManifest?


Supporting Macarse I would add that use SellingActivity.this.finish() instead of finish()

I believe this will prove to be your problem solver.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜