Opening Multiple Local Html Files Using WebView Via ListView
I have a ListView and two html files. When I click on my first list item it directs me to the HTML1 file . But when I click on second list item, it still directs me to the same HTM
Solution 1:
You forgot to use puExtra,
if (position == 0) {
Intent myIntent = new Intent(getApplicationContext(),
Story.class);
myIntent.putExtra("key", 0);
startActivity(myIntent);
}else if (position == 1) {
Intent myIntent = new Intent(getApplicationContext(),
Story.class);
myIntent.putExtra("key", 1);
startActivity(myIntent);
}
Post a Comment for "Opening Multiple Local Html Files Using WebView Via ListView"