Provide a menu with options to save VPN profiles

The ID of the updated/inserted profile is sent back to the activity that
started the detail view.
This commit is contained in:
Tobias Brunner
2012-08-11 15:10:35 +02:00
parent c2e427c287
commit a3e2f127dc
3 changed files with 123 additions and 0 deletions
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2012 Tobias Brunner
Hochschule fuer Technik Rapperswil
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/menu_accept"
android:title="@string/profile_edit_save"
android:showAsAction="always|withText" />
<item
android:id="@+id/menu_cancel"
android:title="@string/profile_edit_cancel"
android:showAsAction="ifRoom" />
</menu>
@@ -25,11 +25,16 @@
<string name="add_profile">Add VPN profile</string>
<!-- VPN profile details -->
<string name="profile_edit_save">Save</string>
<string name="profile_edit_cancel">Cancel</string>
<string name="profile_name_label">Profile Name:</string>
<string name="profile_name_hint">(use gateway address)</string>
<string name="profile_gateway_label">Gateway:</string>
<string name="profile_username_label">Username:</string>
<string name="profile_password_label">Password:</string>
<string name="profile_password_hint">(prompt when needed)</string>
<!-- Warnings/Notifications in the details view -->
<string name="alert_text_no_input_gateway">Please enter the gateway address here</string>
<string name="alert_text_no_input_username">Please enter your username here</string>
</resources>