-2

I am new to Android programming.

I have an activity with two options "Book Test drive" and "Buy Car". When I click on "book test drive", I am taken to a gridview and then to MainActivity 5. I want the text on MainActivity 5's button to remain as "book test drive" when I click on "book test drive", but change to "get on road price" when I click on buy car. The button's layout lies in the ImageAdapter Fragment. How do I go about this?

getIntent.getExtras does not work in a Fragment Activity. I am sending data in the form of intent.putExtra("", "");.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
an13892
  • 1
  • 4

1 Answers1

0

In fragment you have to use

 getArguments.getExtra(KEY);
Yadu CR
  • 25
  • 2