Added AlertDialog on first startup to inform the user, that this is an early alpha and that he/she should be careful.
This commit is contained in:
parent
172eb3b76f
commit
b1efbbdee0
3 changed files with 33 additions and 3 deletions
|
@ -44,6 +44,7 @@ public class MainActivity extends ActionBarActivity
|
||||||
{
|
{
|
||||||
private ArrayList<Uri> sharedMedia;
|
private ArrayList<Uri> sharedMedia;
|
||||||
private static String Tag = "stickToAlbum";
|
private static String Tag = "stickToAlbum";
|
||||||
|
SharedPreferences sharedPref = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState)
|
protected void onCreate(Bundle savedInstanceState)
|
||||||
|
@ -51,7 +52,7 @@ public class MainActivity extends ActionBarActivity
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
|
sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
String appDirectoryPath = sharedPref.getString(SettingsActivity.KEY_PREF_APP_PATH, "");
|
String appDirectoryPath = sharedPref.getString(SettingsActivity.KEY_PREF_APP_PATH, "");
|
||||||
|
|
||||||
if(appDirectoryPath.isEmpty())
|
if(appDirectoryPath.isEmpty())
|
||||||
|
@ -83,6 +84,29 @@ public class MainActivity extends ActionBarActivity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void onResume()
|
||||||
|
{
|
||||||
|
super.onResume();
|
||||||
|
|
||||||
|
if (sharedPref.getBoolean("firstrun", true))
|
||||||
|
{
|
||||||
|
AlertDialog.Builder firstRunDialog = new AlertDialog.Builder(this);
|
||||||
|
firstRunDialog.setTitle(R.string.dialog_title_first_run);
|
||||||
|
firstRunDialog.setMessage(R.string.dialog_content_first_run);
|
||||||
|
firstRunDialog.setPositiveButton(R.string.understood, new DialogInterface.OnClickListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which)
|
||||||
|
{
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
firstRunDialog.setCancelable(false);
|
||||||
|
firstRunDialog.show();
|
||||||
|
sharedPref.edit().putBoolean("firstrun", false).commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle one single file being shared with the application.
|
* Handle one single file being shared with the application.
|
||||||
* Add the files Uri to the list of files to move and open the saveDialog.
|
* Add the files Uri to the list of files to move and open the saveDialog.
|
||||||
|
|
|
@ -6,12 +6,15 @@
|
||||||
<string name="dialog_content_on_start_from_home_screen">Teile Fotos (oder Videos) mit StickToAlbum, um diese in ein Album zu verschieben.</string>
|
<string name="dialog_content_on_start_from_home_screen">Teile Fotos (oder Videos) mit StickToAlbum, um diese in ein Album zu verschieben.</string>
|
||||||
<string name="dialog_title_unimplemented_feature">Funktion nicht verfügbar</string>
|
<string name="dialog_title_unimplemented_feature">Funktion nicht verfügbar</string>
|
||||||
<string name="dialog_content_unimplemented_feature">Diese Funktion ist noch nicht fertig implementiert.\nSchau mal nach Updates :)</string>
|
<string name="dialog_content_unimplemented_feature">Diese Funktion ist noch nicht fertig implementiert.\nSchau mal nach Updates :)</string>
|
||||||
|
<string name="dialog_title_first_run">Achtung!</string>
|
||||||
|
<string name="dialog_content_first_run">Diese App ist in einer frühen Entwicklungsphase und könnte instabil sein! Sei vorsichtig, wenn du deine schönsten Bilder verwaltest. Die App könnte abstürzen und die geteilten Daten vernichten!</string>
|
||||||
<string name="toast_invalid_album_name">Bitte gebe einen Albumnamen ein!</string>
|
<string name="toast_invalid_album_name">Bitte gebe einen Albumnamen ein!</string>
|
||||||
<string name="action_settings">Einstellungen</string>
|
<string name="action_settings">Einstellungen</string>
|
||||||
<string name="ok">OK</string>
|
<string name="ok">OK</string>
|
||||||
<string name="cancel">Abbrechen</string>
|
<string name="cancel">Abbrechen</string>
|
||||||
|
<string name="understood">Ok, ich werde vorsichtig sein.</string>
|
||||||
<string name="hint_album_name">Neues Album</string>
|
<string name="hint_album_name">Neues Album</string>
|
||||||
|
|
||||||
<string name="pref_title_app_path">Speicherort</string>
|
<string name="pref_title_app_path">Speicherort</string>
|
||||||
<string name="pref_description_app_path">Wo sollen neue Alben angelegt werden? Um zurückzusetzen, lösche diesen Wert und starte die App neu.</string>
|
<string name="pref_description_app_path">Wo sollen neue Alben angelegt werden? Um den Speicherort auf den Standardwert zurückzusetzen, lösche diesen Wert und starte die App neu.</string>
|
||||||
</resources>
|
</resources>
|
|
@ -6,12 +6,15 @@
|
||||||
<string name="dialog_content_on_start_from_home_screen">In order to stick photos in albums, you have to share those photos (or videos) with this app.</string>
|
<string name="dialog_content_on_start_from_home_screen">In order to stick photos in albums, you have to share those photos (or videos) with this app.</string>
|
||||||
<string name="dialog_title_unimplemented_feature">Feature unavailable</string>
|
<string name="dialog_title_unimplemented_feature">Feature unavailable</string>
|
||||||
<string name="dialog_content_unimplemented_feature">This feature is not implemented yet.\nCheck out updates :)</string>
|
<string name="dialog_content_unimplemented_feature">This feature is not implemented yet.\nCheck out updates :)</string>
|
||||||
|
<string name="dialog_title_first_run">Warning!</string>
|
||||||
|
<string name="dialog_content_first_run">This app is an early alpha version and can be unstable! Do not rely on it while handling your most precious images. The app may crash and destroy your data!</string>
|
||||||
<string name="toast_invalid_album_name">Please enter valid album name!</string>
|
<string name="toast_invalid_album_name">Please enter valid album name!</string>
|
||||||
<string name="action_settings">Settings</string>
|
<string name="action_settings">Settings</string>
|
||||||
<string name="ok">OK</string>
|
<string name="ok">OK</string>
|
||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
|
<string name="understood">I will be careful!</string>
|
||||||
<string name="hint_album_name">New Album</string>
|
<string name="hint_album_name">New Album</string>
|
||||||
|
|
||||||
<string name="pref_title_app_path">Album Directory</string>
|
<string name="pref_title_app_path">Album Directory</string>
|
||||||
<string name="pref_description_app_path">In which directory are Albums located? Delete value and restart app to reset.</string>
|
<string name="pref_description_app_path">In which directory are Albums located? Delete value and restart the app to reset this to default.</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in a new issue