tom1988 tom1988 - 1 month ago 8
Android Question

Where to place my button for intent?

I have created an app with a tutorial. Its now quiz time, I know what to do but how do I determine which class should have my button to open an intent for a URL that are in the JSON data.


The following Class are:



MainActivity.java -

- Creates an ArrayList showing the results in a ListView

Earthquake.java -

- Constructs Strings, Double & Longs in to an object

EarthquakeAdapter.java -

- Use GetView to inflate the ListView with the Earthquake objects

QueryUtils.java -

- JSON data where extracts to ojects and turned in to Double, Strings & Longs.

Answer

you can use intent in both classes namely MainActivity.java or EarthquakeAdapter.java.