diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index 19e916df4f..463f52dfda 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -1,26 +1,29 @@ - - - - - - - + package="com.osmand" android:versionCode="1" android:versionName="1.0"> + + + + + + + + + + + - - + - - - + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/menu.xml b/OsmAnd/res/layout/menu.xml new file mode 100644 index 0000000000..ec147e2933 --- /dev/null +++ b/OsmAnd/res/layout/menu.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 9ea9a568b0..1e64dd59d9 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -12,4 +12,7 @@ Hello World, StartActivity! OsmAnd +Exit +Map +Settings diff --git a/OsmAnd/src/com/osmand/activities/MainMenuActivity.java b/OsmAnd/src/com/osmand/activities/MainMenuActivity.java new file mode 100644 index 0000000000..6b4c9dcfc5 --- /dev/null +++ b/OsmAnd/src/com/osmand/activities/MainMenuActivity.java @@ -0,0 +1,50 @@ +package com.osmand.activities; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.view.Window; +import android.view.View.OnClickListener; +import android.widget.Button; + +import com.osmand.R; + +public class MainMenuActivity extends Activity { + + private Button showMap; + private Button exitButton; + private Button settingsButton; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + requestWindowFeature(Window.FEATURE_NO_TITLE); + setContentView(R.layout.menu); + + showMap = (Button) findViewById(R.id.MapButton); + showMap.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + final Intent settings = new Intent(MainMenuActivity.this, MapActivity.class); + startActivity(settings); + } + }); + settingsButton = (Button) findViewById(R.id.SettingsButton); + settingsButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + final Intent settings = new Intent(MainMenuActivity.this, SettingsActivity.class); + startActivity(settings); + } + }); + exitButton = (Button) findViewById(R.id.ExitButton); + exitButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + MainMenuActivity.this.finish(); + } + }); + } +}