add hello screen

git-svn-id: https://osmand.googlecode.com/svn/trunk@299 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-07-07 12:36:53 +00:00
parent 45410f6ed0
commit 40b655cb67
5 changed files with 33 additions and 8 deletions

View file

@ -13,11 +13,8 @@ public class ToDoConstants {
*/ */
public int DESCRIBE_ABOUT_AUTHORS = 8; public int DESCRIBE_ABOUT_AUTHORS = 8;
// pinch zoom, fix bugs with test data
// TODO ANDROID // TODO ANDROID
// Prepare update v 0.2.1: screenshots, android description, sites(osmand/wiki), US/canada indexes & poi/transport.index
// 61. Provide route information for YOURS (calclate turns/angle/expected time). // 61. Provide route information for YOURS (calclate turns/angle/expected time).
// Fix some missing turns in CloudMade (for secondary roads wo name). Add them (if dist to prev/next turn > 150m) [dacha] // Fix some missing turns in CloudMade (for secondary roads wo name). Add them (if dist to prev/next turn > 150m) [dacha]

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.osmand" android:versionName="0.2" android:versionCode="2"> package="com.osmand" android:versionName="0.2.1" android:versionCode="4">
<application android:icon="@drawable/icon" android:label="@string/app_name" <application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="true" android:name=".activities.OsmandApplication" android:description="@string/app_description"> android:debuggable="false" android:name=".activities.OsmandApplication" android:description="@string/app_description">
<activity android:name=".activities.MainMenuActivity" <activity android:name=".activities.MainMenuActivity"
android:label="@string/app_name"> android:label="@string/app_name">
<intent-filter> <intent-filter>

View file

@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="first_time_continue">Продолжить</string>
<string name="first_time_download">Загрузить индексы</string>
<string name="first_time_msg">Спасибо за то, что выбрали OsmAnd. \n
Для полноценного использования приложения вам потребуются файлы индексы, которые необходимо загрузить (Настройки/Данные) или подготовить. После загрузки вам будет доступен : поиск по адресу, поиск POI, поиск транспорта.</string>
<string name="search_poi_location">Поиск сигнала...</string> <string name="search_poi_location">Поиск сигнала...</string>
<string name="search_near_map">Искать возле видимой карты</string> <string name="search_near_map">Искать возле видимой карты</string>
<string name="search_nearby">Искать рядом</string> <string name="search_nearby">Искать рядом</string>

View file

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="first_time_continue">Continue</string>
<string name="first_time_download">Download indexes</string>
<string name="first_time_msg">Thank you for choosing OsmAnd. \nTo be able to use all features of application you need index files, which you can download (Settings/Data) or prepare by yourself. After that you can use : search by address, search POI, search transport.</string>
<string name="search_poi_location">Searching signal...</string> <string name="search_poi_location">Searching signal...</string>
<string name="search_near_map">Search near last map location</string> <string name="search_near_map">Search near last map location</string>
<string name="search_nearby">Search nearby</string> <string name="search_nearby">Search nearby</string>

View file

@ -13,7 +13,9 @@ import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.app.AlertDialog.Builder; import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import android.os.Environment; import android.os.Environment;
import android.text.format.DateFormat; import android.text.format.DateFormat;
@ -33,18 +35,17 @@ import com.osmand.activities.search.SearchActivity;
public class MainMenuActivity extends Activity { public class MainMenuActivity extends Activity {
private static final String FIRST_TIME_APP_RUN = "FIRST_TIME_APP_RUN"; //$NON-NLS-1$
private static boolean applicationAlreadyStarted = false; private static boolean applicationAlreadyStarted = false;
private static final String EXCEPTION_PATH = "/osmand/exception.log"; //$NON-NLS-1$ private static final String EXCEPTION_PATH = "/osmand/exception.log"; //$NON-NLS-1$
private static final String EXCEPTION_FILE_SIZE = "/osmand/exception.log"; //$NON-NLS-1$ private static final String EXCEPTION_FILE_SIZE = "/osmand/exception.log"; //$NON-NLS-1$
private Button showMap; private Button showMap;
private Button settingsButton; private Button settingsButton;
private Button searchButton; private Button searchButton;
private Button favouritesButton; private Button favouritesButton;
public void startApplication(){ public void startApplication(){
@ -99,6 +100,8 @@ public class MainMenuActivity extends Activity {
requestWindowFeature(Window.FEATURE_NO_TITLE); requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.menu); setContentView(R.layout.menu);
showMap = (Button) findViewById(R.id.MapButton); showMap = (Button) findViewById(R.id.MapButton);
@ -148,6 +151,24 @@ public class MainMenuActivity extends Activity {
// }); // });
startApplication(); startApplication();
SharedPreferences pref = getPreferences(MODE_WORLD_WRITEABLE);
if(!pref.contains(FIRST_TIME_APP_RUN)){
pref.edit().putBoolean(FIRST_TIME_APP_RUN, true).commit();
Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.first_time_msg);
builder.setPositiveButton(R.string.first_time_download, new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface dialog, int which) {
startActivity(new Intent(MainMenuActivity.this, DownloadIndexActivity.class));
}
});
builder.setNegativeButton(R.string.first_time_continue, null);
builder.show();
}
} }
protected void showWarnings(List<String> warnings) { protected void showWarnings(List<String> warnings) {