Reputation: 25
How can I open an Activity from a OverlayItem: Here is my code now:
@Override
protected boolean onBalloonTap(int index) {
if (index == 0) {
c.startActivity(new Intent (c.getApplicationContext(),
QuoteDetail.class));
This code works well to open a new Activity but I want to add this code to the code above:
public void onClick(View view) {
Intent i = new Intent(Test.this, QuoteDetail.class);
i.putExtra("position", 1);
startActivity(i);
How can I do this. Sorry for that stupid question, I´m a beginner
Upvotes: 1
Views: 112
Reputation: 2403
private Context c;
@Override
protected boolean onBalloonTap(int index) {
if (index == 0) {
Intent intent = new Intent(c, QuoteDetail.class);
intent.putExtra("position", 1);
c.startActivity(intent);
}
}
Upvotes: 1