diff --git a/OsmAnd/res/layout/dashboard.xml b/OsmAnd/res/layout/dashboard.xml
index 6cadfb9148..f3380d7e89 100644
--- a/OsmAnd/res/layout/dashboard.xml
+++ b/OsmAnd/res/layout/dashboard.xml
@@ -13,11 +13,11 @@
android:layout_height="wrap_content"
android:background="@color/color_white"
android:layout_marginBottom="8dp">
-
-
-
-
-
-
-
-
-
@@ -112,7 +94,7 @@
android:layout_height="wrap_content">
-
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 7d3f59cb73..0d8cf081cc 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -9,6 +9,8 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
+ Search for
+ SHOW MAP
SHOW ALL
Coordinates
Turn on the screen
diff --git a/OsmAnd/src/net/osmand/plus/activities/DashboardActivity.java b/OsmAnd/src/net/osmand/plus/activities/DashboardActivity.java
index c993b57762..9fe7712676 100644
--- a/OsmAnd/src/net/osmand/plus/activities/DashboardActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/DashboardActivity.java
@@ -1,9 +1,17 @@
package net.osmand.plus.activities;
+import android.app.Activity;
+import android.content.Intent;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
+import android.widget.Button;
import com.actionbarsherlock.app.SherlockFragmentActivity;
+import com.actionbarsherlock.view.Menu;
+import net.osmand.plus.OsmAndAppCustomization;
+import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.render.MapVectorLayer;
import net.osmand.plus.sherpafy.StageFavoritesLayer;
@@ -16,16 +24,43 @@ import net.osmand.plus.views.OsmandMapTileView;
* Created by Denis on 05.11.2014.
*/
public class DashboardActivity extends SherlockFragmentActivity {
-
+ public static final boolean TIPS_AND_TRICKS = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.dashboard);
+ getSupportActionBar().setTitle(R.string.app_version);
+ ColorDrawable color = new ColorDrawable(Color.parseColor("#FF9305"));
+ getSupportActionBar().setBackgroundDrawable(color);
+ getSupportActionBar().setIcon(android.R.color.transparent);
prepareMapView();
+ setupButtons();
+ }
+ private void setupButtons(){
+ final Activity activity = this;
+ final OsmAndAppCustomization appCustomization = getMyApplication().getAppCustomization();
+
+ Button showMap = (Button) findViewById(R.id.show_map);
+ showMap.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ final Intent mapIndent = new Intent(activity, appCustomization.getMapActivity());
+ activity.startActivityForResult(mapIndent, 0);
+ }
+ });
+
+ Button showFavorites = (Button) findViewById(R.id.show_all);
+ showFavorites.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ final Intent favorites = new Intent(activity, appCustomization.getFavoritesActivity());
+ favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+ activity.startActivity(favorites);
+ }
+ });
}
private void prepareMapView() {
@@ -42,4 +77,13 @@ public class DashboardActivity extends SherlockFragmentActivity {
osmandMapTileView.setMainLayer(mapVectorLayer);
mapVectorLayer.setVisible(true);
}
+
+ private OsmandApplication getMyApplication() {
+ return (OsmandApplication) getApplication();
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ return true;
+ }
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java
index c828750617..5084673c42 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java
@@ -240,7 +240,7 @@ public class MainMenuActivity extends Activity {
favouritesButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- final Intent favorites = new Intent(activity, appCustomization.getFavoritesActivity());
+ final Intent favorites = new Intent(activity, DashboardActivity.class);
favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
activity.startActivity(favorites);
}