So eventually I have to come back here to ask it again. I googled a lot on this issue. There are so many solutions and they are very confusing. Moreover, most of them are done in Eclipse, they said to change path, intigrate it with eclipse and bla bla...
Problem Description:
In my application (in android studio), I have an item named Map view and I want that as soon as a user clicks on it, it should take a map view page and locate that address (I have mentioned in my code) in the map. How could I do that?
DummyContent:
................................
................................
static {
// Add 4 sample items.
addItem(new DummyItem("1", "Shopping center details"));
addItem(new DummyItem("2", "Homepage"));
addItem(new DummyItem("3", "Contact"));
addItem(new DummyItem("4", "Map View"));
}
.................................
..............................
ItemDetailFragment:
.................
....................
}else if(mItem.equals("4")){//4. Map View
/*locate the following address in google map:
Times Square
Manhattan, NY 10036
United States
*/
rootView = inflater.inflate(R.layout.fragment_map_detailed, container, false);
WebView webview = (WebView) rootView.findViewById(R.id.webView2);
webview.setWebViewClient(new WebViewClient());
}
..............................
......................
fragment_map_detailed.XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
</LinearLayout>