<?xml version="1.0" encoding="utf-8"?>
-<WebView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- android:id="@+id/displayworldmap_webview"
- >
+ android:orientation="vertical"
+ >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:background="@drawable/ui_gradientshape"
+ android:padding="@dimen/boxshape_margin"
+ >
+
+ <TextView
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/menu_button_worldmap"
+ style="@style/textWithIcon"
+ android:textSize="@dimen/titletext"
+ android:drawableLeft="@android:drawable/ic_dialog_map"
+
+ />
-</WebView>
+ <Button
+ android:id="@+id/displayworldmap_close"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="?android:attr/buttonStyleSmall"
+ android:text="@string/dialog_close"
+ />
+
+ </LinearLayout>
+
+ <WebView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/displayworldmap_webview"
+ />
+
+</LinearLayout>
<string name="menu_button_worldmap">Map</string>
<string name="menu_button_worldmap_failed">Map cannot be displayed.</string>
<string name="display_worldmap_not_available">The map cannot be displayed from this location.</string>
+ <string name="display_worldmap_title">Map</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="translucent_black">#80000000</color>
+ <color name="displayworldmap_background">#423921</color>
</resources>
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
import android.webkit.WebView;
+import android.widget.Button;
import android.widget.Toast;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
setContentView(R.layout.displayworldmap);
displayworldmap_webview = (WebView) findViewById(R.id.displayworldmap_webview);
- displayworldmap_webview.setBackgroundColor(getResources().getColor(android.R.color.black));
+ displayworldmap_webview.setBackgroundColor(getResources().getColor(R.color.displayworldmap_background));
displayworldmap_webview.getSettings().setBuiltInZoomControls(true);
enableJavascript();
+ Button b = (Button) findViewById(R.id.displayworldmap_close);
+ b.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ DisplayWorldMapActivity.this.finish();
+ }
+ });
+
worldMapSegmentName = getIntent().getStringExtra("worldMapSegmentName");
}
public final class WorldMapController {
- public static int WORLDMAP_SCREENSHOT_TILESIZE = 12;
+ public static int WORLDMAP_SCREENSHOT_TILESIZE = 8;
public static int WORLDMAP_DISPLAY_TILESIZE = WORLDMAP_SCREENSHOT_TILESIZE;
public static void updateWorldMap(final WorldContext world, final PredefinedMap map, final LayeredTileMap mapTiles, final TileCollection cachedTiles, final Resources res) {