diff --git a/src/KeePass.sln b/src/KeePass.sln
index 4ef49e95..7d5fcdce 100644
--- a/src/KeePass.sln
+++ b/src/KeePass.sln
@@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePassLib2Android", "KeePa
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "keepass2android", "keepass2android\keepass2android.csproj", "{A6CF8A86-37C1-4197-80FE-519DE2C842F5}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyValueTest", "KeyValueTest\KeyValueTest.csproj", "{70F00DF9-6CC8-40A7-BF27-A7B8D724891E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -36,6 +38,24 @@ Global
{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.Release|x64.Build.0 = Release|Any CPU
{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.ReleaseNoNet|Any CPU.ActiveCfg = ReleaseNoNet|Any CPU
{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.ReleaseNoNet|Any CPU.Build.0 = ReleaseNoNet|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Debug|Win32.Build.0 = Debug|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Debug|x64.Build.0 = Debug|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Release|Win32.ActiveCfg = Release|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Release|Win32.Build.0 = Release|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Release|x64.ActiveCfg = Release|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.Release|x64.Build.0 = Release|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.ReleaseNoNet|Any CPU.ActiveCfg = Debug|Any CPU
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}.ReleaseNoNet|Any CPU.Build.0 = Debug|Any CPU
{A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
diff --git a/src/KeyValueTest/Activity1.cs b/src/KeyValueTest/Activity1.cs
new file mode 100644
index 00000000..dbeb6607
--- /dev/null
+++ b/src/KeyValueTest/Activity1.cs
@@ -0,0 +1,95 @@
+using System;
+
+using Android.App;
+using Android.Content;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.OS;
+
+namespace KeyValueTest
+{
+ [Activity (Label = "KeyValueTest", MainLauncher = true)]
+ public class Activity1 : Activity
+ {
+ string className = null;
+ string ClassName
+ {
+ get {
+ if (className == null)
+ className = this.GetType().Name;
+ return className;
+ }
+ }
+
+ protected override void OnResume()
+ {
+ base.OnResume();
+ Android.Util.Log.Debug("DEBUG",ClassName+".OnResume");
+ }
+
+ protected override void OnStart()
+ {
+ base.OnStart();
+ Android.Util.Log.Debug("DEBUG",ClassName+".OnStart");
+ }
+
+
+ protected override void OnDestroy()
+ {
+ base.OnDestroy();
+ Android.Util.Log.Debug("DEBUG",ClassName+".OnDestroy"+IsFinishing.ToString());
+ }
+
+ protected override void OnPause()
+ {
+ base.OnPause();
+ Android.Util.Log.Debug("DEBUG",ClassName+".OnPause");
+ }
+
+ protected override void OnStop()
+ {
+ base.OnStop();
+ Android.Util.Log.Debug("DEBUG",ClassName+".OnStop");
+ }
+
+ View CreateView(string key, string value)
+ {
+ LinearLayout layout = new LinearLayout(this, null);
+ layout.Orientation = Orientation.Vertical;
+ layout.LayoutParameters = new ViewGroup.LayoutParams(LinearLayout.LayoutParams.FillParent, LinearLayout.LayoutParams.WrapContent);
+ TextView keyView = new TextView(this);
+ if (key != null)
+ keyView.Text = key;
+ layout.AddView(keyView);
+ TextView valueView = new TextView(this);
+ if (value != null)
+ valueView.Text = value;
+ valueView.SetTextIsSelectable(true);
+ layout.AddView(valueView);
+ return layout;
+ }
+
+ protected override void OnCreate(Bundle bundle)
+ {
+ Android.Util.Log.Debug("DEBUG", ClassName + ".OnCreate");
+ base.OnCreate(bundle);
+
+ // Set our view from the "main" layout resource
+ SetContentView(Resource.Layout.Main);
+
+
+
+
+ FindViewById(Resource.Id.extra_strings).AddView(CreateView("key1","value1"));
+
+ FindViewById(Resource.Id.extra_strings).AddView(CreateView("key2","value2"));
+ FindViewById(Resource.Id.extra_strings).AddView(CreateView("key3","value3"));
+
+
+
+ }
+ }
+}
+
+
diff --git a/src/KeyValueTest/Assets/AboutAssets.txt b/src/KeyValueTest/Assets/AboutAssets.txt
new file mode 100644
index 00000000..72f5729a
--- /dev/null
+++ b/src/KeyValueTest/Assets/AboutAssets.txt
@@ -0,0 +1,19 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories) and given a Build Action of "AndroidAsset".
+
+These files will be deployed with you package and will be accessible using Android's
+AssetManager, like this:
+
+public class ReadAsset : Activity
+{
+ protected override void OnCreate (Bundle bundle)
+ {
+ base.OnCreate (bundle);
+
+ InputStream input = Assets.Open ("my_asset.txt");
+ }
+}
+
+Additionally, some Android functions will automatically load asset files:
+
+Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
\ No newline at end of file
diff --git a/src/KeyValueTest/EntrySection.cs b/src/KeyValueTest/EntrySection.cs
new file mode 100644
index 00000000..5927c085
--- /dev/null
+++ b/src/KeyValueTest/EntrySection.cs
@@ -0,0 +1,75 @@
+/*
+This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
+
+ Keepass2Android 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.
+
+ Keepass2Android 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.
+
+ You should have received a copy of the GNU General Public License
+ along with Keepass2Android. If not, see .
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.Util;
+
+namespace KeyValueTest
+{
+
+ public class EntrySection : LinearLayout {
+
+ public EntrySection(Context context): base(context, null) {
+ inflate (context,null, null);
+ }
+
+ public EntrySection(Context context, IAttributeSet attrs): base(context, attrs) {
+ inflate (context,null, null);
+ }
+
+ public EntrySection(Context context, IAttributeSet attrs, String title, String value): base(context, attrs) {
+
+ inflate(context, title, value);
+ }
+
+ public EntrySection (IntPtr javaReference, JniHandleOwnership transfer)
+ : base(javaReference, transfer)
+ {
+
+ }
+
+
+ private void inflate(Context context, String title, String value) {
+ LayoutInflater inflater = (LayoutInflater) Context.GetSystemService(Context.LayoutInflaterService);
+ inflater.Inflate(Resource.Layout.entry_section, this);
+
+ setText(Resource.Id.title, title);
+ setText(Resource.Id.value, value);
+ }
+
+ private void setText(int resId, String str) {
+ if (str != null) {
+ TextView tvTitle = (TextView) FindViewById(resId);
+ tvTitle.Text = str;
+ Android.Util.Log.Debug("DEBUG", "Setting " + resId+"=" + str);
+ }
+
+ }
+ }
+
+}
+
diff --git a/src/KeyValueTest/KeyValueTest.csproj b/src/KeyValueTest/KeyValueTest.csproj
new file mode 100644
index 00000000..3545540b
--- /dev/null
+++ b/src/KeyValueTest/KeyValueTest.csproj
@@ -0,0 +1,69 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.0
+ 2.0
+ {70F00DF9-6CC8-40A7-BF27-A7B8D724891E}
+ {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Library
+ KeyValueTest
+ Resources
+ Assets
+ Resource
+ True
+ Resources\Resource.designer.cs
+ KeyValueTest
+ v4.0
+
+
+ True
+ full
+ False
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+ False
+ None
+
+
+ none
+ True
+ bin\Release
+ prompt
+ 4
+ False
+ False
+ SdkOnly
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/KeyValueTest/Properties/AssemblyInfo.cs b/src/KeyValueTest/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..9ca46797
--- /dev/null
+++ b/src/KeyValueTest/Properties/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using Android.App;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("KeyValueTest")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("crocoll")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.0")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+
diff --git a/src/KeyValueTest/Resources/AboutResources.txt b/src/KeyValueTest/Resources/AboutResources.txt
new file mode 100644
index 00000000..54c2267a
--- /dev/null
+++ b/src/KeyValueTest/Resources/AboutResources.txt
@@ -0,0 +1,44 @@
+Images, layout descriptions, binary blobs and string dictionaries can be included
+in your application as resource files. Various Android APIs are designed to
+operate on the resource IDs instead of dealing with images, strings or binary blobs
+directly.
+
+For example, a sample Android app that contains a user interface layout (main.axml),
+an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+ drawable/
+ icon.png
+
+ layout/
+ main.axml
+
+ values/
+ strings.xml
+
+In order to get the build system to recognize Android resources, set the build action to
+"AndroidResource". The native Android APIs do not operate directly with filenames, but
+instead operate on resource IDs. When you compile an Android application that uses resources,
+the build system will package the resources for distribution and generate a class called "R"
+(this is an Android convention) that contains the tokens for each one of the resources
+included. For example, for the above Resources layout, this is what the R class would expose:
+
+public class R {
+ public class drawable {
+ public const int icon = 0x123;
+ }
+
+ public class layout {
+ public const int main = 0x456;
+ }
+
+ public class strings {
+ public const int first_string = 0xabc;
+ public const int second_string = 0xbcd;
+ }
+}
+
+You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
+to reference the layout/main.axml file, or R.strings.first_string to reference the first
+string in the dictionary file values/strings.xml.
diff --git a/src/KeyValueTest/Resources/Resource.designer.cs b/src/KeyValueTest/Resources/Resource.designer.cs
new file mode 100644
index 00000000..5cdc7008
--- /dev/null
+++ b/src/KeyValueTest/Resources/Resource.designer.cs
@@ -0,0 +1,109 @@
+#pragma warning disable 1591
+//------------------------------------------------------------------------------
+//
+// Dieser Code wurde von einem Tool generiert.
+// Laufzeitversion:4.0.30319.296
+//
+// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+// der Code erneut generiert wird.
+//
+//------------------------------------------------------------------------------
+
+[assembly: Android.Runtime.ResourceDesignerAttribute("KeyValueTest.Resource", IsApplication=true)]
+
+namespace KeyValueTest
+{
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("Novell.MonoDroid.Build.Tasks", "1.0.0.0")]
+ public partial class Resource
+ {
+
+ public static void UpdateIdValues()
+ {
+ }
+
+ public partial class Attribute
+ {
+
+ private Attribute()
+ {
+ }
+ }
+
+ public partial class Drawable
+ {
+
+ // aapt resource value: 0x7f020000
+ public const int Icon = 2130837504;
+
+ private Drawable()
+ {
+ }
+ }
+
+ public partial class Id
+ {
+
+ // aapt resource value: 0x7f050003
+ public const int bottom_bar = 2131034115;
+
+ // aapt resource value: 0x7f050007
+ public const int entry_contents = 2131034119;
+
+ // aapt resource value: 0x7f050005
+ public const int entry_divider2 = 2131034117;
+
+ // aapt resource value: 0x7f050004
+ public const int entry_edit = 2131034116;
+
+ // aapt resource value: 0x7f050006
+ public const int entry_scroll = 2131034118;
+
+ // aapt resource value: 0x7f050008
+ public const int extra_strings = 2131034120;
+
+ // aapt resource value: 0x7f050000
+ public const int title = 2131034112;
+
+ // aapt resource value: 0x7f050002
+ public const int top = 2131034114;
+
+ // aapt resource value: 0x7f050001
+ public const int value = 2131034113;
+
+ private Id()
+ {
+ }
+ }
+
+ public partial class Layout
+ {
+
+ // aapt resource value: 0x7f030000
+ public const int entry_section = 2130903040;
+
+ // aapt resource value: 0x7f030001
+ public const int Main = 2130903041;
+
+ private Layout()
+ {
+ }
+ }
+
+ public partial class String
+ {
+
+ // aapt resource value: 0x7f040001
+ public const int app_name = 2130968577;
+
+ // aapt resource value: 0x7f040000
+ public const int hello = 2130968576;
+
+ private String()
+ {
+ }
+ }
+ }
+}
+#pragma warning restore 1591
diff --git a/src/KeyValueTest/Resources/drawable/Icon.png b/src/KeyValueTest/Resources/drawable/Icon.png
new file mode 100644
index 00000000..a07c69fa
Binary files /dev/null and b/src/KeyValueTest/Resources/drawable/Icon.png differ
diff --git a/src/KeyValueTest/Resources/layout-v14/Main.axml b/src/KeyValueTest/Resources/layout-v14/Main.axml
new file mode 100644
index 00000000..5ab5565c
--- /dev/null
+++ b/src/KeyValueTest/Resources/layout-v14/Main.axml
@@ -0,0 +1,12 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/KeyValueTest/Resources/layout-v14/entry_section.xml b/src/KeyValueTest/Resources/layout-v14/entry_section.xml
new file mode 100644
index 00000000..c1ef4333
--- /dev/null
+++ b/src/KeyValueTest/Resources/layout-v14/entry_section.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/KeyValueTest/Resources/layout/Main.axml b/src/KeyValueTest/Resources/layout/Main.axml
new file mode 100644
index 00000000..c17b3e4d
--- /dev/null
+++ b/src/KeyValueTest/Resources/layout/Main.axml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/KeyValueTest/Resources/layout/entry_section.xml b/src/KeyValueTest/Resources/layout/entry_section.xml
new file mode 100644
index 00000000..fbb506dc
--- /dev/null
+++ b/src/KeyValueTest/Resources/layout/entry_section.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/KeyValueTest/Resources/values/Strings.xml b/src/KeyValueTest/Resources/values/Strings.xml
new file mode 100644
index 00000000..94b78440
--- /dev/null
+++ b/src/KeyValueTest/Resources/values/Strings.xml
@@ -0,0 +1,5 @@
+
+
+ Hello World, Click Me!
+ KeyValueTest
+
diff --git a/src/keepass2android/EntryActivity.cs b/src/keepass2android/EntryActivity.cs
index 02ac7f39..8530299e 100644
--- a/src/keepass2android/EntryActivity.cs
+++ b/src/keepass2android/EntryActivity.cs
@@ -38,6 +38,7 @@ using Android.Content.PM;
using KeePassLib.Security;
using keepass2android.view;
using Android.Webkit;
+using Android.Graphics;
namespace keepass2android
{
@@ -46,11 +47,11 @@ namespace keepass2android
public const String KEY_ENTRY = "entry";
public const String KEY_REFRESH_POS = "refresh_pos";
public const String KEY_CLOSE_AFTER_CREATE = "close_after_create";
-
+
public static void Launch(Activity act, PwEntry pw, int pos) {
Launch(act, pw, pos, false);
}
-
+
public static void Launch(Activity act, PwEntry pw, int pos, bool closeAfterCreate) {
Intent i;
@@ -63,14 +64,14 @@ namespace keepass2android
act.StartActivityForResult(i,0);
}
-
+
protected PwEntry mEntry;
-
+
private bool mShowPassword;
private int mPos;
-
-
+
+
protected void setEntryView() {
SetContentView(Resource.Layout.entry_view);
}
@@ -78,28 +79,28 @@ namespace keepass2android
protected void setupEditButtons() {
View edit = FindViewById(Resource.Id.entry_edit);
edit.Click += (sender, e) => {
- EntryEditActivity.Launch(this, mEntry);
+ EntryEditActivity.Launch(this, mEntry);
};
}
protected override void OnCreate(Bundle savedInstanceState)
{
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
-
+
long usageCount = prefs.GetLong(GetString(Resource.String.UsageCount_key), 0);
-
+
ISharedPreferencesEditor edit = prefs.Edit();
edit.PutLong(GetString(Resource.String.UsageCount_key), usageCount+1);
EditorCompat.apply(edit);
-
+
mShowPassword = ! prefs.GetBoolean(GetString(Resource.String.maskpass_key), Resources.GetBoolean(Resource.Boolean.maskpass_default));
base.OnCreate(savedInstanceState);
setEntryView();
Context appCtx = ApplicationContext;
-
-
+
+
Database db = App.getDB();
// Likely the app has been killed exit the activity
if (! db.Loaded)
@@ -113,11 +114,11 @@ namespace keepass2android
Intent i = Intent;
PwUuid uuid = new PwUuid(MemUtil.HexStringToByteArray(i.GetStringExtra(KEY_ENTRY)));
mPos = i.GetIntExtra(KEY_REFRESH_POS, -1);
-
+
bool closeAfterCreate = i.GetBooleanExtra(KEY_CLOSE_AFTER_CREATE, false);
-
+
mEntry = db.entries [uuid];
-
+
// Refresh Menu contents in case onCreateMenuOptions was called before mEntry was set
@@ -141,26 +142,26 @@ namespace keepass2android
fillData(false);
setupEditButtons();
-
+
Intent showNotIntent = new Intent(this, typeof(CopyToClipboardService));
Intent.SetAction(Intents.SHOW_NOTIFICATION);
showNotIntent.PutExtra(KEY_ENTRY, mEntry.Uuid.ToHexString());
-
+
StartService(showNotIntent);
-
+
Android.Util.Log.Debug("DEBUG", "Requesting copy to clipboard for Uuid=" + mEntry.Uuid.ToHexString());
-
+
/*foreach (PwUuid key in App.getDB().entries.Keys)
{
Android.Util.Log.Debug("DEBUG",key.ToHexString() + " -> " + App.getDB().entries[key].Uuid.ToHexString());
}*/
-
+
if (closeAfterCreate)
{
Finish();
}
}
-
+
private class AfterSave : OnFinish {
public AfterSave(Handler handler):base(handler) {
@@ -168,18 +169,18 @@ namespace keepass2android
}
public override void run() {
-
+
base.run();
}
};
-
+
private String getDateTime(System.DateTime dt) {
return dt.ToString ("g", CultureInfo.CurrentUICulture);
}
-
+
String concatTags(List tags)
{
StringBuilder sb = new StringBuilder();
@@ -192,7 +193,7 @@ namespace keepass2android
sb.Remove(sb.Length-2,2);
return sb.ToString();
}
-
+
void populateExtraStrings(bool trimList)
{
ViewGroup extraGroup = (ViewGroup)FindViewById(Resource.Id.extra_strings);
@@ -206,7 +207,8 @@ namespace keepass2android
String key = pair.Key;
if (!PwDefs.IsStandardField(key))
{
- View view = new EntrySection(this, null, key, pair.Value.ReadString());
+ //View view = new EntrySection(this, null, key, pair.Value.ReadString());
+ View view = CreateEditSection(key, pair.Value.ReadString());
extraGroup.AddView(view);
hasExtraFields = true;
}
@@ -214,16 +216,38 @@ namespace keepass2android
FindViewById(Resource.Id.entry_extra_strings_label).Visibility = hasExtraFields ? ViewStates.Visible : ViewStates.Gone;
}
+ View CreateEditSection(string key, string value)
+ {
+ LinearLayout layout = new LinearLayout(this, null);
+ layout.Orientation = Orientation.Vertical;
+ LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FillParent, LinearLayout.LayoutParams.WrapContent);
+ layoutParams.SetMargins(10,0,0,0);
+ layout.LayoutParameters = layoutParams;
+ View viewInflated = LayoutInflater.Inflate(Resource.Layout.entry_extrastring_title,null);
+ TextView keyView = (TextView)viewInflated;
+ if (key != null)
+ keyView.Text = key;
+
+ layout.AddView(keyView);
+ TextView valueView = (TextView)LayoutInflater.Inflate(Resource.Layout.entry_extrastring_value, null);
+ if (value != null)
+ valueView.Text = value;
+ valueView.Typeface = Typeface.Monospace;
+ valueView.SetTextIsSelectable(true);
+ layout.AddView(valueView);
+ return layout;
+ }
+
string writeBinaryToFile(string key)
{
ProtectedBinary pb = mEntry.Binaries.Get(key);
System.Diagnostics.Debug.Assert(pb != null); if(pb == null) throw new ArgumentException();
-
+
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
string binaryDirectory = prefs.GetString(GetString(Resource.String.BinaryDirectory_key),GetString(Resource.String.BinaryDirectory_default));
-
+
var targetFile = new Java.IO.File(binaryDirectory,key);
-
+
Java.IO.File parent = targetFile.ParentFile;
if (parent == null || (parent.Exists() && ! parent.IsDirectory))
@@ -247,24 +271,24 @@ namespace keepass2android
}
}
string filename = targetFile.AbsolutePath;
-
+
byte[] pbData = pb.ReadData();
try { System.IO.File.WriteAllBytes(filename, pbData); }
catch(Exception exWrite)
{
Toast.MakeText(this, GetString(Resource.String.SaveAttachment_Failed, new Java.Lang.Object[]{ filename})
- +exWrite.Message,ToastLength.Long).Show();
+ +exWrite.Message,ToastLength.Long).Show();
return null;
}
finally
{
MemUtil.ZeroByteArray(pbData);
}
-
+
return filename;
-
+
}
-
+
void openBinaryFile(string filename)
{
String theMIMEType = getMimeType(filename);
@@ -284,7 +308,7 @@ namespace keepass2android
}
}
}
-
+
void populateBinaries(bool trimList)
{
ViewGroup binariesGroup = (ViewGroup)FindViewById(Resource.Id.binaries);
@@ -303,21 +327,21 @@ namespace keepass2android
{
Button btnSender = (Button)(sender);
string newFilename = writeBinaryToFile(btnSender.Text);
-
+
if (newFilename != null)
{
Toast.MakeText(this, GetString(Resource.String.SaveAttachment_doneMessage, new Java.Lang.Object[]{newFilename}), ToastLength.Short).Show();
openBinaryFile(newFilename);
}
-
+
};
binariesGroup.AddView(binaryButton,layoutParams);
-
+
}
FindViewById(Resource.Id.entry_binaries_label).Visibility = mEntry.Binaries.UCount > 0 ? ViewStates.Visible : ViewStates.Gone;
}
-
+
// url = file path or whatever suitable URL you want.
public static String getMimeType(String url)
{
@@ -346,6 +370,11 @@ namespace keepass2android
button.Click += (object sender, EventArgs e) => {
Finish(); };
}
+ if (ActionBar != null)
+ {
+ ActionBar.Title = mEntry.Strings.ReadSafe(PwDefs.TitleField);
+ ActionBar.SetDisplayHomeAsUpEnabled(true);
+ }
populateText(Resource.Id.entry_user_name, Resource.Id.entry_user_name_label, mEntry.Strings.ReadSafe(PwDefs.UserNameField));
populateText(Resource.Id.entry_url, Resource.Id.entry_url_label, mEntry.Strings.ReadSafe(PwDefs.UrlField));
@@ -364,22 +393,22 @@ namespace keepass2android
populateText(Resource.Id.entry_expires, Resource.Id.entry_expires_label, Resource.String.never);
}
populateText(Resource.Id.entry_comment, Resource.Id.entry_comment_label, mEntry.Strings.ReadSafe(PwDefs.NotesField));
-
+
populateText(Resource.Id.entry_tags, Resource.Id.entry_tags_label, concatTags(mEntry.Tags));
-
+
populateText(Resource.Id.entry_override_url, Resource.Id.entry_override_url_label, mEntry.OverrideUrl);
-
+
populateExtraStrings(trimList);
-
+
populateBinaries(trimList);
-
-
+
+
}
private void populateText(int viewId, int headerViewId,int resId) {
View header = FindViewById(headerViewId);
TextView tv = (TextView)FindViewById(viewId);
-
+
header.Visibility = tv.Visibility = ViewStates.Visible;
tv.SetText (resId);
}
@@ -396,10 +425,10 @@ namespace keepass2android
{
header.Visibility = tv.Visibility = ViewStates.Visible;
tv.Text = text;
-
+
}
}
-
+
void requiresRefresh ()
{
Intent ret = new Intent ();
@@ -419,7 +448,7 @@ namespace keepass2android
public override bool OnCreateOptionsMenu(IMenu menu) {
base.OnCreateOptionsMenu(menu);
-
+
MenuInflater inflater = MenuInflater;
inflater.Inflate(Resource.Menu.entry, menu);
@@ -429,7 +458,7 @@ namespace keepass2android
} else {
togglePassword.SetTitle(Resource.String.show_password);
}
-
+
IMenuItem gotoUrl = menu.FindItem(Resource.Id.menu_goto_url);
//Disabled IMenuItem copyUser = menu.FindItem(Resource.Id.menu_copy_user);
//Disabled IMenuItem copyPass = menu.FindItem(Resource.Id.menu_copy_pass);
@@ -471,7 +500,7 @@ namespace keepass2android
public override bool OnOptionsItemSelected(IMenuItem item) {
switch ( item.ItemId ) {
- /*case Resource.Id.menu_donate:
+ /*case Resource.Id.menu_donate:
try {
Util.gotoUrl(this, Resource.String.donate_url);
} catch (ActivityNotFoundException) {
@@ -480,34 +509,34 @@ namespace keepass2android
}
return true;*/
- case Resource.Id.menu_toggle_pass:
- if ( mShowPassword ) {
- item.SetTitle(Resource.String.show_password);
- mShowPassword = false;
- } else {
- item.SetTitle(Resource.String.menu_hide_password);
- mShowPassword = true;
- }
- setPasswordStyle();
-
- return true;
-
- case Resource.Id.menu_goto_url:
- String url;
- url = mEntry.Strings.ReadSafe (PwDefs.UserNameField);
-
- // Default http:// if no protocol specified
- if ( ! url.Contains("://") ) {
- url = "http://" + url;
- }
-
- try {
- Util.gotoUrl(this, url);
- } catch (ActivityNotFoundException) {
- Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
- }
- return true;
- /* TODO: required?
+ case Resource.Id.menu_toggle_pass:
+ if ( mShowPassword ) {
+ item.SetTitle(Resource.String.show_password);
+ mShowPassword = false;
+ } else {
+ item.SetTitle(Resource.String.menu_hide_password);
+ mShowPassword = true;
+ }
+ setPasswordStyle();
+
+ return true;
+
+ case Resource.Id.menu_goto_url:
+ String url;
+ url = mEntry.Strings.ReadSafe (PwDefs.UserNameField);
+
+ // Default http:// if no protocol specified
+ if ( ! url.Contains("://") ) {
+ url = "http://" + url;
+ }
+
+ try {
+ Util.gotoUrl(this, url);
+ } catch (ActivityNotFoundException) {
+ Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
+ }
+ return true;
+ /* TODO: required?
case Resource.Id.menu_copy_user:
timeoutCopyToClipboard(mEntry.Strings.ReadSafe (PwDefs.UserNameField));
return true;
@@ -516,38 +545,44 @@ namespace keepass2android
timeoutCopyToClipboard(mEntry.Strings.ReadSafe (PwDefs.UserNameField));
return true;
*/
- case Resource.Id.menu_rate:
- try {
+ case Resource.Id.menu_rate:
+ try {
Util.gotoMarket(this);
- } catch (ActivityNotFoundException) {
- Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
- }
+ } catch (ActivityNotFoundException) {
+ Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
+ }
return true;
- case Resource.Id.menu_suggest_improvements:
- try {
+ case Resource.Id.menu_suggest_improvements:
+ try {
Util.gotoUrl(this, Resource.String.SuggestionsURL);
- } catch (ActivityNotFoundException) {
- Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
- }
+ } catch (ActivityNotFoundException) {
+ Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
+ }
+ return true;
+ case Resource.Id.menu_lock:
+ App.setShutdown();
+ SetResult(KeePass.EXIT_LOCK);
+ Finish();
+ return true;
+ case Resource.Id.menu_translate:
+ try {
+ Util.gotoUrl(this, Resource.String.TranslationURL);
+ } catch (ActivityNotFoundException) {
+ Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
+ }
+ return true;
+ case Android.Resource.Id.Home:
+ //Currently the action bar only displays the home button when we come from a previous activity.
+ //So we can simply Finish. See this page for information on how to do this in more general (future?) cases:
+ //http://developer.android.com/training/implementing-navigation/ancestral.html
+ Finish();
return true;
- case Resource.Id.menu_lock:
- App.setShutdown();
- SetResult(KeePass.EXIT_LOCK);
- Finish();
- return true;
- case Resource.Id.menu_translate:
- try {
- Util.gotoUrl(this, Resource.String.TranslationURL);
- } catch (ActivityNotFoundException) {
- Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
- }
- return true;
}
-
+
return base.OnOptionsItemSelected(item);
}
}
-
+
}
diff --git a/src/keepass2android/EntryEditActivity.cs b/src/keepass2android/EntryEditActivity.cs
index 70b249de..bc95ecf3 100644
--- a/src/keepass2android/EntryEditActivity.cs
+++ b/src/keepass2android/EntryEditActivity.cs
@@ -45,16 +45,14 @@ namespace keepass2android
public const int RESULT_OK_ICON_PICKER = (int)Result.FirstUser + 1000;
public const int RESULT_OK_PASSWORD_GENERATOR = RESULT_OK_ICON_PICKER + 1;
-
- private PwEntry mEntry, mEntryInDatabase;
- private bool mShowPassword = false;
- private bool mIsNew;
- private PwIcon mSelectedIconID;
- private PwUuid mSelectedCustomIconID = PwUuid.Zero;
- private bool mSelectedIcon = false;
- bool mEntryModified;
-
+ const string Intent_ContinueWithEditing = "ContinueWithEditing";
+
+ EntryEditActivityState State
+ {
+ get { return App.entryEditActivityState; }
+ }
+
public static void Launch(Activity act, PwEntry pw) {
Intent i = new Intent(act, typeof(EntryEditActivity));
@@ -73,16 +71,24 @@ namespace keepass2android
}
private ScrollView scroll;
+
+ bool mCloseForReload;
protected override void OnCreate(Bundle savedInstanceState)
{
- ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
- mShowPassword = ! prefs.GetBoolean(GetString(Resource.String.maskpass_key), Resources.GetBoolean(Resource.Boolean.maskpass_default));
-
base.OnCreate(savedInstanceState);
+
+ if (this.LastNonConfigurationInstance != null)
+ {
+ //bug in Mono for Android or whatever: after config change the extra fields are wrong
+ // -> reload:
+ reload();
+ return;
+ }
+
SetContentView(Resource.Layout.entry_edit);
- SetResult(KeePass.EXIT_NORMAL);
-
+ mCloseForReload = false;
+
// Likely the app has been killed exit the activity
Database db = App.getDB();
if (! db.Open)
@@ -90,26 +96,38 @@ namespace keepass2android
Finish();
return;
}
-
- Intent i = Intent;
- String uuidBytes = i.GetStringExtra(KEY_ENTRY);
- PwUuid entryId = PwUuid.Zero;
- if (uuidBytes != null)
- entryId = new KeePassLib.PwUuid(MemUtil.HexStringToByteArray(uuidBytes));
- PwGroup parentGroup = null;
- if (entryId == PwUuid.Zero)
+ if (Intent.GetBooleanExtra(Intent_ContinueWithEditing, false))
{
- String groupId = i.GetStringExtra(KEY_PARENT);
+ //property "State" will return the state
- parentGroup = db.groups [new PwUuid(MemUtil.HexStringToByteArray(groupId))];
- mEntryInDatabase = new PwEntry(true, true);
- mEntryInDatabase.Strings.Set(PwDefs.UserNameField, new ProtectedString(
- db.pm.MemoryProtection.ProtectUserName, db.pm.DefaultUserName));
-
- /*KPDesktop
+ } else
+ {
+ App.entryEditActivityState = new EntryEditActivityState();
+ ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
+ State.mShowPassword = ! prefs.GetBoolean(GetString(Resource.String.maskpass_key), Resources.GetBoolean(Resource.Boolean.maskpass_default));
+
+ Intent i = Intent;
+ String uuidBytes = i.GetStringExtra(KEY_ENTRY);
+
+ PwUuid entryId = PwUuid.Zero;
+ if (uuidBytes != null)
+ entryId = new KeePassLib.PwUuid(MemUtil.HexStringToByteArray(uuidBytes));
+
+ State.parentGroup = null;
+ if (entryId == PwUuid.Zero)
+ {
+ String groupId = i.GetStringExtra(KEY_PARENT);
+
+ State.parentGroup = db.groups [new PwUuid(MemUtil.HexStringToByteArray(groupId))];
+
+ State.mEntryInDatabase = new PwEntry(true, true);
+ State.mEntryInDatabase.Strings.Set(PwDefs.UserNameField, new ProtectedString(
+ db.pm.MemoryProtection.ProtectUserName, db.pm.DefaultUserName));
+
+ /*KPDesktop
* ProtectedString psAutoGen;
PwGenerator.Generate(out psAutoGen, Program.Config.PasswordGenerator.AutoGeneratedPasswordsProfile,
null, Program.PwGeneratorPool);
@@ -122,15 +140,15 @@ namespace keepass2android
pwe.Expires = true;
pwe.ExpiryTime = DateTime.Now.AddDays(nExpireDays);
}*/
-
- if ((parentGroup.IconId != PwIcon.Folder) && (parentGroup.IconId != PwIcon.FolderOpen) &&
- (parentGroup.IconId != PwIcon.FolderPackage))
- {
- mEntryInDatabase.IconId = parentGroup.IconId; // Inherit icon from group
- }
- mEntryInDatabase.CustomIconUuid = parentGroup.CustomIconUuid;
-
- /*
+
+ if ((State.parentGroup.IconId != PwIcon.Folder) && (State.parentGroup.IconId != PwIcon.FolderOpen) &&
+ (State.parentGroup.IconId != PwIcon.FolderPackage))
+ {
+ State.mEntryInDatabase.IconId = State.parentGroup.IconId; // Inherit icon from group
+ }
+ State.mEntryInDatabase.CustomIconUuid = State.parentGroup.CustomIconUuid;
+
+ /*
* KPDesktop
if(strDefaultSeq.Length == 0)
{
@@ -148,28 +166,43 @@ namespace keepass2android
}
}
}*/
- mIsNew = true;
- mEntryModified = true;
-
- } else
- {
-
- System.Diagnostics.Debug.Assert(entryId != null);
-
- mEntryInDatabase = db.entries [entryId];
- mIsNew = false;
+ State.mIsNew = true;
+ State.mEntryModified = true;
+
+ } else
+ {
+
+ System.Diagnostics.Debug.Assert(entryId != null);
+
+ State.mEntryInDatabase = db.entries [entryId];
+ State.mIsNew = false;
+
+
+ }
+ State.mEntry = State.mEntryInDatabase.CloneDeep();
- }
+ }
+
+ if (!State.mEntryModified)
+ SetResult(KeePass.EXIT_NORMAL);
+ else
+ SetResult(KeePass.EXIT_REFRESH_TITLE);
- mEntry = mEntryInDatabase.CloneDeep();
fillData();
View scrollView = FindViewById(Resource.Id.entry_scroll);
scrollView.ScrollBarStyle = ScrollbarStyles.InsideInset;
ImageButton iconButton = (ImageButton)FindViewById(Resource.Id.icon_button);
+
+ if (State.mSelectedIcon)
+ {
+ //TODO: custom image
+ iconButton.SetImageResource(Icons.iconToResId(State.mSelectedIconID));
+ }
iconButton.Click += (sender, evt) => {
+ UpdateEntryFromUi(State.mEntry);
IconPickerActivity.Launch(this);
};
@@ -177,7 +210,7 @@ namespace keepass2android
// Generate password button
Button generatePassword = (Button)FindViewById(Resource.Id.generate_button);
generatePassword.Click += (object sender, EventArgs e) => {
-
+ UpdateEntryFromUi(State.mEntry);
GeneratePasswordActivity.Launch(this);
};
@@ -201,161 +234,14 @@ namespace keepass2android
}
save.Click += (object sender, EventArgs e) =>
{
-
- EntryEditActivity act = this;
-
- if (!validateBeforeSaving())
- return;
+ OnFinish onFinish = new AfterSave(new Handler(), this);
- PwEntry initialEntry = mEntryInDatabase.CloneDeep();
+ SaveEntry(onFinish);
- PwEntry newEntry = mEntryInDatabase;
-
- //Clone history and re-assign:
- newEntry.History = newEntry.History.CloneDeep();
-
- //Based on KeePass Desktop
- bool bCreateBackup = (!mIsNew);
- if(bCreateBackup) newEntry.CreateBackup(null);
-
- if (mSelectedIcon == false) {
- if (mIsNew) {
- newEntry.IconId = PwIcon.Key;
- } else {
- // Keep previous icon, if no new one was selected
- }
- }
- else {
- newEntry.IconId = mSelectedIconID;
- newEntry.CustomIconUuid = mSelectedCustomIconID;
- }
- /* KPDesktop
- if(m_cbCustomForegroundColor.Checked)
- newEntry.ForegroundColor = m_clrForeground;
- else newEntry.ForegroundColor = Color.Empty;
- if(m_cbCustomBackgroundColor.Checked)
- newEntry.BackgroundColor = m_clrBackground;
- else newEntry.BackgroundColor = Color.Empty;
-
- */
-
-
- newEntry.Strings.Set(PwDefs.TitleField, new ProtectedString(db.pm.MemoryProtection.ProtectTitle,
- Util.getEditText(act, Resource.Id.entry_title)));
- newEntry.Strings.Set(PwDefs.UserNameField, new ProtectedString(db.pm.MemoryProtection.ProtectUserName,
- Util.getEditText(act, Resource.Id.entry_user_name)));
-
- String pass = Util.getEditText(act, Resource.Id.entry_password);
- byte[] password = StrUtil.Utf8.GetBytes(pass);
- newEntry.Strings.Set(PwDefs.PasswordField, new ProtectedString(db.pm.MemoryProtection.ProtectPassword,
- password));
- MemUtil.ZeroByteArray(password);
-
- newEntry.Strings.Set(PwDefs.UrlField, new ProtectedString(db.pm.MemoryProtection.ProtectUrl,
- Util.getEditText(act, Resource.Id.entry_url)));
- newEntry.Strings.Set(PwDefs.NotesField, new ProtectedString(db.pm.MemoryProtection.ProtectNotes,
- Util.getEditText(act, Resource.Id.entry_comment)));
-
- // Delete all non standard strings
- var keys = newEntry.Strings.GetKeys();
- foreach (String key in keys)
- if (PwDefs.IsStandardField(key) == false)
- newEntry.Strings.Remove(key);
-
- LinearLayout container = (LinearLayout) FindViewById(Resource.Id.advanced_container);
-
- for (int index = 0; index < container.ChildCount; index++) {
- View view = container.GetChildAt(index);
-
- TextView keyView = (TextView)view.FindViewById(Resource.Id.title);
- String key = keyView.Text;
-
- TextView valueView = (TextView)view.FindViewById(Resource.Id.value);
- String value = valueView.Text;
-
- CheckBox cb = (CheckBox)view.FindViewById(Resource.Id.protection);
- bool protect = cb.Checked;
-
- newEntry.Strings.Set(key, new ProtectedString(protect, value));
- }
-
- newEntry.Binaries = mEntry.Binaries;
- newEntry.Expires = mEntry.Expires;
- if (newEntry.Expires)
- {
- newEntry.ExpiryTime = mEntry.ExpiryTime;
- }
-
- newEntry.OverrideUrl = Util.getEditText(this,Resource.Id.entry_override_url);
-
- List vNewTags = StrUtil.StringToTags(Util.getEditText(this,Resource.Id.entry_tags));
- newEntry.Tags.Clear();
- foreach(string strTag in vNewTags) newEntry.AddTag(strTag);
-
- /*KPDesktop
-
-
- m_atConfig.Enabled = m_cbAutoTypeEnabled.Checked;
- m_atConfig.ObfuscationOptions = (m_cbAutoTypeObfuscation.Checked ?
- AutoTypeObfuscationOptions.UseClipboard :
- AutoTypeObfuscationOptions.None);
-
- SaveDefaultSeq();
-
- newEntry.AutoType = m_atConfig;
- */
-
-
- newEntry.Touch(true, false); // Touch *after* backup
-
- StrUtil.NormalizeNewLines(newEntry.Strings, true);
-
- bool bUndoBackup = false;
- PwCompareOptions cmpOpt = (PwCompareOptions.NullEmptyEquivStd |
- PwCompareOptions.IgnoreTimes);
- if(bCreateBackup) cmpOpt |= PwCompareOptions.IgnoreLastBackup;
- if(newEntry.EqualsEntry(initialEntry, cmpOpt, MemProtCmpMode.CustomOnly))
- {
- // No modifications at all => restore last mod time and undo backup
- newEntry.LastModificationTime = initialEntry.LastModificationTime;
- bUndoBackup = bCreateBackup;
- }
- else if(bCreateBackup)
- {
- // If only history items have been modified (deleted) => undo
- // backup, but without restoring the last mod time
- PwCompareOptions cmpOptNH = (cmpOpt | PwCompareOptions.IgnoreHistory);
- if(newEntry.EqualsEntry(initialEntry, cmpOptNH, MemProtCmpMode.CustomOnly))
- bUndoBackup = true;
- }
- if(bUndoBackup) newEntry.History.RemoveAt(newEntry.History.UCount - 1);
-
- newEntry.MaintainBackups(db.pm);
-
-
-
- //if ( newEntry.Strings.ReadSafe (PwDefs.TitleField).Equals(mEntry.Strings.ReadSafe (PwDefs.TitleField)) ) {
- // SetResult(KeePass.EXIT_REFRESH);
- //} else {
- //it's safer to always update the title as we might add further information in the title like expiry etc.
- SetResult(KeePass.EXIT_REFRESH_TITLE);
- //}
-
- RunnableOnFinish task;
- OnFinish onFinish = new AfterSave(new Handler(), act);
-
- if ( mIsNew ) {
- task = AddEntry.getInstance(this, App.getDB(), newEntry, parentGroup, onFinish);
- } else {
- task = new UpdateEntry(this, App.getDB(), initialEntry, newEntry, onFinish);
- }
- ProgressTask pt = new ProgressTask(act, task, Resource.String.saving_database);
- pt.run();
};
-
// Respect mask password setting
- if (mShowPassword) {
+ if (State.mShowPassword) {
EditText pass = (EditText) FindViewById(Resource.Id.entry_password);
EditText conf = (EditText) FindViewById(Resource.Id.entry_confpassword);
@@ -370,42 +256,225 @@ namespace keepass2android
addButton.Click += (object sender, EventArgs e) =>
{
LinearLayout container = (LinearLayout) FindViewById(Resource.Id.advanced_container);
-
- EntryEditSection ees = (EntryEditSection) LayoutInflater.Inflate(Resource.Layout.entry_edit_section, null);
- ees.setData("", new ProtectedString(false, ""));
- ees.getDeleteButton().Click += (senderEes, eEes) => deleteAdvancedString((View)senderEes);
+
+ KeyValuePair pair = new KeyValuePair("" , new ProtectedString(true, ""));
+ LinearLayout ees = CreateExtraStringView(pair);
container.AddView(ees);
- mEntryModified = true;
+ State.mEntryModified = true;
- // Scroll bottom
- scroll.Post(() => {
- scroll.FullScroll(FocusSearchDirection.Down);
- });
+ TextView keyView = (TextView) ees.FindViewById(Resource.Id.title);
+ keyView.RequestFocus();
};
((CheckBox)FindViewById(Resource.Id.entry_expires_checkbox)).CheckedChange += (object sender, CompoundButton.CheckedChangeEventArgs e) =>
{
- mEntry.Expires = e.IsChecked;
+ State.mEntry.Expires = e.IsChecked;
if (e.IsChecked)
{
- if (mEntry.ExpiryTime < DateTime.Now)
- mEntry.ExpiryTime = DateTime.Now;
+ if (State.mEntry.ExpiryTime < DateTime.Now)
+ State.mEntry.ExpiryTime = DateTime.Now;
}
updateExpires();
- mEntryModified = true;
+ State.mEntryModified = true;
};
}
+ void SaveEntry(OnFinish onFinish)
+ {
+ Database db = App.getDB();
+ EntryEditActivity act = this;
+
+ if (!validateBeforeSaving())
+ return;
+
+ PwEntry initialEntry = State.mEntryInDatabase.CloneDeep();
+
+ PwEntry newEntry = State.mEntryInDatabase;
+
+ //Clone history and re-assign:
+ newEntry.History = newEntry.History.CloneDeep();
+
+ //Based on KeePass Desktop
+ bool bCreateBackup = (!State.mIsNew);
+ if(bCreateBackup) newEntry.CreateBackup(null);
+
+ if (State.mSelectedIcon == false) {
+ if (State.mIsNew) {
+ newEntry.IconId = PwIcon.Key;
+ } else {
+ // Keep previous icon, if no new one was selected
+ }
+ }
+ else {
+ newEntry.IconId = State.mSelectedIconID;
+ newEntry.CustomIconUuid = State.mSelectedCustomIconID;
+ }
+ /* KPDesktop
+ if(m_cbCustomForegroundColor.Checked)
+ newEntry.ForegroundColor = m_clrForeground;
+ else newEntry.ForegroundColor = Color.Empty;
+ if(m_cbCustomBackgroundColor.Checked)
+ newEntry.BackgroundColor = m_clrBackground;
+ else newEntry.BackgroundColor = Color.Empty;
+
+ */
+
+ UpdateEntryFromUi(newEntry);
+ newEntry.Binaries = State.mEntry.Binaries;
+ newEntry.Expires = State.mEntry.Expires;
+ if (newEntry.Expires)
+ {
+ newEntry.ExpiryTime = State.mEntry.ExpiryTime;
+ }
+
+
+ newEntry.Touch(true, false); // Touch *after* backup
+
+ StrUtil.NormalizeNewLines(newEntry.Strings, true);
+
+ bool bUndoBackup = false;
+ PwCompareOptions cmpOpt = (PwCompareOptions.NullEmptyEquivStd |
+ PwCompareOptions.IgnoreTimes);
+ if(bCreateBackup) cmpOpt |= PwCompareOptions.IgnoreLastBackup;
+ if(newEntry.EqualsEntry(initialEntry, cmpOpt, MemProtCmpMode.CustomOnly))
+ {
+ // No modifications at all => restore last mod time and undo backup
+ newEntry.LastModificationTime = initialEntry.LastModificationTime;
+ bUndoBackup = bCreateBackup;
+ }
+ else if(bCreateBackup)
+ {
+ // If only history items have been modified (deleted) => undo
+ // backup, but without restoring the last mod time
+ PwCompareOptions cmpOptNH = (cmpOpt | PwCompareOptions.IgnoreHistory);
+ if(newEntry.EqualsEntry(initialEntry, cmpOptNH, MemProtCmpMode.CustomOnly))
+ bUndoBackup = true;
+ }
+ if(bUndoBackup) newEntry.History.RemoveAt(newEntry.History.UCount - 1);
+
+ newEntry.MaintainBackups(db.pm);
+
+
+
+ //if ( newEntry.Strings.ReadSafe (PwDefs.TitleField).Equals(State.mEntry.Strings.ReadSafe (PwDefs.TitleField)) ) {
+ // SetResult(KeePass.EXIT_REFRESH);
+ //} else {
+ //it's safer to always update the title as we might add further information in the title like expiry etc.
+ SetResult(KeePass.EXIT_REFRESH_TITLE);
+ //}
+
+ RunnableOnFinish task;
+
+
+ if ( State.mIsNew ) {
+ task = AddEntry.getInstance(this, App.getDB(), newEntry, State.parentGroup, onFinish);
+ } else {
+ task = new UpdateEntry(this, App.getDB(), initialEntry, newEntry, onFinish);
+ }
+ ProgressTask pt = new ProgressTask(act, task, Resource.String.saving_database);
+ pt.run();
+
+
+ }
+
+ void UpdateEntryFromUi(PwEntry entry)
+ {
+ Database db = App.getDB();
+ EntryEditActivity act = this;
+
+ entry.Strings.Set(PwDefs.TitleField, new ProtectedString(db.pm.MemoryProtection.ProtectTitle,
+ Util.getEditText(act, Resource.Id.entry_title)));
+ entry.Strings.Set(PwDefs.UserNameField, new ProtectedString(db.pm.MemoryProtection.ProtectUserName,
+ Util.getEditText(act, Resource.Id.entry_user_name)));
+
+ String pass = Util.getEditText(act, Resource.Id.entry_password);
+ byte[] password = StrUtil.Utf8.GetBytes(pass);
+ entry.Strings.Set(PwDefs.PasswordField, new ProtectedString(db.pm.MemoryProtection.ProtectPassword,
+ password));
+ MemUtil.ZeroByteArray(password);
+
+ entry.Strings.Set(PwDefs.UrlField, new ProtectedString(db.pm.MemoryProtection.ProtectUrl,
+ Util.getEditText(act, Resource.Id.entry_url)));
+ entry.Strings.Set(PwDefs.NotesField, new ProtectedString(db.pm.MemoryProtection.ProtectNotes,
+ Util.getEditText(act, Resource.Id.entry_comment)));
+
+ // Validate expiry date
+ DateTime newExpiry = new DateTime();
+ if ((State.mEntry.Expires) && (!DateTime.TryParse( Util.getEditText(this,Resource.Id.entry_expires), out newExpiry)))
+ {
+ //ignore here
+ }
+ else
+ {
+ State.mEntry.ExpiryTime = newExpiry;
+ }
+
+ // Delete all non standard strings
+ var keys = entry.Strings.GetKeys();
+ foreach (String key in keys)
+ if (PwDefs.IsStandardField(key) == false)
+ entry.Strings.Remove(key);
+
+ LinearLayout container = (LinearLayout) FindViewById(Resource.Id.advanced_container);
+
+ for (int index = 0; index < container.ChildCount; index++) {
+ View view = container.GetChildAt(index);
+
+ TextView keyView = (TextView)view.FindViewById(Resource.Id.title);
+ String key = keyView.Text;
+ Android.Util.Log.Debug("DEBUG","------------- " + index.ToString()+ " " + key);
+
+ if (String.IsNullOrEmpty(key))
+ continue;
+
+ TextView valueView = (TextView)view.FindViewById(Resource.Id.value);
+ String value = valueView.Text;
+
+ CheckBox cb = (CheckBox)view.FindViewById(Resource.Id.protection);
+
+ bool protect = true;
+ ProtectedString initialString = State.mEntryInDatabase.Strings.Get(key);
+ if (initialString != null)
+ protect = initialString.IsProtected;
+ if (cb != null) //Checkbox removed for ICS (for clarity)
+ {
+ protect = cb.Checked;
+ }
+ entry.Strings.Set(key, new ProtectedString(protect, value));
+ }
+
+
+ entry.OverrideUrl = Util.getEditText(this,Resource.Id.entry_override_url);
+
+ List vNewTags = StrUtil.StringToTags(Util.getEditText(this,Resource.Id.entry_tags));
+ entry.Tags.Clear();
+ foreach(string strTag in vNewTags) entry.AddTag(strTag);
+
+ /*KPDesktop
+
+
+ m_atConfig.Enabled = m_cbAutoTypeEnabled.Checked;
+ m_atConfig.ObfuscationOptions = (m_cbAutoTypeObfuscation.Checked ?
+ AutoTypeObfuscationOptions.UseClipboard :
+ AutoTypeObfuscationOptions.None);
+
+ SaveDefaultSeq();
+
+ newEntry.AutoType = m_atConfig;
+ */
+
+ }
+
void addBinaryOrAsk(string filename)
{
string strItem = UrlUtil.GetFileName(filename);
- if(mEntry.Binaries.Get(strItem) != null)
+ if(State.mEntry.Binaries.Get(strItem) != null)
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.SetTitle(GetString(Resource.String.AskOverwriteBinary_title));
@@ -446,7 +515,7 @@ namespace keepass2android
while(true)
{
string strNewName = strFileName + nTry.ToString() + strExtension;
- if(mEntry.Binaries.Get(strNewName) == null)
+ if(State.mEntry.Binaries.Get(strNewName) == null)
{
strItem = strNewName;
break;
@@ -461,20 +530,20 @@ namespace keepass2android
if(vBytes != null)
{
ProtectedBinary pb = new ProtectedBinary(false, vBytes);
- mEntry.Binaries.Set(strItem, pb);
+ State.mEntry.Binaries.Set(strItem, pb);
}
}
catch(Exception exAttach)
{
Toast.MakeText(this, GetString(Resource.String.AttachFailed)+" "+exAttach.Message, ToastLength.Long).Show();
}
- mEntryModified = true;
+ State.mEntryModified = true;
populateBinaries();
}
public override void OnBackPressed()
{
- if (mEntryModified == false)
+ if (State.mEntryModified == false)
{
base.OnBackPressed();
} else
@@ -501,35 +570,50 @@ namespace keepass2android
}
}
+
+ public void reload() {
+ //this reload ìs necessary to overcome a strange problem with the extra string fields which get lost
+ //somehow after re-creating the activity. Maybe a Mono for Android bug?
+ Intent intent = Intent;
+ intent.PutExtra(Intent_ContinueWithEditing, true);
+ OverridePendingTransition(0, 0);
+ intent.AddFlags(ActivityFlags.NoAnimation);
+ mCloseForReload = true;
+ SetResult(KeePass.EXIT_REFRESH_TITLE); //probably the entry will be modified -> let the EditActivity refresh to be safe
+ Finish();
+
+ OverridePendingTransition(0, 0);
+ StartActivity(intent);
+ }
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
switch ((int)resultCode)
{
case RESULT_OK_ICON_PICKER:
- mSelectedIconID = (PwIcon) data.Extras.GetInt(IconPickerActivity.KEY_ICON_ID);
- mSelectedCustomIconID = PwUuid.Zero;
+ State.mSelectedIconID = (PwIcon) data.Extras.GetInt(IconPickerActivity.KEY_ICON_ID);
+ State.mSelectedCustomIconID = PwUuid.Zero;
String customIconIdString = data.Extras.GetString(IconPickerActivity.KEY_CUSTOM_ICON_ID);
if (!String.IsNullOrEmpty(customIconIdString))
- mSelectedCustomIconID = new PwUuid(MemUtil.HexStringToByteArray(customIconIdString));
- mSelectedIcon = true;
- ImageButton currIconButton = (ImageButton) FindViewById(Resource.Id.icon_button);
- //TODO: custom image
- currIconButton.SetImageResource(Icons.iconToResId(mSelectedIconID));
- mEntryModified = true;
+ State.mSelectedCustomIconID = new PwUuid(MemUtil.HexStringToByteArray(customIconIdString));
+ State.mSelectedIcon = true;
+ State.mEntryModified = true;
+ reload();
break;
case RESULT_OK_PASSWORD_GENERATOR:
String generatedPassword = data.GetStringExtra("keepass2android.password.generated_password");
- EditText password = (EditText) FindViewById(Resource.Id.entry_password);
- EditText confPassword = (EditText) FindViewById(Resource.Id.entry_confpassword);
- password.Text = generatedPassword;
- confPassword.Text = generatedPassword;
- mEntryModified = true;
+ byte[] password = StrUtil.Utf8.GetBytes(generatedPassword);
+ State.mEntry.Strings.Set(PwDefs.PasswordField, new ProtectedString(App.getDB().pm.MemoryProtection.ProtectPassword,
+ password));
+ MemUtil.ZeroByteArray(password);
+
+ State.mEntryModified = true;
+ reload();
break;
case (int)Result.Ok:
- if (requestCode == Intents.REQUEST_CODE_FILE_BROWSE)
+ if (requestCode == Intents.REQUEST_CODE_FILE_BROWSE_FOR_BINARY)
{
String filename = data.DataString;
if (filename != null) {
@@ -541,10 +625,12 @@ namespace keepass2android
addBinaryOrAsk(filename);
}
}
+ reload();
break;
case (int)Result.Canceled:
+ reload();
break;
default:
break;
@@ -556,7 +642,7 @@ namespace keepass2android
ViewGroup binariesGroup = (ViewGroup)FindViewById(Resource.Id.binaries);
binariesGroup.RemoveAllViews();
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FillParent, RelativeLayout.LayoutParams.WrapContent);
- foreach (KeyValuePair pair in mEntry.Binaries)
+ foreach (KeyValuePair pair in State.mEntry.Binaries)
{
String key = pair.Key;
Button binaryButton = new Button(this);
@@ -565,9 +651,9 @@ namespace keepass2android
binaryButton.SetCompoundDrawablesWithIntrinsicBounds( Resources.GetDrawable(Android.Resource.Drawable.IcMenuDelete),null, null, null);
binaryButton.Click += (object sender, EventArgs e) =>
{
- mEntryModified = true;
+ State.mEntryModified = true;
Button btnSender = (Button)(sender);
- mEntry.Binaries.Remove(key);
+ State.mEntry.Binaries.Remove(key);
populateBinaries();
};
@@ -581,11 +667,14 @@ namespace keepass2android
addBinaryButton.SetCompoundDrawablesWithIntrinsicBounds( Resources.GetDrawable(Android.Resource.Drawable.IcMenuAdd) , null, null, null);
addBinaryButton.Click += (object sender, EventArgs e) =>
{
- Util.showBrowseDialog("/mnt/sdcard", this);
+ Util.showBrowseDialog("/mnt/sdcard", this, Intents.REQUEST_CODE_FILE_BROWSE_FOR_BINARY);
+
};
binariesGroup.AddView(addBinaryButton,layoutParams);
- FindViewById(Resource.Id.entry_binaries_label).Visibility = mEntry.Binaries.UCount > 0 ? ViewStates.Visible : ViewStates.Gone;
+ var binariesLabel = FindViewById(Resource.Id.entry_binaries_label);
+ if (binariesLabel != null)
+ binariesLabel.Visibility = State.mEntry.Binaries.UCount > 0 ? ViewStates.Visible : ViewStates.Gone;
}
public override bool OnCreateOptionsMenu(IMenu menu) {
base.OnCreateOptionsMenu(menu);
@@ -595,7 +684,7 @@ namespace keepass2android
IMenuItem togglePassword = menu.FindItem(Resource.Id.menu_toggle_pass);
- if ( mShowPassword ) {
+ if ( State.mShowPassword ) {
togglePassword.SetTitle(Resource.String.menu_hide_password);
} else {
togglePassword.SetTitle(Resource.String.show_password);
@@ -616,12 +705,12 @@ namespace keepass2android
return true;*/
case Resource.Id.menu_toggle_pass:
- if ( mShowPassword ) {
+ if ( State.mShowPassword ) {
item.SetTitle(Resource.String.show_password);
- mShowPassword = false;
+ State.mShowPassword = false;
} else {
item.SetTitle(Resource.String.menu_hide_password);
- mShowPassword = true;
+ State.mShowPassword = true;
}
setPasswordStyle();
return true;
@@ -661,7 +750,7 @@ namespace keepass2android
TextView password = (TextView) FindViewById(Resource.Id.entry_password);
TextView confpassword = (TextView) FindViewById(Resource.Id.entry_confpassword);
- if ( mShowPassword ) {
+ if ( State.mShowPassword ) {
password.InputType = InputTypes.ClassText | InputTypes.TextVariationVisiblePassword;
confpassword.InputType = InputTypes.ClassText | InputTypes.TextVariationVisiblePassword;
@@ -673,52 +762,76 @@ namespace keepass2android
void updateExpires()
{
- if (mEntry.Expires)
+ if (State.mEntry.Expires)
{
- populateText(Resource.Id.entry_expires, getDateTime(mEntry.ExpiryTime));
+ populateText(Resource.Id.entry_expires, getDateTime(State.mEntry.ExpiryTime));
}
else
{
populateText(Resource.Id.entry_expires, GetString(Resource.String.never));
}
- ((CheckBox)FindViewById(Resource.Id.entry_expires_checkbox)).Checked = mEntry.Expires;
- ((EditText)FindViewById(Resource.Id.entry_expires)).Enabled = mEntry.Expires;
+ ((CheckBox)FindViewById(Resource.Id.entry_expires_checkbox)).Checked = State.mEntry.Expires;
+ ((EditText)FindViewById(Resource.Id.entry_expires)).Enabled = State.mEntry.Expires;
+ }
+
+ public override Java.Lang.Object OnRetainNonConfigurationInstance()
+ {
+ UpdateEntryFromUi(State.mEntry);
+ return this;
+ }
+
+ LinearLayout CreateExtraStringView(KeyValuePair pair)
+ {
+ LinearLayout ees = (LinearLayout)LayoutInflater.Inflate(Resource.Layout.entry_edit_section, null);
+ ((TextView)ees.FindViewById(Resource.Id.title)).Text = pair.Key;
+ ((TextView)ees.FindViewById(Resource.Id.title)).TextChanged += (sender, e) => State.mEntryModified = true;
+ ((TextView)ees.FindViewById(Resource.Id.value)).Text = pair.Value.ReadString();
+ ((TextView)ees.FindViewById(Resource.Id.value)).TextChanged += (sender, e) => State.mEntryModified = true;
+ ees.FindViewById(Resource.Id.delete).Click += (sender, e) => deleteAdvancedString((View)sender);
+ CheckBox cb = (CheckBox)ees.FindViewById(Resource.Id.protection);
+ if (cb != null)
+ {
+ cb.Checked = pair.Value.IsProtected;
+ cb.CheckedChange += (sender, e) =>
+ {
+ State.mEntryModified = true;
+ };
+ }
+ return ees;
}
private void fillData() {
ImageButton currIconButton = (ImageButton) FindViewById(Resource.Id.icon_button);
- App.getDB().drawFactory.assignDrawableTo(currIconButton, Resources, App.getDB().pm, mEntry.IconId, mEntry.CustomIconUuid);
+ App.getDB().drawFactory.assignDrawableTo(currIconButton, Resources, App.getDB().pm, State.mEntry.IconId, State.mEntry.CustomIconUuid);
- populateText(Resource.Id.entry_title, mEntry.Strings.ReadSafe (PwDefs.TitleField));
- populateText(Resource.Id.entry_user_name, mEntry.Strings.ReadSafe (PwDefs.UserNameField));
- populateText(Resource.Id.entry_url, mEntry.Strings.ReadSafe (PwDefs.UrlField));
+ populateText(Resource.Id.entry_title, State.mEntry.Strings.ReadSafe (PwDefs.TitleField));
+ populateText(Resource.Id.entry_user_name, State.mEntry.Strings.ReadSafe (PwDefs.UserNameField));
+ populateText(Resource.Id.entry_url, State.mEntry.Strings.ReadSafe (PwDefs.UrlField));
- String password = mEntry.Strings.ReadSafe(PwDefs.PasswordField);
+ String password = State.mEntry.Strings.ReadSafe(PwDefs.PasswordField);
populateText(Resource.Id.entry_password, password);
populateText(Resource.Id.entry_confpassword, password);
setPasswordStyle();
- populateText(Resource.Id.entry_comment, mEntry.Strings.ReadSafe (PwDefs.NotesField));
+ populateText(Resource.Id.entry_comment, State.mEntry.Strings.ReadSafe (PwDefs.NotesField));
LinearLayout container = (LinearLayout) FindViewById(Resource.Id.advanced_container);
- foreach (var pair in mEntry.Strings)
+ foreach (var pair in State.mEntry.Strings)
{
String key = pair.Key;
if (!PwDefs.IsStandardField(key)) {
- EntryEditSection ees = (EntryEditSection) LayoutInflater.Inflate(Resource.Layout.entry_edit_section, null);
- ees.setData(key, pair.Value);
- ees.ContentChanged += (sender, e) => {mEntryModified=true;};
- ees.getDeleteButton().Click += (sender, e) => deleteAdvancedString((View)sender);
+ var ees = CreateExtraStringView(pair);
+ Android.Util.Log.Debug("DEBUG", "aiding key " +key);
container.AddView(ees);
}
}
populateBinaries();
- populateText(Resource.Id.entry_override_url, mEntry.OverrideUrl);
- populateText(Resource.Id.entry_tags, StrUtil.TagsToString(mEntry.Tags, true));
+ populateText(Resource.Id.entry_override_url, State.mEntry.OverrideUrl);
+ populateText(Resource.Id.entry_tags, StrUtil.TagsToString(State.mEntry.Tags, true));
updateExpires();
}
@@ -728,11 +841,11 @@ namespace keepass2android
public void deleteAdvancedString(View view) {
- EntryEditSection section = (EntryEditSection) view.Parent;
+ var section = view.Parent;
LinearLayout container = (LinearLayout) FindViewById(Resource.Id.advanced_container);
- mEntryModified = true;
+ State.mEntryModified = true;
for (int i = 0; i < container.ChildCount; i++) {
- EntryEditSection ees = (EntryEditSection) container.GetChildAt(i);
+ var ees = container.GetChildAt(i);
if (ees == section) {
container.RemoveViewAt(i);
container.Invalidate();
@@ -760,20 +873,20 @@ namespace keepass2android
// Validate expiry date
DateTime newExpiry = new DateTime();
- if ((mEntry.Expires) && (!DateTime.TryParse( Util.getEditText(this,Resource.Id.entry_expires), out newExpiry)))
+ if ((State.mEntry.Expires) && (!DateTime.TryParse( Util.getEditText(this,Resource.Id.entry_expires), out newExpiry)))
{
Toast.MakeText(this, Resource.String.error_invalid_expiry_date, ToastLength.Long).Show();
return false;
}
else
{
- mEntry.ExpiryTime = newExpiry;
+ State.mEntry.ExpiryTime = newExpiry;
}
LinearLayout container = (LinearLayout) FindViewById(Resource.Id.advanced_container);
for (int i = 0; i < container.ChildCount; i++) {
- EntryEditSection ees = (EntryEditSection) container.GetChildAt(i);
+ View ees = container.GetChildAt(i);
TextView keyView = (TextView) ees.FindViewById(Resource.Id.title);
string key = keyView.Text;
@@ -792,9 +905,18 @@ namespace keepass2android
private void populateText(int viewId, String text) {
TextView tv = (TextView) FindViewById(viewId);
tv.Text = text;
- tv.TextChanged += (sender, e) => {mEntryModified = true;};
+ tv.TextChanged += (sender, e) => {State.mEntryModified = true;};
}
-
+
+ protected override void OnPause()
+ {
+ if (!mCloseForReload)
+ UpdateEntryFromUi(State.mEntry);
+
+ base.OnPause();
+
+ }
+
private class AfterSave : OnFinish {
Activity act;
public AfterSave(Handler handler, Activity act): base(handler) {
diff --git a/src/keepass2android/EntryEditActivityState.cs b/src/keepass2android/EntryEditActivityState.cs
new file mode 100644
index 00000000..3e151b1e
--- /dev/null
+++ b/src/keepass2android/EntryEditActivityState.cs
@@ -0,0 +1,37 @@
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using KeePassLib;
+
+namespace keepass2android
+{
+ ///
+ /// Holds the state of the EntrryEditActivity. This is required to be able to keep a partially modified entry in memory
+ /// through the App variable. Serializing this state (especially the mEntry/mEntryInDatabase) can be a performance problem
+ /// when there are big attachements.
+ ///
+ internal class EntryEditActivityState
+ {
+ internal PwEntry mEntry, mEntryInDatabase;
+ internal bool mShowPassword = false;
+ internal bool mIsNew;
+ internal PwIcon mSelectedIconID;
+ internal PwUuid mSelectedCustomIconID = PwUuid.Zero;
+ internal bool mSelectedIcon = false;
+
+ internal PwGroup parentGroup;
+
+ internal bool mEntryModified;
+
+ }
+}
+
diff --git a/src/keepass2android/GeneratePasswordActivity.cs b/src/keepass2android/GeneratePasswordActivity.cs
index fb697d26..fa614020 100644
--- a/src/keepass2android/GeneratePasswordActivity.cs
+++ b/src/keepass2android/GeneratePasswordActivity.cs
@@ -67,7 +67,7 @@ namespace keepass2android
- Button acceptButton = (Button) FindViewById(Resource.Id.accept_button);
+ View acceptButton = FindViewById(Resource.Id.accept_button);
acceptButton.Click += (object sender, EventArgs e) => {
EditText password = (EditText) FindViewById(Resource.Id.password);
@@ -80,7 +80,7 @@ namespace keepass2android
};
- Button cancelButton = (Button) FindViewById(Resource.Id.cancel_button);
+ View cancelButton = FindViewById(Resource.Id.cancel_button);
cancelButton.Click += (object sender, EventArgs e) =>
{
SetResult(Result.Canceled);
diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs
index ba222c57..34ada2cb 100644
--- a/src/keepass2android/PasswordActivity.cs
+++ b/src/keepass2android/PasswordActivity.cs
@@ -266,7 +266,7 @@ namespace keepass2android
unloadDatabase();
break;
case Android.App.Result.Ok:
- if (requestCode == Intents.REQUEST_CODE_FILE_BROWSE) {
+ if (requestCode == Intents.REQUEST_CODE_FILE_BROWSE_FOR_KEYFILE) {
String filename = data.DataString;
if (filename != null) {
if (filename.StartsWith("file://")) {
@@ -447,7 +447,7 @@ namespace keepass2android
try
{
- StartActivityForResult(intent, Intents.REQUEST_CODE_FILE_BROWSE);
+ StartActivityForResult(intent, Intents.REQUEST_CODE_FILE_BROWSE_FOR_KEYFILE);
} catch (ActivityNotFoundException)
{
BrowserDialog diag = new BrowserDialog(this);
diff --git a/src/keepass2android/QuickUnlock.cs b/src/keepass2android/QuickUnlock.cs
index 46f45f4e..c37e2d5d 100644
--- a/src/keepass2android/QuickUnlock.cs
+++ b/src/keepass2android/QuickUnlock.cs
@@ -55,7 +55,14 @@ namespace keepass2android
SetContentView(Resource.Layout.QuickUnlock);
- ((TextView)FindViewById(Resource.Id.qu_filename)).Text = mIoc.GetDisplayName();
+ if (App.getDB().pm.Name != "")
+ {
+ FindViewById(Resource.Id.filename_label).Visibility = ViewStates.Invisible;
+ ((TextView)FindViewById(Resource.Id.qu_filename)).Text = App.getDB().pm.Name;
+ } else
+ {
+ ((TextView)FindViewById(Resource.Id.qu_filename)).Text = mIoc.Path;
+ }
TextView txtLabel = (TextView)FindViewById(Resource.Id.QuickUnlock_label);
diff --git a/src/keepass2android/Resources/Resource.designer.cs b/src/keepass2android/Resources/Resource.designer.cs
index 4215fa13..f29703f9 100644
--- a/src/keepass2android/Resources/Resource.designer.cs
+++ b/src/keepass2android/Resources/Resource.designer.cs
@@ -87,6 +87,9 @@ namespace keepass2android
// aapt resource value: 0x7f060000
public const int blue_highlight = 2131099648;
+ // aapt resource value: 0x7f060009
+ public const int dark_gray = 2131099657;
+
// aapt resource value: 0x7f060005
public const int emphasis = 2131099653;
@@ -105,6 +108,9 @@ namespace keepass2android
// aapt resource value: 0x7f060003
public const int icon_text = 2131099651;
+ // aapt resource value: 0x7f060008
+ public const int light_gray = 2131099656;
+
private Color()
{
}
@@ -123,274 +129,295 @@ namespace keepass2android
public const int btn_new_group_dark = 2130837506;
// aapt resource value: 0x7f020003
- public const int device_access_new_account = 2130837507;
+ public const int collections_collection = 2130837507;
// aapt resource value: 0x7f020004
- public const int device_access_new_account_dark = 2130837508;
+ public const int collections_new_label = 2130837508;
// aapt resource value: 0x7f020005
- public const int EntryFieldHeaderBackground = 2130837509;
+ public const int device_access_new_account = 2130837509;
// aapt resource value: 0x7f020006
- public const int extra_string_header = 2130837510;
+ public const int device_access_new_account_dark = 2130837510;
// aapt resource value: 0x7f020007
- public const int GreenButton = 2130837511;
+ public const int device_access_not_secure = 2130837511;
// aapt resource value: 0x7f020008
- public const int HeaderButtonBackground = 2130837512;
+ public const int EntryFieldHeaderBackground = 2130837512;
// aapt resource value: 0x7f020009
- public const int ic00 = 2130837513;
+ public const int extra_string_header = 2130837513;
// aapt resource value: 0x7f02000a
- public const int ic01 = 2130837514;
+ public const int GreenButton = 2130837514;
// aapt resource value: 0x7f02000b
- public const int ic02 = 2130837515;
+ public const int HeaderButtonBackground = 2130837515;
// aapt resource value: 0x7f02000c
- public const int ic03 = 2130837516;
+ public const int ic00 = 2130837516;
// aapt resource value: 0x7f02000d
- public const int ic04 = 2130837517;
+ public const int ic01 = 2130837517;
// aapt resource value: 0x7f02000e
- public const int ic05 = 2130837518;
+ public const int ic02 = 2130837518;
// aapt resource value: 0x7f02000f
- public const int ic06 = 2130837519;
+ public const int ic03 = 2130837519;
// aapt resource value: 0x7f020010
- public const int ic07 = 2130837520;
+ public const int ic04 = 2130837520;
// aapt resource value: 0x7f020011
- public const int ic08 = 2130837521;
+ public const int ic05 = 2130837521;
// aapt resource value: 0x7f020012
- public const int ic09 = 2130837522;
+ public const int ic06 = 2130837522;
// aapt resource value: 0x7f020013
- public const int ic10 = 2130837523;
+ public const int ic07 = 2130837523;
// aapt resource value: 0x7f020014
- public const int ic11 = 2130837524;
+ public const int ic08 = 2130837524;
// aapt resource value: 0x7f020015
- public const int ic12 = 2130837525;
+ public const int ic09 = 2130837525;
// aapt resource value: 0x7f020016
- public const int ic13 = 2130837526;
+ public const int ic10 = 2130837526;
// aapt resource value: 0x7f020017
- public const int ic14 = 2130837527;
+ public const int ic11 = 2130837527;
// aapt resource value: 0x7f020018
- public const int ic15 = 2130837528;
+ public const int ic12 = 2130837528;
// aapt resource value: 0x7f020019
- public const int ic16 = 2130837529;
+ public const int ic13 = 2130837529;
// aapt resource value: 0x7f02001a
- public const int ic17 = 2130837530;
+ public const int ic14 = 2130837530;
// aapt resource value: 0x7f02001b
- public const int ic18 = 2130837531;
+ public const int ic15 = 2130837531;
// aapt resource value: 0x7f02001c
- public const int ic19 = 2130837532;
+ public const int ic16 = 2130837532;
// aapt resource value: 0x7f02001d
- public const int ic20 = 2130837533;
+ public const int ic17 = 2130837533;
// aapt resource value: 0x7f02001e
- public const int ic21 = 2130837534;
+ public const int ic18 = 2130837534;
// aapt resource value: 0x7f02001f
- public const int ic22 = 2130837535;
+ public const int ic19 = 2130837535;
// aapt resource value: 0x7f020020
- public const int ic23 = 2130837536;
+ public const int ic20 = 2130837536;
// aapt resource value: 0x7f020021
- public const int ic24 = 2130837537;
+ public const int ic21 = 2130837537;
// aapt resource value: 0x7f020022
- public const int ic25 = 2130837538;
+ public const int ic22 = 2130837538;
// aapt resource value: 0x7f020023
- public const int ic26 = 2130837539;
+ public const int ic23 = 2130837539;
// aapt resource value: 0x7f020024
- public const int ic27 = 2130837540;
+ public const int ic24 = 2130837540;
// aapt resource value: 0x7f020025
- public const int ic28 = 2130837541;
+ public const int ic25 = 2130837541;
// aapt resource value: 0x7f020026
- public const int ic29 = 2130837542;
+ public const int ic26 = 2130837542;
// aapt resource value: 0x7f020027
- public const int ic30 = 2130837543;
+ public const int ic27 = 2130837543;
// aapt resource value: 0x7f020028
- public const int ic31 = 2130837544;
+ public const int ic28 = 2130837544;
// aapt resource value: 0x7f020029
- public const int ic32 = 2130837545;
+ public const int ic29 = 2130837545;
// aapt resource value: 0x7f02002a
- public const int ic33 = 2130837546;
+ public const int ic30 = 2130837546;
// aapt resource value: 0x7f02002b
- public const int ic34 = 2130837547;
+ public const int ic31 = 2130837547;
// aapt resource value: 0x7f02002c
- public const int ic35 = 2130837548;
+ public const int ic32 = 2130837548;
// aapt resource value: 0x7f02002d
- public const int ic36 = 2130837549;
+ public const int ic33 = 2130837549;
// aapt resource value: 0x7f02002e
- public const int ic37 = 2130837550;
+ public const int ic34 = 2130837550;
// aapt resource value: 0x7f02002f
- public const int ic38 = 2130837551;
+ public const int ic35 = 2130837551;
// aapt resource value: 0x7f020030
- public const int ic39 = 2130837552;
+ public const int ic36 = 2130837552;
// aapt resource value: 0x7f020031
- public const int ic40 = 2130837553;
+ public const int ic37 = 2130837553;
// aapt resource value: 0x7f020032
- public const int ic41 = 2130837554;
+ public const int ic38 = 2130837554;
// aapt resource value: 0x7f020033
- public const int ic42 = 2130837555;
+ public const int ic39 = 2130837555;
// aapt resource value: 0x7f020034
- public const int ic43 = 2130837556;
+ public const int ic40 = 2130837556;
// aapt resource value: 0x7f020035
- public const int ic44 = 2130837557;
+ public const int ic41 = 2130837557;
// aapt resource value: 0x7f020036
- public const int ic45 = 2130837558;
+ public const int ic42 = 2130837558;
// aapt resource value: 0x7f020037
- public const int ic46 = 2130837559;
+ public const int ic43 = 2130837559;
// aapt resource value: 0x7f020038
- public const int ic47 = 2130837560;
+ public const int ic44 = 2130837560;
// aapt resource value: 0x7f020039
- public const int ic48 = 2130837561;
+ public const int ic45 = 2130837561;
// aapt resource value: 0x7f02003a
- public const int ic49 = 2130837562;
+ public const int ic46 = 2130837562;
// aapt resource value: 0x7f02003b
- public const int ic50 = 2130837563;
+ public const int ic47 = 2130837563;
// aapt resource value: 0x7f02003c
- public const int ic51 = 2130837564;
+ public const int ic48 = 2130837564;
// aapt resource value: 0x7f02003d
- public const int ic52 = 2130837565;
+ public const int ic49 = 2130837565;
// aapt resource value: 0x7f02003e
- public const int ic53 = 2130837566;
+ public const int ic50 = 2130837566;
// aapt resource value: 0x7f02003f
- public const int ic54 = 2130837567;
+ public const int ic51 = 2130837567;
// aapt resource value: 0x7f020040
- public const int ic55 = 2130837568;
+ public const int ic52 = 2130837568;
// aapt resource value: 0x7f020041
- public const int ic56 = 2130837569;
+ public const int ic53 = 2130837569;
// aapt resource value: 0x7f020042
- public const int ic57 = 2130837570;
+ public const int ic54 = 2130837570;
// aapt resource value: 0x7f020043
- public const int ic58 = 2130837571;
+ public const int ic55 = 2130837571;
// aapt resource value: 0x7f020044
- public const int ic59 = 2130837572;
+ public const int ic56 = 2130837572;
// aapt resource value: 0x7f020045
- public const int ic60 = 2130837573;
+ public const int ic57 = 2130837573;
// aapt resource value: 0x7f020046
- public const int ic61 = 2130837574;
+ public const int ic58 = 2130837574;
// aapt resource value: 0x7f020047
- public const int ic62 = 2130837575;
+ public const int ic59 = 2130837575;
// aapt resource value: 0x7f020048
- public const int ic63 = 2130837576;
+ public const int ic60 = 2130837576;
// aapt resource value: 0x7f020049
- public const int ic64 = 2130837577;
+ public const int ic61 = 2130837577;
// aapt resource value: 0x7f02004a
- public const int ic65 = 2130837578;
+ public const int ic62 = 2130837578;
// aapt resource value: 0x7f02004b
- public const int ic66 = 2130837579;
+ public const int ic63 = 2130837579;
// aapt resource value: 0x7f02004c
- public const int ic67 = 2130837580;
+ public const int ic64 = 2130837580;
// aapt resource value: 0x7f02004d
- public const int ic68 = 2130837581;
+ public const int ic65 = 2130837581;
// aapt resource value: 0x7f02004e
- public const int ic99_blank = 2130837582;
+ public const int ic66 = 2130837582;
// aapt resource value: 0x7f02004f
- public const int ic_action_eye_open = 2130837583;
+ public const int ic67 = 2130837583;
// aapt resource value: 0x7f020050
- public const int ic_action_search = 2130837584;
+ public const int ic68 = 2130837584;
// aapt resource value: 0x7f020051
- public const int ic_launcher = 2130837585;
+ public const int ic99_blank = 2130837585;
// aapt resource value: 0x7f020052
- public const int ic_launcher_folder_small = 2130837586;
+ public const int ic_action_eye_open = 2130837586;
// aapt resource value: 0x7f020053
- public const int ic_launcher_gray = 2130837587;
+ public const int ic_action_search = 2130837587;
// aapt resource value: 0x7f020054
- public const int ic_menu_view = 2130837588;
+ public const int ic_launcher = 2130837588;
// aapt resource value: 0x7f020055
- public const int navigation_accept = 2130837589;
+ public const int ic_launcher_folder_small = 2130837589;
// aapt resource value: 0x7f020056
- public const int navigation_accept_dark = 2130837590;
+ public const int ic_launcher_gray = 2130837590;
// aapt resource value: 0x7f020057
- public const int navigation_previous_item = 2130837591;
+ public const int ic_menu_add_field_holo_light = 2130837591;
// aapt resource value: 0x7f020058
- public const int navigation_previous_item_dark = 2130837592;
+ public const int ic_menu_remove_field_holo_light = 2130837592;
// aapt resource value: 0x7f020059
- public const int notify = 2130837593;
+ public const int ic_menu_view = 2130837593;
// aapt resource value: 0x7f02005a
- public const int RedButton = 2130837594;
+ public const int location_web_site = 2130837594;
// aapt resource value: 0x7f02005b
- public const int section_header = 2130837595;
+ public const int navigation_accept = 2130837595;
// aapt resource value: 0x7f02005c
- public const int YellowButton = 2130837596;
+ public const int navigation_accept_dark = 2130837596;
+
+ // aapt resource value: 0x7f02005d
+ public const int navigation_cancel = 2130837597;
+
+ // aapt resource value: 0x7f02005e
+ public const int navigation_previous_item = 2130837598;
+
+ // aapt resource value: 0x7f02005f
+ public const int navigation_previous_item_dark = 2130837599;
+
+ // aapt resource value: 0x7f020060
+ public const int notify = 2130837600;
+
+ // aapt resource value: 0x7f020061
+ public const int RedButton = 2130837601;
+
+ // aapt resource value: 0x7f020062
+ public const int section_header = 2130837602;
+
+ // aapt resource value: 0x7f020063
+ public const int YellowButton = 2130837603;
private Drawable()
{
@@ -406,17 +433,17 @@ namespace keepass2android
// aapt resource value: 0x7f0b0071
public const int IconGridView = 2131427441;
+ // aapt resource value: 0x7f0b0080
+ public const int QuickUnlock_button = 2131427456;
+
+ // aapt resource value: 0x7f0b0081
+ public const int QuickUnlock_buttonLock = 2131427457;
+
// aapt resource value: 0x7f0b007e
- public const int QuickUnlock_button = 2131427454;
+ public const int QuickUnlock_label = 2131427454;
// aapt resource value: 0x7f0b007f
- public const int QuickUnlock_buttonLock = 2131427455;
-
- // aapt resource value: 0x7f0b007c
- public const int QuickUnlock_label = 2131427452;
-
- // aapt resource value: 0x7f0b007d
- public const int QuickUnlock_password = 2131427453;
+ public const int QuickUnlock_password = 2131427455;
// aapt resource value: 0x7f0b0055
public const int RelativeLayout = 2131427413;
@@ -451,11 +478,11 @@ namespace keepass2android
// aapt resource value: 0x7f0b0036
public const int bottom_bar = 2131427382;
- // aapt resource value: 0x7f0b0051
- public const int bottom_layout = 2131427409;
+ // aapt resource value: 0x7f0b0050
+ public const int bottom_layout = 2131427408;
- // aapt resource value: 0x7f0b0049
- public const int browse_button = 2131427401;
+ // aapt resource value: 0x7f0b004b
+ public const int browse_button = 2131427403;
// aapt resource value: 0x7f0b005a
public const int btn_length12 = 2131427418;
@@ -475,38 +502,38 @@ namespace keepass2android
// aapt resource value: 0x7f0b0053
public const int cancel_button = 2131427411;
- // aapt resource value: 0x7f0b008f
- public const int cbCaseSensitive = 2131427471;
+ // aapt resource value: 0x7f0b0091
+ public const int cbCaseSensitive = 2131427473;
- // aapt resource value: 0x7f0b0090
- public const int cbExcludeExpiredEntries = 2131427472;
-
- // aapt resource value: 0x7f0b0085
- public const int cbRegEx = 2131427461;
-
- // aapt resource value: 0x7f0b008e
- public const int cbSearchInGroupName = 2131427470;
-
- // aapt resource value: 0x7f0b008b
- public const int cbSearchInNotes = 2131427467;
-
- // aapt resource value: 0x7f0b008c
- public const int cbSearchInOtherStrings = 2131427468;
-
- // aapt resource value: 0x7f0b008a
- public const int cbSearchInPassword = 2131427466;
-
- // aapt resource value: 0x7f0b008d
- public const int cbSearchInTags = 2131427469;
+ // aapt resource value: 0x7f0b0092
+ public const int cbExcludeExpiredEntries = 2131427474;
// aapt resource value: 0x7f0b0087
- public const int cbSearchInTitle = 2131427463;
+ public const int cbRegEx = 2131427463;
- // aapt resource value: 0x7f0b0088
- public const int cbSearchInUrl = 2131427464;
+ // aapt resource value: 0x7f0b0090
+ public const int cbSearchInGroupName = 2131427472;
+
+ // aapt resource value: 0x7f0b008d
+ public const int cbSearchInNotes = 2131427469;
+
+ // aapt resource value: 0x7f0b008e
+ public const int cbSearchInOtherStrings = 2131427470;
+
+ // aapt resource value: 0x7f0b008c
+ public const int cbSearchInPassword = 2131427468;
+
+ // aapt resource value: 0x7f0b008f
+ public const int cbSearchInTags = 2131427471;
// aapt resource value: 0x7f0b0089
- public const int cbSearchInUsername = 2131427465;
+ public const int cbSearchInTitle = 2131427465;
+
+ // aapt resource value: 0x7f0b008a
+ public const int cbSearchInUrl = 2131427466;
+
+ // aapt resource value: 0x7f0b008b
+ public const int cbSearchInUsername = 2131427467;
// aapt resource value: 0x7f0b0065
public const int cb_brackets = 2131427429;
@@ -532,17 +559,17 @@ namespace keepass2android
// aapt resource value: 0x7f0b005e
public const int cb_uppercase = 2131427422;
- // aapt resource value: 0x7f0b004c
- public const int create = 2131427404;
+ // aapt resource value: 0x7f0b004e
+ public const int create = 2131427406;
- // aapt resource value: 0x7f0b0095
- public const int cred_password = 2131427477;
+ // aapt resource value: 0x7f0b0097
+ public const int cred_password = 2131427479;
+
+ // aapt resource value: 0x7f0b0098
+ public const int cred_remember_mode = 2131427480;
// aapt resource value: 0x7f0b0096
- public const int cred_remember_mode = 2131427478;
-
- // aapt resource value: 0x7f0b0094
- public const int cred_username = 2131427476;
+ public const int cred_username = 2131427478;
// aapt resource value: 0x7f0b0079
public const int default_database = 2131427449;
@@ -688,14 +715,14 @@ namespace keepass2android
// aapt resource value: 0x7f0b0044
public const int file_listtop = 2131427396;
- // aapt resource value: 0x7f0b0045
- public const int file_select = 2131427397;
+ // aapt resource value: 0x7f0b0051
+ public const int file_select = 2131427409;
// aapt resource value: 0x7f0b0074
public const int filename = 2131427444;
- // aapt resource value: 0x7f0b0046
- public const int filename_form = 2131427398;
+ // aapt resource value: 0x7f0b0049
+ public const int filename_form = 2131427401;
// aapt resource value: 0x7f0b0072
public const int filename_label = 2131427442;
@@ -703,8 +730,8 @@ namespace keepass2android
// aapt resource value: 0x7f0b0073
public const int filenamescroll = 2131427443;
- // aapt resource value: 0x7f0b004d
- public const int fnv_cancel = 2131427405;
+ // aapt resource value: 0x7f0b004f
+ public const int fnv_cancel = 2131427407;
// aapt resource value: 0x7f0b001c
public const int generate_button = 2131427356;
@@ -748,14 +775,17 @@ namespace keepass2android
// aapt resource value: 0x7f0b000d
public const int install_web = 2131427341;
- // aapt resource value: 0x7f0b0048
- public const int label_open_by_filename = 2131427400;
+ // aapt resource value: 0x7f0b007c
+ public const int keyfileLine = 2131427452;
// aapt resource value: 0x7f0b004a
- public const int label_open_by_filename_details = 2131427402;
+ public const int label_open_by_filename = 2131427402;
- // aapt resource value: 0x7f0b0047
- public const int label_warning = 2131427399;
+ // aapt resource value: 0x7f0b004c
+ public const int label_open_by_filename_details = 2131427404;
+
+ // aapt resource value: 0x7f0b0045
+ public const int label_warning = 2131427397;
// aapt resource value: 0x7f0b005d
public const int length = 2131427421;
@@ -763,53 +793,53 @@ namespace keepass2android
// aapt resource value: 0x7f0b0058
public const int length_label = 2131427416;
- // aapt resource value: 0x7f0b0084
- public const int linearLayout1 = 2131427460;
-
- // aapt resource value: 0x7f0b009f
- public const int menu_about = 2131427487;
-
- // aapt resource value: 0x7f0b009e
- public const int menu_app_settings = 2131427486;
-
- // aapt resource value: 0x7f0b009d
- public const int menu_cancel_edit = 2131427485;
+ // aapt resource value: 0x7f0b0086
+ public const int linearLayout1 = 2131427462;
// aapt resource value: 0x7f0b00a1
- public const int menu_change_master_key = 2131427489;
-
- // aapt resource value: 0x7f0b0098
- public const int menu_goto_url = 2131427480;
-
- // aapt resource value: 0x7f0b0099
- public const int menu_lock = 2131427481;
-
- // aapt resource value: 0x7f0b009b
- public const int menu_rate = 2131427483;
+ public const int menu_about = 2131427489;
// aapt resource value: 0x7f0b00a0
- public const int menu_search = 2131427488;
+ public const int menu_app_settings = 2131427488;
- // aapt resource value: 0x7f0b00a2
- public const int menu_sort = 2131427490;
+ // aapt resource value: 0x7f0b009f
+ public const int menu_cancel_edit = 2131427487;
+
+ // aapt resource value: 0x7f0b00a3
+ public const int menu_change_master_key = 2131427491;
// aapt resource value: 0x7f0b009a
- public const int menu_suggest_improvements = 2131427482;
+ public const int menu_goto_url = 2131427482;
- // aapt resource value: 0x7f0b0097
- public const int menu_toggle_pass = 2131427479;
+ // aapt resource value: 0x7f0b009b
+ public const int menu_lock = 2131427483;
+
+ // aapt resource value: 0x7f0b009d
+ public const int menu_rate = 2131427485;
+
+ // aapt resource value: 0x7f0b00a2
+ public const int menu_search = 2131427490;
+
+ // aapt resource value: 0x7f0b00a4
+ public const int menu_sort = 2131427492;
// aapt resource value: 0x7f0b009c
- public const int menu_translate = 2131427484;
+ public const int menu_suggest_improvements = 2131427484;
+
+ // aapt resource value: 0x7f0b0099
+ public const int menu_toggle_pass = 2131427481;
+
+ // aapt resource value: 0x7f0b009e
+ public const int menu_translate = 2131427486;
// aapt resource value: 0x7f0b0069
public const int ok = 2131427433;
- // aapt resource value: 0x7f0b004b
- public const int open = 2131427403;
+ // aapt resource value: 0x7f0b004d
+ public const int open = 2131427405;
- // aapt resource value: 0x7f0b0092
- public const int pass_conf_password = 2131427474;
+ // aapt resource value: 0x7f0b0094
+ public const int pass_conf_password = 2131427476;
// aapt resource value: 0x7f0b0077
public const int pass_keyfile = 2131427447;
@@ -817,20 +847,23 @@ namespace keepass2android
// aapt resource value: 0x7f0b0078
public const int pass_ok = 2131427448;
- // aapt resource value: 0x7f0b0091
- public const int pass_password = 2131427473;
+ // aapt resource value: 0x7f0b0093
+ public const int pass_password = 2131427475;
// aapt resource value: 0x7f0b0056
public const int password = 2131427414;
+ // aapt resource value: 0x7f0b007b
+ public const int passwordLine = 2131427451;
+
// aapt resource value: 0x7f0b0075
public const int password_label = 2131427445;
// aapt resource value: 0x7f0b002f
public const int protection = 2131427375;
- // aapt resource value: 0x7f0b007b
- public const int qu_filename = 2131427451;
+ // aapt resource value: 0x7f0b007d
+ public const int qu_filename = 2131427453;
// aapt resource value: 0x7f0b000f
public const int rounds = 2131427343;
@@ -838,32 +871,32 @@ namespace keepass2android
// aapt resource value: 0x7f0b0010
public const int rounds_explaination = 2131427344;
+ // aapt resource value: 0x7f0b0085
+ public const int scrollView1 = 2131427461;
+
+ // aapt resource value: 0x7f0b0084
+ public const int searchEditText = 2131427460;
+
// aapt resource value: 0x7f0b0083
- public const int scrollView1 = 2131427459;
+ public const int search_button = 2131427459;
+
+ // aapt resource value: 0x7f0b0088
+ public const int search_in_label = 2131427464;
// aapt resource value: 0x7f0b0082
- public const int searchEditText = 2131427458;
+ public const int search_label = 2131427458;
- // aapt resource value: 0x7f0b0081
- public const int search_button = 2131427457;
+ // aapt resource value: 0x7f0b0048
+ public const int start_create = 2131427400;
- // aapt resource value: 0x7f0b0086
- public const int search_in_label = 2131427462;
+ // aapt resource value: 0x7f0b0095
+ public const int start_create_import = 2131427477;
- // aapt resource value: 0x7f0b0080
- public const int search_label = 2131427456;
+ // aapt resource value: 0x7f0b0046
+ public const int start_open_file = 2131427398;
- // aapt resource value: 0x7f0b0050
- public const int start_create = 2131427408;
-
- // aapt resource value: 0x7f0b0093
- public const int start_create_import = 2131427475;
-
- // aapt resource value: 0x7f0b004e
- public const int start_open_file = 2131427406;
-
- // aapt resource value: 0x7f0b004f
- public const int start_open_url = 2131427407;
+ // aapt resource value: 0x7f0b0047
+ public const int start_open_url = 2131427399;
// aapt resource value: 0x7f0b000b
public const int text = 2131427339;
@@ -913,73 +946,91 @@ namespace keepass2android
public const int entry_edit_section = 2130903044;
// aapt resource value: 0x7f030005
- public const int entry_list_entry = 2130903045;
+ public const int entry_extrastring_title = 2130903045;
// aapt resource value: 0x7f030006
- public const int entry_section = 2130903046;
+ public const int entry_extrastring_value = 2130903046;
// aapt resource value: 0x7f030007
- public const int entry_view = 2130903047;
+ public const int entry_list_entry = 2130903047;
// aapt resource value: 0x7f030008
- public const int entry_view_contents = 2130903048;
+ public const int entry_section = 2130903048;
// aapt resource value: 0x7f030009
- public const int file_row = 2130903049;
+ public const int entry_view = 2130903049;
// aapt resource value: 0x7f03000a
- public const int file_selection = 2130903050;
+ public const int entry_view_contents = 2130903050;
// aapt resource value: 0x7f03000b
- public const int file_selection_filename = 2130903051;
+ public const int entry_view_test = 2130903051;
// aapt resource value: 0x7f03000c
- public const int file_selection_no_recent = 2130903052;
+ public const int file_row = 2130903052;
// aapt resource value: 0x7f03000d
- public const int generate_password = 2130903053;
+ public const int file_selection = 2130903053;
// aapt resource value: 0x7f03000e
- public const int group_add_entry = 2130903054;
+ public const int file_selection_buttons = 2130903054;
// aapt resource value: 0x7f03000f
- public const int group_edit = 2130903055;
+ public const int file_selection_filename = 2130903055;
// aapt resource value: 0x7f030010
- public const int group_empty = 2130903056;
+ public const int file_selection_no_recent = 2130903056;
// aapt resource value: 0x7f030011
- public const int group_header = 2130903057;
+ public const int generate_password = 2130903057;
// aapt resource value: 0x7f030012
- public const int group_list_entry = 2130903058;
+ public const int group_add_entry = 2130903058;
// aapt resource value: 0x7f030013
- public const int icon = 2130903059;
+ public const int group_edit = 2130903059;
// aapt resource value: 0x7f030014
- public const int icon_picker = 2130903060;
+ public const int group_empty = 2130903060;
// aapt resource value: 0x7f030015
- public const int password = 2130903061;
+ public const int group_header = 2130903061;
// aapt resource value: 0x7f030016
- public const int QuickUnlock = 2130903062;
+ public const int group_list_entry = 2130903062;
// aapt resource value: 0x7f030017
- public const int SaveButton = 2130903063;
+ public const int icon = 2130903063;
// aapt resource value: 0x7f030018
- public const int search = 2130903064;
+ public const int icon_picker = 2130903064;
// aapt resource value: 0x7f030019
- public const int set_password = 2130903065;
+ public const int InViewButton = 2130903065;
// aapt resource value: 0x7f03001a
- public const int StartScreenButtons = 2130903066;
+ public const int password = 2130903066;
// aapt resource value: 0x7f03001b
- public const int url_credentials = 2130903067;
+ public const int QuickUnlock = 2130903067;
+
+ // aapt resource value: 0x7f03001c
+ public const int QuickUnlock_Unused = 2130903068;
+
+ // aapt resource value: 0x7f03001d
+ public const int SaveButton = 2130903069;
+
+ // aapt resource value: 0x7f03001e
+ public const int search = 2130903070;
+
+ // aapt resource value: 0x7f03001f
+ public const int set_password = 2130903071;
+
+ // aapt resource value: 0x7f030020
+ public const int StartScreenButtons = 2130903072;
+
+ // aapt resource value: 0x7f030021
+ public const int url_credentials = 2130903073;
private Layout()
{
@@ -1012,182 +1063,182 @@ namespace keepass2android
public partial class String
{
- // aapt resource value: 0x7f050025
- public const int AboutText = 2131034149;
-
- // aapt resource value: 0x7f0500f3
- public const int AskDeletePermanentlyEntry = 2131034355;
-
- // aapt resource value: 0x7f0500f4
- public const int AskDeletePermanentlyGroup = 2131034356;
+ // aapt resource value: 0x7f050026
+ public const int AboutText = 2131034150;
// aapt resource value: 0x7f0500f5
- public const int AskDeletePermanently_title = 2131034357;
-
- // aapt resource value: 0x7f0500f8
- public const int AskDiscardChanges = 2131034360;
-
- // aapt resource value: 0x7f0500f9
- public const int AskDiscardChanges_title = 2131034361;
-
- // aapt resource value: 0x7f0500ed
- public const int AskOverwriteBinary = 2131034349;
-
- // aapt resource value: 0x7f0500f0
- public const int AskOverwriteBinary_no = 2131034352;
-
- // aapt resource value: 0x7f0500ee
- public const int AskOverwriteBinary_title = 2131034350;
-
- // aapt resource value: 0x7f0500ef
- public const int AskOverwriteBinary_yes = 2131034351;
-
- // aapt resource value: 0x7f0500f7
- public const int AskReloadFile = 2131034359;
+ public const int AskDeletePermanentlyEntry = 2131034357;
// aapt resource value: 0x7f0500f6
- public const int AskReloadFile_title = 2131034358;
+ public const int AskDeletePermanentlyGroup = 2131034358;
- // aapt resource value: 0x7f0500f1
- public const int AttachFailed = 2131034353;
+ // aapt resource value: 0x7f0500f7
+ public const int AskDeletePermanently_title = 2131034359;
- // aapt resource value: 0x7f050017
- public const int BinaryDirectory_default = 2131034135;
+ // aapt resource value: 0x7f0500fa
+ public const int AskDiscardChanges = 2131034362;
- // aapt resource value: 0x7f050016
- public const int BinaryDirectory_key = 2131034134;
+ // aapt resource value: 0x7f0500fb
+ public const int AskDiscardChanges_title = 2131034363;
- // aapt resource value: 0x7f0500df
- public const int BinaryDirectory_summary = 2131034335;
-
- // aapt resource value: 0x7f0500de
- public const int BinaryDirectory_title = 2131034334;
-
- // aapt resource value: 0x7f0500fe
- public const int ChangeLog = 2131034366;
-
- // aapt resource value: 0x7f0500fd
- public const int ChangeLog_title = 2131034365;
-
- // aapt resource value: 0x7f050039
- public const int ClearClipboard = 2131034169;
-
- // aapt resource value: 0x7f050026
- public const int CreditsText = 2131034150;
-
- // aapt resource value: 0x7f05006f
- public const int FileNotFound = 2131034223;
-
- // aapt resource value: 0x7f050082
- public const int InvalidPassword = 2131034242;
-
- // aapt resource value: 0x7f05001c
- public const int LastInfoVersionCode_key = 2131034140;
-
- // aapt resource value: 0x7f05001e
- public const int MarketURL = 2131034142;
-
- // aapt resource value: 0x7f05008c
- public const int MaskedPassword = 2131034252;
-
- // aapt resource value: 0x7f050018
- public const int QuickUnlockDefaultEnabled_key = 2131034136;
-
- // aapt resource value: 0x7f0500da
- public const int QuickUnlockDefaultEnabled_summary = 2131034330;
-
- // aapt resource value: 0x7f0500d9
- public const int QuickUnlockDefaultEnabled_title = 2131034329;
-
- // aapt resource value: 0x7f05001a
- public const int QuickUnlockLength_default = 2131034138;
-
- // aapt resource value: 0x7f050019
- public const int QuickUnlockLength_key = 2131034137;
-
- // aapt resource value: 0x7f0500dc
- public const int QuickUnlockLength_summary = 2131034332;
-
- // aapt resource value: 0x7f0500db
- public const int QuickUnlockLength_title = 2131034331;
-
- // aapt resource value: 0x7f0500d7
- public const int QuickUnlock_button = 2131034327;
-
- // aapt resource value: 0x7f0500dd
- public const int QuickUnlock_fail = 2131034333;
-
- // aapt resource value: 0x7f0500d6
- public const int QuickUnlock_label = 2131034326;
-
- // aapt resource value: 0x7f0500d8
- public const int QuickUnlock_lockButton = 2131034328;
+ // aapt resource value: 0x7f0500ef
+ public const int AskOverwriteBinary = 2131034351;
// aapt resource value: 0x7f0500f2
- public const int RecycleBin = 2131034354;
+ public const int AskOverwriteBinary_no = 2131034354;
+
+ // aapt resource value: 0x7f0500f0
+ public const int AskOverwriteBinary_title = 2131034352;
+
+ // aapt resource value: 0x7f0500f1
+ public const int AskOverwriteBinary_yes = 2131034353;
+
+ // aapt resource value: 0x7f0500f9
+ public const int AskReloadFile = 2131034361;
+
+ // aapt resource value: 0x7f0500f8
+ public const int AskReloadFile_title = 2131034360;
+
+ // aapt resource value: 0x7f0500f3
+ public const int AttachFailed = 2131034355;
+
+ // aapt resource value: 0x7f050018
+ public const int BinaryDirectory_default = 2131034136;
+
+ // aapt resource value: 0x7f050017
+ public const int BinaryDirectory_key = 2131034135;
// aapt resource value: 0x7f0500e1
- public const int SaveAttachment_Failed = 2131034337;
+ public const int BinaryDirectory_summary = 2131034337;
// aapt resource value: 0x7f0500e0
- public const int SaveAttachment_doneMessage = 2131034336;
+ public const int BinaryDirectory_title = 2131034336;
+
+ // aapt resource value: 0x7f050100
+ public const int ChangeLog = 2131034368;
+
+ // aapt resource value: 0x7f0500ff
+ public const int ChangeLog_title = 2131034367;
+
+ // aapt resource value: 0x7f05003a
+ public const int ClearClipboard = 2131034170;
+
+ // aapt resource value: 0x7f050027
+ public const int CreditsText = 2131034151;
+
+ // aapt resource value: 0x7f050070
+ public const int FileNotFound = 2131034224;
+
+ // aapt resource value: 0x7f050083
+ public const int InvalidPassword = 2131034243;
+
+ // aapt resource value: 0x7f05001d
+ public const int LastInfoVersionCode_key = 2131034141;
// aapt resource value: 0x7f05001f
- public const int SuggestionsURL = 2131034143;
+ public const int MarketURL = 2131034143;
+
+ // aapt resource value: 0x7f05008d
+ public const int MaskedPassword = 2131034253;
+
+ // aapt resource value: 0x7f050019
+ public const int QuickUnlockDefaultEnabled_key = 2131034137;
+
+ // aapt resource value: 0x7f0500dc
+ public const int QuickUnlockDefaultEnabled_summary = 2131034332;
+
+ // aapt resource value: 0x7f0500db
+ public const int QuickUnlockDefaultEnabled_title = 2131034331;
+
+ // aapt resource value: 0x7f05001b
+ public const int QuickUnlockLength_default = 2131034139;
+
+ // aapt resource value: 0x7f05001a
+ public const int QuickUnlockLength_key = 2131034138;
+
+ // aapt resource value: 0x7f0500de
+ public const int QuickUnlockLength_summary = 2131034334;
+
+ // aapt resource value: 0x7f0500dd
+ public const int QuickUnlockLength_title = 2131034333;
+
+ // aapt resource value: 0x7f0500d9
+ public const int QuickUnlock_button = 2131034329;
+
+ // aapt resource value: 0x7f0500df
+ public const int QuickUnlock_fail = 2131034335;
+
+ // aapt resource value: 0x7f0500d8
+ public const int QuickUnlock_label = 2131034328;
+
+ // aapt resource value: 0x7f0500da
+ public const int QuickUnlock_lockButton = 2131034330;
+
+ // aapt resource value: 0x7f0500f4
+ public const int RecycleBin = 2131034356;
+
+ // aapt resource value: 0x7f0500e3
+ public const int SaveAttachment_Failed = 2131034339;
+
+ // aapt resource value: 0x7f0500e2
+ public const int SaveAttachment_doneMessage = 2131034338;
+
+ // aapt resource value: 0x7f050020
+ public const int SuggestionsURL = 2131034144;
// aapt resource value: 0x7f050014
public const int TanExpiresOnUse_key = 2131034132;
- // aapt resource value: 0x7f0500ca
- public const int TanExpiresOnUse_summary = 2131034314;
+ // aapt resource value: 0x7f0500cc
+ public const int TanExpiresOnUse_summary = 2131034316;
- // aapt resource value: 0x7f0500c9
- public const int TanExpiresOnUse_title = 2131034313;
+ // aapt resource value: 0x7f0500cb
+ public const int TanExpiresOnUse_title = 2131034315;
- // aapt resource value: 0x7f050020
- public const int TranslationURL = 2131034144;
+ // aapt resource value: 0x7f050021
+ public const int TranslationURL = 2131034145;
- // aapt resource value: 0x7f05001b
- public const int UsageCount_key = 2131034139;
+ // aapt resource value: 0x7f05001c
+ public const int UsageCount_key = 2131034140;
- // aapt resource value: 0x7f05001d
- public const int UseFileTransactions_key = 2131034141;
+ // aapt resource value: 0x7f05001e
+ public const int UseFileTransactions_key = 2131034142;
- // aapt resource value: 0x7f0500ec
- public const int UseFileTransactions_summary = 2131034348;
+ // aapt resource value: 0x7f0500ee
+ public const int UseFileTransactions_summary = 2131034350;
- // aapt resource value: 0x7f0500eb
- public const int UseFileTransactions_title = 2131034347;
-
- // aapt resource value: 0x7f050023
- public const int about_feedback = 2131034147;
+ // aapt resource value: 0x7f0500ed
+ public const int UseFileTransactions_title = 2131034349;
// aapt resource value: 0x7f050024
- public const int about_homepage = 2131034148;
+ public const int about_feedback = 2131034148;
- // aapt resource value: 0x7f050027
- public const int accept = 2131034151;
-
- // aapt resource value: 0x7f0500e7
- public const int add_binary = 2131034343;
+ // aapt resource value: 0x7f050025
+ public const int about_homepage = 2131034149;
// aapt resource value: 0x7f050028
- public const int add_entry = 2131034152;
+ public const int accept = 2131034152;
- // aapt resource value: 0x7f0500e8
- public const int add_extra_string = 2131034344;
+ // aapt resource value: 0x7f0500e9
+ public const int add_binary = 2131034345;
// aapt resource value: 0x7f050029
- public const int add_group = 2131034153;
+ public const int add_entry = 2131034153;
+
+ // aapt resource value: 0x7f0500ea
+ public const int add_extra_string = 2131034346;
// aapt resource value: 0x7f05002a
- public const int add_group_title = 2131034154;
+ public const int add_group = 2131034154;
// aapt resource value: 0x7f05002b
- public const int algorithm = 2131034155;
+ public const int add_group_title = 2131034155;
// aapt resource value: 0x7f05002c
- public const int algorithm_colon = 2131034156;
+ public const int algorithm = 2131034156;
+
+ // aapt resource value: 0x7f05002d
+ public const int algorithm_colon = 2131034157;
// aapt resource value: 0x7f050008
public const int algorithm_key = 2131034120;
@@ -1195,299 +1246,305 @@ namespace keepass2android
// aapt resource value: 0x7f050009
public const int app_key = 2131034121;
- // aapt resource value: 0x7f05002d
- public const int app_name = 2131034157;
+ // aapt resource value: 0x7f05002e
+ public const int app_name = 2131034158;
- // aapt resource value: 0x7f05002f
- public const int app_name_nonet = 2131034159;
+ // aapt resource value: 0x7f050030
+ public const int app_name_nonet = 2131034160;
- // aapt resource value: 0x7f050031
- public const int app_timeout = 2131034161;
+ // aapt resource value: 0x7f050032
+ public const int app_timeout = 2131034162;
// aapt resource value: 0x7f05000a
public const int app_timeout_key = 2131034122;
- // aapt resource value: 0x7f050032
- public const int app_timeout_summary = 2131034162;
-
// aapt resource value: 0x7f050033
- public const int application = 2131034163;
+ public const int app_timeout_summary = 2131034163;
// aapt resource value: 0x7f050034
- public const int application_settings = 2131034164;
+ public const int application = 2131034164;
// aapt resource value: 0x7f050035
- public const int brackets = 2131034165;
+ public const int application_settings = 2131034165;
// aapt resource value: 0x7f050036
- public const int browser_intall_text = 2131034166;
+ public const int brackets = 2131034166;
// aapt resource value: 0x7f050037
- public const int building_search_idx = 2131034167;
+ public const int browser_intall_text = 2131034167;
// aapt resource value: 0x7f050038
- public const int cancel = 2131034168;
+ public const int building_search_idx = 2131034168;
- // aapt resource value: 0x7f0500ce
- public const int caseSensitive = 2131034318;
+ // aapt resource value: 0x7f050039
+ public const int cancel = 2131034169;
- // aapt resource value: 0x7f05003a
- public const int clipboard_timeout = 2131034170;
+ // aapt resource value: 0x7f0500d0
+ public const int caseSensitive = 2131034320;
- // aapt resource value: 0x7f050021
- public const int clipboard_timeout_default = 2131034145;
+ // aapt resource value: 0x7f05003b
+ public const int clipboard_timeout = 2131034171;
+
+ // aapt resource value: 0x7f050022
+ public const int clipboard_timeout_default = 2131034146;
// aapt resource value: 0x7f05000b
public const int clipboard_timeout_key = 2131034123;
- // aapt resource value: 0x7f05003b
- public const int clipboard_timeout_summary = 2131034171;
-
- // aapt resource value: 0x7f05003d
- public const int copy_password = 2131034173;
-
// aapt resource value: 0x7f05003c
- public const int copy_username = 2131034172;
+ public const int clipboard_timeout_summary = 2131034172;
// aapt resource value: 0x7f05003e
- public const int creating_db_key = 2131034174;
+ public const int copy_password = 2131034174;
- // aapt resource value: 0x7f0500ea
- public const int credentials_dialog_title = 2131034346;
+ // aapt resource value: 0x7f05003d
+ public const int copy_username = 2131034173;
// aapt resource value: 0x7f05003f
- public const int current_group = 2131034175;
+ public const int creating_db_key = 2131034175;
+
+ // aapt resource value: 0x7f0500ec
+ public const int credentials_dialog_title = 2131034348;
// aapt resource value: 0x7f050040
- public const int current_group_root = 2131034176;
+ public const int current_group = 2131034176;
// aapt resource value: 0x7f050041
- public const int database = 2131034177;
+ public const int current_group_root = 2131034177;
- // aapt resource value: 0x7f0500e9
- public const int database_loaded_quickunlock_enabled = 2131034345;
+ // aapt resource value: 0x7f050042
+ public const int database = 2131034178;
+
+ // aapt resource value: 0x7f0500eb
+ public const int database_loaded_quickunlock_enabled = 2131034347;
+
+ // aapt resource value: 0x7f0500b7
+ public const int database_name = 2131034295;
+
+ // aapt resource value: 0x7f050016
+ public const int database_name_key = 2131034134;
// aapt resource value: 0x7f05000c
public const int db_key = 2131034124;
- // aapt resource value: 0x7f050042
- public const int decrypting_db = 2131034178;
-
// aapt resource value: 0x7f050043
- public const int decrypting_entry = 2131034179;
+ public const int decrypting_db = 2131034179;
// aapt resource value: 0x7f050044
- public const int default_checkbox = 2131034180;
+ public const int decrypting_entry = 2131034180;
+
+ // aapt resource value: 0x7f050045
+ public const int default_checkbox = 2131034181;
// aapt resource value: 0x7f050001
public const int default_file_path = 2131034113;
- // aapt resource value: 0x7f0500b6
- public const int default_username = 2131034294;
+ // aapt resource value: 0x7f0500b8
+ public const int default_username = 2131034296;
// aapt resource value: 0x7f050015
public const int default_username_key = 2131034133;
- // aapt resource value: 0x7f050045
- public const int digits = 2131034181;
-
// aapt resource value: 0x7f050046
- public const int disclaimer_formal = 2131034182;
+ public const int digits = 2131034182;
+
+ // aapt resource value: 0x7f050047
+ public const int disclaimer_formal = 2131034183;
// aapt resource value: 0x7f050002
public const int donate_url = 2131034114;
- // aapt resource value: 0x7f050047
- public const int ellipsis = 2131034183;
-
- // aapt resource value: 0x7f0500d5
- public const int enable_quickunlock = 2131034325;
-
// aapt resource value: 0x7f050048
- public const int enter_filename = 2131034184;
+ public const int ellipsis = 2131034184;
- // aapt resource value: 0x7f0500d4
- public const int enter_filename_details_create_import = 2131034324;
-
- // aapt resource value: 0x7f0500d3
- public const int enter_filename_details_url = 2131034323;
+ // aapt resource value: 0x7f0500d7
+ public const int enable_quickunlock = 2131034327;
// aapt resource value: 0x7f050049
- public const int entry_accessed = 2131034185;
+ public const int enter_filename = 2131034185;
+
+ // aapt resource value: 0x7f0500d6
+ public const int enter_filename_details_create_import = 2131034326;
+
+ // aapt resource value: 0x7f0500d5
+ public const int enter_filename_details_url = 2131034325;
// aapt resource value: 0x7f05004a
- public const int entry_and_or = 2131034186;
-
- // aapt resource value: 0x7f05005a
- public const int entry_binaries = 2131034202;
+ public const int entry_accessed = 2131034186;
// aapt resource value: 0x7f05004b
- public const int entry_cancel = 2131034187;
-
- // aapt resource value: 0x7f05004c
- public const int entry_comment = 2131034188;
-
- // aapt resource value: 0x7f05004f
- public const int entry_confpassword = 2131034191;
-
- // aapt resource value: 0x7f050050
- public const int entry_created = 2131034192;
-
- // aapt resource value: 0x7f050051
- public const int entry_expires = 2131034193;
-
- // aapt resource value: 0x7f050059
- public const int entry_extra_strings = 2131034201;
-
- // aapt resource value: 0x7f050052
- public const int entry_keyfile = 2131034194;
-
- // aapt resource value: 0x7f050053
- public const int entry_modified = 2131034195;
-
- // aapt resource value: 0x7f05004e
- public const int entry_override_url = 2131034190;
-
- // aapt resource value: 0x7f050054
- public const int entry_password = 2131034196;
-
- // aapt resource value: 0x7f050055
- public const int entry_save = 2131034197;
-
- // aapt resource value: 0x7f05004d
- public const int entry_tags = 2131034189;
-
- // aapt resource value: 0x7f050056
- public const int entry_title = 2131034198;
-
- // aapt resource value: 0x7f050057
- public const int entry_url = 2131034199;
-
- // aapt resource value: 0x7f050058
- public const int entry_user_name = 2131034200;
+ public const int entry_and_or = 2131034187;
// aapt resource value: 0x7f05005b
- public const int error_arc4 = 2131034203;
+ public const int entry_binaries = 2131034203;
+
+ // aapt resource value: 0x7f05004c
+ public const int entry_cancel = 2131034188;
+
+ // aapt resource value: 0x7f05004d
+ public const int entry_comment = 2131034189;
+
+ // aapt resource value: 0x7f050050
+ public const int entry_confpassword = 2131034192;
+
+ // aapt resource value: 0x7f050051
+ public const int entry_created = 2131034193;
+
+ // aapt resource value: 0x7f050052
+ public const int entry_expires = 2131034194;
+
+ // aapt resource value: 0x7f05005a
+ public const int entry_extra_strings = 2131034202;
+
+ // aapt resource value: 0x7f050053
+ public const int entry_keyfile = 2131034195;
+
+ // aapt resource value: 0x7f050054
+ public const int entry_modified = 2131034196;
+
+ // aapt resource value: 0x7f05004f
+ public const int entry_override_url = 2131034191;
+
+ // aapt resource value: 0x7f050055
+ public const int entry_password = 2131034197;
+
+ // aapt resource value: 0x7f050056
+ public const int entry_save = 2131034198;
+
+ // aapt resource value: 0x7f05004e
+ public const int entry_tags = 2131034190;
+
+ // aapt resource value: 0x7f050057
+ public const int entry_title = 2131034199;
+
+ // aapt resource value: 0x7f050058
+ public const int entry_url = 2131034200;
+
+ // aapt resource value: 0x7f050059
+ public const int entry_user_name = 2131034201;
// aapt resource value: 0x7f05005c
- public const int error_can_not_handle_uri = 2131034204;
+ public const int error_arc4 = 2131034204;
// aapt resource value: 0x7f05005d
- public const int error_could_not_create_group = 2131034205;
+ public const int error_can_not_handle_uri = 2131034205;
// aapt resource value: 0x7f05005e
- public const int error_could_not_create_parent = 2131034206;
+ public const int error_could_not_create_group = 2131034206;
// aapt resource value: 0x7f05005f
- public const int error_database_exists = 2131034207;
+ public const int error_could_not_create_parent = 2131034207;
// aapt resource value: 0x7f050060
- public const int error_database_settings = 2131034208;
+ public const int error_database_exists = 2131034208;
// aapt resource value: 0x7f050061
- public const int error_failed_to_launch_link = 2131034209;
-
- // aapt resource value: 0x7f050063
- public const int error_file_not_create = 2131034211;
+ public const int error_database_settings = 2131034209;
// aapt resource value: 0x7f050062
- public const int error_filename_required = 2131034210;
+ public const int error_failed_to_launch_link = 2131034210;
// aapt resource value: 0x7f050064
- public const int error_invalid_db = 2131034212;
+ public const int error_file_not_create = 2131034212;
- // aapt resource value: 0x7f0500e2
- public const int error_invalid_expiry_date = 2131034338;
+ // aapt resource value: 0x7f050063
+ public const int error_filename_required = 2131034211;
// aapt resource value: 0x7f050065
- public const int error_invalid_path = 2131034213;
-
- // aapt resource value: 0x7f050066
- public const int error_no_name = 2131034214;
-
- // aapt resource value: 0x7f050067
- public const int error_nopass = 2131034215;
-
- // aapt resource value: 0x7f050068
- public const int error_out_of_memory = 2131034216;
-
- // aapt resource value: 0x7f050069
- public const int error_pass_gen_type = 2131034217;
-
- // aapt resource value: 0x7f05006a
- public const int error_pass_match = 2131034218;
-
- // aapt resource value: 0x7f05006b
- public const int error_rounds_not_number = 2131034219;
-
- // aapt resource value: 0x7f05006c
- public const int error_rounds_too_large = 2131034220;
-
- // aapt resource value: 0x7f0500e3
- public const int error_string_key = 2131034339;
-
- // aapt resource value: 0x7f05006d
- public const int error_title_required = 2131034221;
-
- // aapt resource value: 0x7f05006e
- public const int error_wrong_length = 2131034222;
-
- // aapt resource value: 0x7f0500cc
- public const int excludeExpiredEntries = 2131034316;
+ public const int error_invalid_db = 2131034213;
// aapt resource value: 0x7f0500e4
- public const int field_name = 2131034340;
+ public const int error_invalid_expiry_date = 2131034340;
+
+ // aapt resource value: 0x7f050066
+ public const int error_invalid_path = 2131034214;
+
+ // aapt resource value: 0x7f050067
+ public const int error_no_name = 2131034215;
+
+ // aapt resource value: 0x7f050068
+ public const int error_nopass = 2131034216;
+
+ // aapt resource value: 0x7f050069
+ public const int error_out_of_memory = 2131034217;
+
+ // aapt resource value: 0x7f05006a
+ public const int error_pass_gen_type = 2131034218;
+
+ // aapt resource value: 0x7f05006b
+ public const int error_pass_match = 2131034219;
+
+ // aapt resource value: 0x7f05006c
+ public const int error_rounds_not_number = 2131034220;
+
+ // aapt resource value: 0x7f05006d
+ public const int error_rounds_too_large = 2131034221;
// aapt resource value: 0x7f0500e5
- public const int field_value = 2131034341;
+ public const int error_string_key = 2131034341;
- // aapt resource value: 0x7f050070
- public const int file_browser = 2131034224;
+ // aapt resource value: 0x7f05006e
+ public const int error_title_required = 2131034222;
+
+ // aapt resource value: 0x7f05006f
+ public const int error_wrong_length = 2131034223;
+
+ // aapt resource value: 0x7f0500ce
+ public const int excludeExpiredEntries = 2131034318;
+
+ // aapt resource value: 0x7f0500e6
+ public const int field_name = 2131034342;
+
+ // aapt resource value: 0x7f0500e7
+ public const int field_value = 2131034343;
// aapt resource value: 0x7f050071
- public const int generate_password = 2131034225;
+ public const int file_browser = 2131034225;
// aapt resource value: 0x7f050072
- public const int group = 2131034226;
+ public const int generate_password = 2131034226;
// aapt resource value: 0x7f050073
- public const int hint_comment = 2131034227;
+ public const int group = 2131034227;
// aapt resource value: 0x7f050074
- public const int hint_conf_pass = 2131034228;
+ public const int hint_comment = 2131034228;
// aapt resource value: 0x7f050075
- public const int hint_generated_password = 2131034229;
+ public const int hint_conf_pass = 2131034229;
// aapt resource value: 0x7f050076
- public const int hint_group_name = 2131034230;
+ public const int hint_generated_password = 2131034230;
// aapt resource value: 0x7f050077
- public const int hint_keyfile = 2131034231;
+ public const int hint_group_name = 2131034231;
// aapt resource value: 0x7f050078
- public const int hint_length = 2131034232;
-
- // aapt resource value: 0x7f05007a
- public const int hint_login_pass = 2131034234;
-
- // aapt resource value: 0x7f05007d
- public const int hint_override_url = 2131034237;
+ public const int hint_keyfile = 2131034232;
// aapt resource value: 0x7f050079
- public const int hint_pass = 2131034233;
-
- // aapt resource value: 0x7f05007e
- public const int hint_tags = 2131034238;
+ public const int hint_length = 2131034233;
// aapt resource value: 0x7f05007b
- public const int hint_title = 2131034235;
+ public const int hint_login_pass = 2131034235;
- // aapt resource value: 0x7f05007c
- public const int hint_url = 2131034236;
+ // aapt resource value: 0x7f05007e
+ public const int hint_override_url = 2131034238;
+
+ // aapt resource value: 0x7f05007a
+ public const int hint_pass = 2131034234;
// aapt resource value: 0x7f05007f
- public const int hint_username = 2131034239;
+ public const int hint_tags = 2131034239;
+
+ // aapt resource value: 0x7f05007c
+ public const int hint_title = 2131034236;
+
+ // aapt resource value: 0x7f05007d
+ public const int hint_url = 2131034237;
+
+ // aapt resource value: 0x7f050080
+ public const int hint_username = 2131034240;
// aapt resource value: 0x7f050003
public const int homepage = 2131034115;
@@ -1495,134 +1552,134 @@ namespace keepass2android
// aapt resource value: 0x7f050004
public const int homepage_short = 2131034116;
- // aapt resource value: 0x7f050080
- public const int install_from_market = 2131034240;
-
// aapt resource value: 0x7f050081
- public const int install_from_website = 2131034241;
+ public const int install_from_market = 2131034241;
- // aapt resource value: 0x7f050083
- public const int invalid_algorithm = 2131034243;
+ // aapt resource value: 0x7f050082
+ public const int install_from_website = 2131034242;
// aapt resource value: 0x7f050084
- public const int invalid_db_sig = 2131034244;
+ public const int invalid_algorithm = 2131034244;
+
+ // aapt resource value: 0x7f050085
+ public const int invalid_db_sig = 2131034245;
// aapt resource value: 0x7f050005
public const int issues = 2131034117;
- // aapt resource value: 0x7f050085
- public const int keyfile_does_not_exist = 2131034245;
-
// aapt resource value: 0x7f050086
- public const int keyfile_is_empty = 2131034246;
+ public const int keyfile_does_not_exist = 2131034246;
+
+ // aapt resource value: 0x7f050087
+ public const int keyfile_is_empty = 2131034247;
// aapt resource value: 0x7f05000e
public const int keyfile_key = 2131034126;
- // aapt resource value: 0x7f0500cb
- public const int kp2a_findUrl = 2131034315;
+ // aapt resource value: 0x7f0500cd
+ public const int kp2a_findUrl = 2131034317;
- // aapt resource value: 0x7f050087
- public const int length = 2131034247;
+ // aapt resource value: 0x7f050088
+ public const int length = 2131034248;
// aapt resource value: 0x7f050000
public const int library_name = 2131034112;
- // aapt resource value: 0x7f050022
- public const int list_size_default = 2131034146;
+ // aapt resource value: 0x7f050023
+ public const int list_size_default = 2131034147;
// aapt resource value: 0x7f050011
public const int list_size_key = 2131034129;
- // aapt resource value: 0x7f050089
- public const int list_size_summary = 2131034249;
-
- // aapt resource value: 0x7f050088
- public const int list_size_title = 2131034248;
-
// aapt resource value: 0x7f05008a
- public const int loading_database = 2131034250;
+ public const int list_size_summary = 2131034250;
+
+ // aapt resource value: 0x7f050089
+ public const int list_size_title = 2131034249;
// aapt resource value: 0x7f05008b
- public const int lowercase = 2131034251;
+ public const int loading_database = 2131034251;
+
+ // aapt resource value: 0x7f05008c
+ public const int lowercase = 2131034252;
// aapt resource value: 0x7f05000f
public const int maskpass_key = 2131034127;
- // aapt resource value: 0x7f05008e
- public const int maskpass_summary = 2131034254;
-
- // aapt resource value: 0x7f05008d
- public const int maskpass_title = 2131034253;
-
// aapt resource value: 0x7f05008f
- public const int menu_about = 2131034255;
+ public const int maskpass_summary = 2131034255;
- // aapt resource value: 0x7f050094
- public const int menu_app_settings = 2131034260;
+ // aapt resource value: 0x7f05008e
+ public const int maskpass_title = 2131034254;
// aapt resource value: 0x7f050090
- public const int menu_change_key = 2131034256;
-
- // aapt resource value: 0x7f050091
- public const int menu_copy_pass = 2131034257;
-
- // aapt resource value: 0x7f050092
- public const int menu_copy_user = 2131034258;
-
- // aapt resource value: 0x7f050093
- public const int menu_create = 2131034259;
+ public const int menu_about = 2131034256;
// aapt resource value: 0x7f050095
- public const int menu_db_settings = 2131034261;
+ public const int menu_app_settings = 2131034261;
+
+ // aapt resource value: 0x7f050091
+ public const int menu_change_key = 2131034257;
+
+ // aapt resource value: 0x7f050092
+ public const int menu_copy_pass = 2131034258;
+
+ // aapt resource value: 0x7f050093
+ public const int menu_copy_user = 2131034259;
+
+ // aapt resource value: 0x7f050094
+ public const int menu_create = 2131034260;
// aapt resource value: 0x7f050096
- public const int menu_delete = 2131034262;
+ public const int menu_db_settings = 2131034262;
// aapt resource value: 0x7f050097
- public const int menu_donate = 2131034263;
+ public const int menu_delete = 2131034263;
// aapt resource value: 0x7f050098
- public const int menu_edit = 2131034264;
+ public const int menu_donate = 2131034264;
// aapt resource value: 0x7f050099
- public const int menu_hide_password = 2131034265;
+ public const int menu_edit = 2131034265;
// aapt resource value: 0x7f05009a
- public const int menu_homepage = 2131034266;
+ public const int menu_hide_password = 2131034266;
// aapt resource value: 0x7f05009b
- public const int menu_lock = 2131034267;
+ public const int menu_homepage = 2131034267;
// aapt resource value: 0x7f05009c
- public const int menu_open = 2131034268;
+ public const int menu_lock = 2131034268;
// aapt resource value: 0x7f05009d
- public const int menu_rename = 2131034269;
+ public const int menu_open = 2131034269;
// aapt resource value: 0x7f05009e
- public const int menu_search = 2131034270;
+ public const int menu_rename = 2131034270;
// aapt resource value: 0x7f05009f
- public const int menu_url = 2131034271;
+ public const int menu_search = 2131034271;
// aapt resource value: 0x7f0500a0
- public const int minus = 2131034272;
+ public const int menu_url = 2131034272;
// aapt resource value: 0x7f0500a1
- public const int never = 2131034273;
+ public const int minus = 2131034273;
- // aapt resource value: 0x7f0500a3
- public const int no = 2131034275;
+ // aapt resource value: 0x7f0500a2
+ public const int never = 2131034274;
// aapt resource value: 0x7f0500a4
- public const int no_keys = 2131034276;
+ public const int no = 2131034276;
// aapt resource value: 0x7f0500a5
- public const int no_results = 2131034277;
+ public const int no_keys = 2131034277;
// aapt resource value: 0x7f0500a6
- public const int no_url_handler = 2131034278;
+ public const int no_results = 2131034278;
+
+ // aapt resource value: 0x7f0500a7
+ public const int no_url_handler = 2131034279;
// aapt resource value: 0x7f050006
public const int oi_filemanager_market = 2131034118;
@@ -1633,149 +1690,149 @@ namespace keepass2android
// aapt resource value: 0x7f050010
public const int omitbackup_key = 2131034128;
+ // aapt resource value: 0x7f0500aa
+ public const int omitbackup_summary = 2131034282;
+
// aapt resource value: 0x7f0500a9
- public const int omitbackup_summary = 2131034281;
+ public const int omitbackup_title = 2131034281;
// aapt resource value: 0x7f0500a8
- public const int omitbackup_title = 2131034280;
-
- // aapt resource value: 0x7f0500a7
- public const int open_recent = 2131034279;
-
- // aapt resource value: 0x7f0500aa
- public const int pass_filename = 2131034282;
+ public const int open_recent = 2131034280;
// aapt resource value: 0x7f0500ab
- public const int password_title = 2131034283;
+ public const int pass_filename = 2131034283;
// aapt resource value: 0x7f0500ac
- public const int progress_create = 2131034284;
+ public const int password_title = 2131034284;
// aapt resource value: 0x7f0500ad
- public const int progress_title = 2131034285;
-
- // aapt resource value: 0x7f0500e6
- public const int protection = 2131034342;
-
- // aapt resource value: 0x7f0500fb
- public const int rate_app = 2131034363;
-
- // aapt resource value: 0x7f0500c8
- public const int regular_expression = 2131034312;
+ public const int progress_create = 2131034285;
// aapt resource value: 0x7f0500ae
- public const int remember_keyfile_summary = 2131034286;
+ public const int progress_title = 2131034286;
+
+ // aapt resource value: 0x7f0500e8
+ public const int protection = 2131034344;
+
+ // aapt resource value: 0x7f0500fd
+ public const int rate_app = 2131034365;
+
+ // aapt resource value: 0x7f0500ca
+ public const int regular_expression = 2131034314;
// aapt resource value: 0x7f0500af
- public const int remember_keyfile_title = 2131034287;
+ public const int remember_keyfile_summary = 2131034287;
// aapt resource value: 0x7f0500b0
- public const int remove_from_filelist = 2131034288;
+ public const int remember_keyfile_title = 2131034288;
// aapt resource value: 0x7f0500b1
- public const int rijndael = 2131034289;
+ public const int remove_from_filelist = 2131034289;
// aapt resource value: 0x7f0500b2
- public const int root = 2131034290;
+ public const int rijndael = 2131034290;
// aapt resource value: 0x7f0500b3
- public const int rounds = 2131034291;
+ public const int root = 2131034291;
// aapt resource value: 0x7f0500b4
- public const int rounds_explaination = 2131034292;
+ public const int rounds = 2131034292;
// aapt resource value: 0x7f0500b5
- public const int rounds_hint = 2131034293;
+ public const int rounds_explaination = 2131034293;
+
+ // aapt resource value: 0x7f0500b6
+ public const int rounds_hint = 2131034294;
// aapt resource value: 0x7f05000d
public const int rounds_key = 2131034125;
- // aapt resource value: 0x7f0500b7
- public const int saving_database = 2131034295;
-
- // aapt resource value: 0x7f0500be
- public const int search_hint = 2131034302;
+ // aapt resource value: 0x7f0500b9
+ public const int saving_database = 2131034297;
// aapt resource value: 0x7f0500c0
- public const int search_in = 2131034304;
+ public const int search_hint = 2131034304;
- // aapt resource value: 0x7f0500b9
- public const int search_label = 2131034297;
+ // aapt resource value: 0x7f0500c2
+ public const int search_in = 2131034306;
- // aapt resource value: 0x7f0500cd
- public const int search_options = 2131034317;
+ // aapt resource value: 0x7f0500bb
+ public const int search_label = 2131034299;
- // aapt resource value: 0x7f0500bf
- public const int search_results = 2131034303;
+ // aapt resource value: 0x7f0500cf
+ public const int search_options = 2131034319;
- // aapt resource value: 0x7f05002e
- public const int short_app_name = 2131034158;
+ // aapt resource value: 0x7f0500c1
+ public const int search_results = 2131034305;
- // aapt resource value: 0x7f050030
- public const int short_app_name_nonet = 2131034160;
+ // aapt resource value: 0x7f05002f
+ public const int short_app_name = 2131034159;
- // aapt resource value: 0x7f0500ba
- public const int show_password = 2131034298;
+ // aapt resource value: 0x7f050031
+ public const int short_app_name_nonet = 2131034161;
// aapt resource value: 0x7f0500bc
- public const int sort_db = 2131034300;
+ public const int show_password = 2131034300;
+
+ // aapt resource value: 0x7f0500be
+ public const int sort_db = 2131034302;
// aapt resource value: 0x7f050012
public const int sort_key = 2131034130;
- // aapt resource value: 0x7f0500bb
- public const int sort_name = 2131034299;
-
- // aapt resource value: 0x7f0500b8
- public const int space = 2131034296;
-
// aapt resource value: 0x7f0500bd
- public const int special = 2131034301;
+ public const int sort_name = 2131034301;
- // aapt resource value: 0x7f0500d0
- public const int start_create = 2131034320;
+ // aapt resource value: 0x7f0500ba
+ public const int space = 2131034298;
+
+ // aapt resource value: 0x7f0500bf
+ public const int special = 2131034303;
// aapt resource value: 0x7f0500d2
- public const int start_create_import = 2131034322;
+ public const int start_create = 2131034322;
- // aapt resource value: 0x7f0500cf
- public const int start_open_file = 2131034319;
+ // aapt resource value: 0x7f0500d4
+ public const int start_create_import = 2131034324;
// aapt resource value: 0x7f0500d1
- public const int start_open_url = 2131034321;
+ public const int start_open_file = 2131034321;
- // aapt resource value: 0x7f0500fa
- public const int suggest_improvements = 2131034362;
+ // aapt resource value: 0x7f0500d3
+ public const int start_open_url = 2131034323;
+
+ // aapt resource value: 0x7f0500fc
+ public const int suggest_improvements = 2131034364;
// aapt resource value: 0x7f050013
public const int timeout_key = 2131034131;
- // aapt resource value: 0x7f0500fc
- public const int translate_app = 2131034364;
-
- // aapt resource value: 0x7f0500c1
- public const int twofish = 2131034305;
-
- // aapt resource value: 0x7f0500c2
- public const int underline = 2131034306;
+ // aapt resource value: 0x7f0500fe
+ public const int translate_app = 2131034366;
// aapt resource value: 0x7f0500c3
- public const int unsupported_db_version = 2131034307;
+ public const int twofish = 2131034307;
// aapt resource value: 0x7f0500c4
- public const int uppercase = 2131034308;
-
- // aapt resource value: 0x7f0500c7
- public const int version_label = 2131034311;
+ public const int underline = 2131034308;
// aapt resource value: 0x7f0500c5
- public const int warning_read_only = 2131034309;
+ public const int unsupported_db_version = 2131034309;
// aapt resource value: 0x7f0500c6
- public const int warning_unmounted = 2131034310;
+ public const int uppercase = 2131034310;
- // aapt resource value: 0x7f0500a2
- public const int yes = 2131034274;
+ // aapt resource value: 0x7f0500c9
+ public const int version_label = 2131034313;
+
+ // aapt resource value: 0x7f0500c7
+ public const int warning_read_only = 2131034311;
+
+ // aapt resource value: 0x7f0500c8
+ public const int warning_unmounted = 2131034312;
+
+ // aapt resource value: 0x7f0500a3
+ public const int yes = 2131034275;
private String()
{
@@ -1785,12 +1842,21 @@ namespace keepass2android
public partial class Style
{
- // aapt resource value: 0x7f090011
- public const int Base = 2131296273;
+ // aapt resource value: 0x7f090019
+ public const int AdditionalStringLayout = 2131296281;
+
+ // aapt resource value: 0x7f090012
+ public const int Base = 2131296274;
+
+ // aapt resource value: 0x7f090013
+ public const int BottomBarActionButton = 2131296275;
// aapt resource value: 0x7f090001
public const int Dialog = 2131296257;
+ // aapt resource value: 0x7f090010
+ public const int EditEntryButton = 2131296272;
+
// aapt resource value: 0x7f090006
public const int ElementText = 2131296262;
@@ -1809,8 +1875,8 @@ namespace keepass2android
// aapt resource value: 0x7f09000f
public const int EntryItem = 2131296271;
- // aapt resource value: 0x7f090010
- public const int ExtraFieldHeader = 2131296272;
+ // aapt resource value: 0x7f090011
+ public const int ExtraFieldHeader = 2131296273;
// aapt resource value: 0x7f09000a
public const int GroupAndEntryHeader = 2131296266;
@@ -1827,9 +1893,27 @@ namespace keepass2android
// aapt resource value: 0x7f090002
public const int GroupTextSmall = 2131296258;
+ // aapt resource value: 0x7f09001a
+ public const int MinusButton = 2131296282;
+
// aapt resource value: 0x7f090000
public const int NoTitleBar = 2131296256;
+ // aapt resource value: 0x7f090016
+ public const int TextAppearance_EditEntry = 2131296278;
+
+ // aapt resource value: 0x7f090015
+ public const int TextAppearance_EditEntry_LabelSmall = 2131296277;
+
+ // aapt resource value: 0x7f090014
+ public const int TextAppearance_EditEntry_Small = 2131296276;
+
+ // aapt resource value: 0x7f090017
+ public const int TextAppearance_EditEntry_Value = 2131296279;
+
+ // aapt resource value: 0x7f090018
+ public const int TextAppearance_SmallHeading = 2131296280;
+
// aapt resource value: 0x7f090009
public const int WhiteOnBlack = 2131296265;
diff --git a/src/keepass2android/Resources/drawable-hdpi/collections_collection.png b/src/keepass2android/Resources/drawable-hdpi/collections_collection.png
new file mode 100644
index 00000000..d1324014
Binary files /dev/null and b/src/keepass2android/Resources/drawable-hdpi/collections_collection.png differ
diff --git a/src/keepass2android/Resources/drawable-hdpi/collections_new_label.png b/src/keepass2android/Resources/drawable-hdpi/collections_new_label.png
new file mode 100644
index 00000000..d9c52c10
Binary files /dev/null and b/src/keepass2android/Resources/drawable-hdpi/collections_new_label.png differ
diff --git a/src/keepass2android/Resources/drawable-hdpi/device_access_not_secure.png b/src/keepass2android/Resources/drawable-hdpi/device_access_not_secure.png
new file mode 100644
index 00000000..23ee08be
Binary files /dev/null and b/src/keepass2android/Resources/drawable-hdpi/device_access_not_secure.png differ
diff --git a/src/keepass2android/Resources/drawable-hdpi/ic_menu_remove_field_holo_light.png b/src/keepass2android/Resources/drawable-hdpi/ic_menu_remove_field_holo_light.png
new file mode 100644
index 00000000..68b46005
Binary files /dev/null and b/src/keepass2android/Resources/drawable-hdpi/ic_menu_remove_field_holo_light.png differ
diff --git a/src/keepass2android/Resources/drawable-hdpi/location_web_site.png b/src/keepass2android/Resources/drawable-hdpi/location_web_site.png
new file mode 100644
index 00000000..bd6b8682
Binary files /dev/null and b/src/keepass2android/Resources/drawable-hdpi/location_web_site.png differ
diff --git a/src/keepass2android/Resources/drawable-ldpi/collections_collection.png b/src/keepass2android/Resources/drawable-ldpi/collections_collection.png
new file mode 100644
index 00000000..fda13f1b
Binary files /dev/null and b/src/keepass2android/Resources/drawable-ldpi/collections_collection.png differ
diff --git a/src/keepass2android/Resources/drawable-ldpi/collections_new_label.png b/src/keepass2android/Resources/drawable-ldpi/collections_new_label.png
new file mode 100644
index 00000000..71dbfc4f
Binary files /dev/null and b/src/keepass2android/Resources/drawable-ldpi/collections_new_label.png differ
diff --git a/src/keepass2android/Resources/drawable-ldpi/device_access_not_secure.png b/src/keepass2android/Resources/drawable-ldpi/device_access_not_secure.png
new file mode 100644
index 00000000..84557bbe
Binary files /dev/null and b/src/keepass2android/Resources/drawable-ldpi/device_access_not_secure.png differ
diff --git a/src/keepass2android/Resources/drawable-ldpi/ic_menu_remove_field_holo_light.png b/src/keepass2android/Resources/drawable-ldpi/ic_menu_remove_field_holo_light.png
new file mode 100644
index 00000000..bf251bc1
Binary files /dev/null and b/src/keepass2android/Resources/drawable-ldpi/ic_menu_remove_field_holo_light.png differ
diff --git a/src/keepass2android/Resources/drawable-ldpi/location_web_site.png b/src/keepass2android/Resources/drawable-ldpi/location_web_site.png
new file mode 100644
index 00000000..f146cf99
Binary files /dev/null and b/src/keepass2android/Resources/drawable-ldpi/location_web_site.png differ
diff --git a/src/keepass2android/Resources/drawable-mdpi/collections_collection.png b/src/keepass2android/Resources/drawable-mdpi/collections_collection.png
new file mode 100644
index 00000000..3db304fa
Binary files /dev/null and b/src/keepass2android/Resources/drawable-mdpi/collections_collection.png differ
diff --git a/src/keepass2android/Resources/drawable-mdpi/collections_new_label.png b/src/keepass2android/Resources/drawable-mdpi/collections_new_label.png
new file mode 100644
index 00000000..70ad36c1
Binary files /dev/null and b/src/keepass2android/Resources/drawable-mdpi/collections_new_label.png differ
diff --git a/src/keepass2android/Resources/drawable-mdpi/device_access_not_secure.png b/src/keepass2android/Resources/drawable-mdpi/device_access_not_secure.png
new file mode 100644
index 00000000..84557bbe
Binary files /dev/null and b/src/keepass2android/Resources/drawable-mdpi/device_access_not_secure.png differ
diff --git a/src/keepass2android/Resources/drawable-mdpi/location_web_site.png b/src/keepass2android/Resources/drawable-mdpi/location_web_site.png
new file mode 100644
index 00000000..6a2bc885
Binary files /dev/null and b/src/keepass2android/Resources/drawable-mdpi/location_web_site.png differ
diff --git a/src/keepass2android/Resources/drawable/btn_new_group.png b/src/keepass2android/Resources/drawable/btn_new_group.png
index 44ffbbd8..748bd6e4 100644
Binary files a/src/keepass2android/Resources/drawable/btn_new_group.png and b/src/keepass2android/Resources/drawable/btn_new_group.png differ
diff --git a/src/keepass2android/Resources/drawable/btn_new_group_dark.png b/src/keepass2android/Resources/drawable/btn_new_group_dark.png
index 32ae9ebb..964f805a 100644
Binary files a/src/keepass2android/Resources/drawable/btn_new_group_dark.png and b/src/keepass2android/Resources/drawable/btn_new_group_dark.png differ
diff --git a/src/keepass2android/Resources/drawable/collections_collection.png b/src/keepass2android/Resources/drawable/collections_collection.png
new file mode 100644
index 00000000..d1324014
Binary files /dev/null and b/src/keepass2android/Resources/drawable/collections_collection.png differ
diff --git a/src/keepass2android/Resources/drawable/collections_new_label.png b/src/keepass2android/Resources/drawable/collections_new_label.png
new file mode 100644
index 00000000..70ad36c1
Binary files /dev/null and b/src/keepass2android/Resources/drawable/collections_new_label.png differ
diff --git a/src/keepass2android/Resources/drawable/device_access_new_account.png b/src/keepass2android/Resources/drawable/device_access_new_account.png
index ca751c87..2d16573b 100644
Binary files a/src/keepass2android/Resources/drawable/device_access_new_account.png and b/src/keepass2android/Resources/drawable/device_access_new_account.png differ
diff --git a/src/keepass2android/Resources/drawable/device_access_not_secure.png b/src/keepass2android/Resources/drawable/device_access_not_secure.png
new file mode 100644
index 00000000..4a6463c3
Binary files /dev/null and b/src/keepass2android/Resources/drawable/device_access_not_secure.png differ
diff --git a/src/keepass2android/Resources/drawable/ic_launcher_gray.png b/src/keepass2android/Resources/drawable/ic_launcher_gray.png
index 4b9fe754..d68da21f 100644
Binary files a/src/keepass2android/Resources/drawable/ic_launcher_gray.png and b/src/keepass2android/Resources/drawable/ic_launcher_gray.png differ
diff --git a/src/keepass2android/Resources/drawable/ic_menu_add_field_holo_light.png b/src/keepass2android/Resources/drawable/ic_menu_add_field_holo_light.png
new file mode 100644
index 00000000..4a4990c0
Binary files /dev/null and b/src/keepass2android/Resources/drawable/ic_menu_add_field_holo_light.png differ
diff --git a/src/keepass2android/Resources/drawable/ic_menu_remove_field_holo_light.png b/src/keepass2android/Resources/drawable/ic_menu_remove_field_holo_light.png
new file mode 100644
index 00000000..b31359f7
Binary files /dev/null and b/src/keepass2android/Resources/drawable/ic_menu_remove_field_holo_light.png differ
diff --git a/src/keepass2android/Resources/drawable/location_web_site.png b/src/keepass2android/Resources/drawable/location_web_site.png
new file mode 100644
index 00000000..bd6b8682
Binary files /dev/null and b/src/keepass2android/Resources/drawable/location_web_site.png differ
diff --git a/src/keepass2android/Resources/drawable/navigation_cancel.png b/src/keepass2android/Resources/drawable/navigation_cancel.png
new file mode 100644
index 00000000..9f4c3d6a
Binary files /dev/null and b/src/keepass2android/Resources/drawable/navigation_cancel.png differ
diff --git a/src/keepass2android/Resources/drawable/section_header.xml b/src/keepass2android/Resources/drawable/section_header.xml
index c08c173e..fbe5fae4 100644
--- a/src/keepass2android/Resources/drawable/section_header.xml
+++ b/src/keepass2android/Resources/drawable/section_header.xml
@@ -4,5 +4,5 @@
android:shape="rectangle">
+ android:color="@color/light_gray"/>
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout-v14/QuickUnlock_Unused.xml b/src/keepass2android/Resources/layout-v14/QuickUnlock_Unused.xml
new file mode 100644
index 00000000..1b263bb7
--- /dev/null
+++ b/src/keepass2android/Resources/layout-v14/QuickUnlock_Unused.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout-v11/SaveButton.xml b/src/keepass2android/Resources/layout-v14/SaveButton.xml
similarity index 91%
rename from src/keepass2android/Resources/layout-v11/SaveButton.xml
rename to src/keepass2android/Resources/layout-v14/SaveButton.xml
index 2e543338..f388ccbe 100644
--- a/src/keepass2android/Resources/layout-v11/SaveButton.xml
+++ b/src/keepass2android/Resources/layout-v14/SaveButton.xml
@@ -11,7 +11,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingRight="20dp"
- android:drawableLeft="@drawable/navigation_accept_dark"
+ android:drawableLeft="@drawable/navigation_accept"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:text="@string/entry_save" />
diff --git a/src/keepass2android/Resources/layout-v11/entry_edit.xml b/src/keepass2android/Resources/layout-v14/entry_edit.xml
similarity index 66%
rename from src/keepass2android/Resources/layout-v11/entry_edit.xml
rename to src/keepass2android/Resources/layout-v14/entry_edit.xml
index 5cf44da9..40b1b226 100644
--- a/src/keepass2android/Resources/layout-v11/entry_edit.xml
+++ b/src/keepass2android/Resources/layout-v14/entry_edit.xml
@@ -1,212 +1,200 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout-v14/entry_edit_section.xml b/src/keepass2android/Resources/layout-v14/entry_edit_section.xml
new file mode 100644
index 00000000..74528ab7
--- /dev/null
+++ b/src/keepass2android/Resources/layout-v14/entry_edit_section.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout-v11/entry_view.xml b/src/keepass2android/Resources/layout-v14/entry_view.xml
similarity index 93%
rename from src/keepass2android/Resources/layout-v11/entry_view.xml
rename to src/keepass2android/Resources/layout-v14/entry_view.xml
index e2321f3f..055aa7ce 100644
--- a/src/keepass2android/Resources/layout-v11/entry_view.xml
+++ b/src/keepass2android/Resources/layout-v14/entry_view.xml
@@ -15,8 +15,9 @@
android:divider="?android:attr/dividerVertical"
android:layout_alignParentBottom="true"
android:dividerPadding="12dp">
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout-v14/generate_password.xml b/src/keepass2android/Resources/layout-v14/generate_password.xml
new file mode 100644
index 00000000..19554c79
--- /dev/null
+++ b/src/keepass2android/Resources/layout-v14/generate_password.xml
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout-v11/group_add_entry.xml b/src/keepass2android/Resources/layout-v14/group_add_entry.xml
similarity index 70%
rename from src/keepass2android/Resources/layout-v11/group_add_entry.xml
rename to src/keepass2android/Resources/layout-v14/group_add_entry.xml
index a36aea4f..ab70f4ba 100644
--- a/src/keepass2android/Resources/layout-v11/group_add_entry.xml
+++ b/src/keepass2android/Resources/layout-v14/group_add_entry.xml
@@ -4,24 +4,22 @@
android:layout_height="fill_parent">
-
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:orientation="horizontal" />
-
-
+
@@ -31,14 +29,14 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingRight="20dp"
- android:drawableLeft="@drawable/btn_new_group_dark"
+ android:drawableLeft="@drawable/btn_new_group"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:text="@string/add_group" />
@@ -48,33 +46,24 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingRight="20dp"
- android:drawableLeft="@drawable/device_access_new_account_dark"
+ android:drawableLeft="@drawable/device_access_new_account"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:text="@string/add_entry" />
-
-
-
-
-
+ android:background="#b8b8b8" />
-
-
-
+ android:paddingRight="8dp"
+ android:paddingLeft="8dp" />
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout-v14/icon_picker.xml b/src/keepass2android/Resources/layout-v14/icon_picker.xml
new file mode 100644
index 00000000..7c6d2090
--- /dev/null
+++ b/src/keepass2android/Resources/layout-v14/icon_picker.xml
@@ -0,0 +1,30 @@
+
+
+
+
diff --git a/src/keepass2android/Resources/layout-v14/password.xml b/src/keepass2android/Resources/layout-v14/password.xml
new file mode 100644
index 00000000..0c6e927f
--- /dev/null
+++ b/src/keepass2android/Resources/layout-v14/password.xml
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout/InViewButton.xml b/src/keepass2android/Resources/layout/InViewButton.xml
new file mode 100644
index 00000000..cd97dd8a
--- /dev/null
+++ b/src/keepass2android/Resources/layout/InViewButton.xml
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout/entry_edit.xml b/src/keepass2android/Resources/layout/entry_edit.xml
index dbd389da..4a823675 100644
--- a/src/keepass2android/Resources/layout/entry_edit.xml
+++ b/src/keepass2android/Resources/layout/entry_edit.xml
@@ -39,8 +39,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/entry_title"
- style="@style/EntryFieldHeader"
- />
+ style="@style/EntryFieldHeader" />
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout/entry_extrastring_title.xml b/src/keepass2android/Resources/layout/entry_extrastring_title.xml
new file mode 100644
index 00000000..4f0b2bb7
--- /dev/null
+++ b/src/keepass2android/Resources/layout/entry_extrastring_title.xml
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout/entry_extrastring_value.xml b/src/keepass2android/Resources/layout/entry_extrastring_value.xml
new file mode 100644
index 00000000..12d7a0ef
--- /dev/null
+++ b/src/keepass2android/Resources/layout/entry_extrastring_value.xml
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout/entry_section.xml b/src/keepass2android/Resources/layout/entry_section.xml
index fe51fdb4..e8ca7241 100644
--- a/src/keepass2android/Resources/layout/entry_section.xml
+++ b/src/keepass2android/Resources/layout/entry_section.xml
@@ -14,7 +14,6 @@
android:id="@+id/value"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:textIsSelectable="true"
android:typeface="monospace"
android:text="Value"
android:layout_marginLeft="30dp"
diff --git a/src/keepass2android/Resources/layout/entry_view_test.xml b/src/keepass2android/Resources/layout/entry_view_test.xml
new file mode 100644
index 00000000..5ab5565c
--- /dev/null
+++ b/src/keepass2android/Resources/layout/entry_view_test.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout/file_selection.xml b/src/keepass2android/Resources/layout/file_selection.xml
index 6d07d333..1554268c 100644
--- a/src/keepass2android/Resources/layout/file_selection.xml
+++ b/src/keepass2android/Resources/layout/file_selection.xml
@@ -1,57 +1,17 @@
+ android:layout_height="fill_parent"
+ android:layout_margin="12dip">
-
-
+ android:layout_height="wrap_content"
+ android:layout_below="@id/file_listtop" />
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout/file_selection_buttons.xml b/src/keepass2android/Resources/layout/file_selection_buttons.xml
new file mode 100644
index 00000000..57664f8f
--- /dev/null
+++ b/src/keepass2android/Resources/layout/file_selection_buttons.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout/file_selection_filename.xml b/src/keepass2android/Resources/layout/file_selection_filename.xml
index 1736dbe6..dc156a0f 100644
--- a/src/keepass2android/Resources/layout/file_selection_filename.xml
+++ b/src/keepass2android/Resources/layout/file_selection_filename.xml
@@ -1,17 +1,12 @@
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/keepass2android/Resources/layout/file_selection_no_recent.xml b/src/keepass2android/Resources/layout/file_selection_no_recent.xml
index 50b60e13..4c7c3f25 100644
--- a/src/keepass2android/Resources/layout/file_selection_no_recent.xml
+++ b/src/keepass2android/Resources/layout/file_selection_no_recent.xml
@@ -1,59 +1,22 @@
-
+
-
+
-
-
-
+ android:layout_height="fill_parent">
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/keepass2android/Resources/values-v11/colors.xml b/src/keepass2android/Resources/values-v14/colors.xml
similarity index 86%
rename from src/keepass2android/Resources/values-v11/colors.xml
rename to src/keepass2android/Resources/values-v14/colors.xml
index 69bb12ca..676f76aa 100644
--- a/src/keepass2android/Resources/values-v11/colors.xml
+++ b/src/keepass2android/Resources/values-v14/colors.xml
@@ -1,26 +1,28 @@
-
-
-
- #0000dd
- #333333
- #555555
- #000000
-
-
+
+
+
+ #0000dd
+ #333333
+ #00555555
+ #000000
+ #a8a8a8
+ #303030
+
+
diff --git a/src/keepass2android/Resources/values-v14/styles.xml b/src/keepass2android/Resources/values-v14/styles.xml
new file mode 100644
index 00000000..95c156bf
--- /dev/null
+++ b/src/keepass2android/Resources/values-v14/styles.xml
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/keepass2android/Resources/values/config.xml b/src/keepass2android/Resources/values/config.xml
index 5fa75a1f..5225a2a1 100644
--- a/src/keepass2android/Resources/values/config.xml
+++ b/src/keepass2android/Resources/values/config.xml
@@ -42,6 +42,7 @@
timeout_key
TanExpiresOnUse_key
defaultUsername
+ databaseName
binaryDirectory
/mnt/sdcard/keepass2android/binaries/
true
@@ -69,7 +70,7 @@
- 300000
- -1
- 28
+ 20
- 15
- 20
diff --git a/src/keepass2android/Resources/values/strings.xml b/src/keepass2android/Resources/values/strings.xml
index 8c34bd93..86abd4b6 100644
--- a/src/keepass2android/Resources/values/strings.xml
+++ b/src/keepass2android/Resources/values/strings.xml
@@ -148,6 +148,7 @@
Encryption Rounds
Higher encryption rounds provide additional protection against brute force attacks, but can really slow down loading and saving.
rounds
+ Database name
Default user name for new entries
Saving database…
Space
diff --git a/src/keepass2android/Resources/values/styles.xml b/src/keepass2android/Resources/values/styles.xml
index 5da8c0a6..9fa6a33f 100644
--- a/src/keepass2android/Resources/values/styles.xml
+++ b/src/keepass2android/Resources/values/styles.xml
@@ -52,7 +52,8 @@
-
+
diff --git a/src/keepass2android/Resources/xml/preferences.xml b/src/keepass2android/Resources/xml/preferences.xml
index d89ecec7..c5f2e4e5 100644
--- a/src/keepass2android/Resources/xml/preferences.xml
+++ b/src/keepass2android/Resources/xml/preferences.xml
@@ -23,6 +23,10 @@
android:key="@string/db_key"
android:title="@string/database"
android:summary="@string/menu_db_settings">
+
+
+ /// See comments to EntryEditActivityState.
+ ///
+ internal static EntryEditActivityState entryEditActivityState = null;
public static FileDbHelper fileDbHelper;
diff --git a/src/keepass2android/fileselect/FileSelectActivity.cs b/src/keepass2android/fileselect/FileSelectActivity.cs
index f1a824a0..c2cc4bbc 100644
--- a/src/keepass2android/fileselect/FileSelectActivity.cs
+++ b/src/keepass2android/fileselect/FileSelectActivity.cs
@@ -45,13 +45,6 @@ namespace keepass2android
public class FileSelectActivity : ListActivity
{
-
- enum CurrentAction { None, OpenFile, OpenURL, Create, CreateImport };
-
-
-
- CurrentAction currentAction = CurrentAction.None;
-
public FileSelectActivity (IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)
{
@@ -65,22 +58,147 @@ namespace keepass2android
public const String UrlToSearch_key = "UrlToSearch";
const String BundleKey_UrlToSearchFor = "UrlToSearch";
- const string BundleKey_CurrentAction = "CurrentAction";
const string BundleKey_RecentMode = "RecentMode";
private FileDbHelper mDbHelper;
private String mUrlToSearch;
private bool recentMode = false;
-
+ view.FileSelectButtons fileSelectButtons;
bool createdWithActivityResult = false;
-
IOConnectionInfo loadIoc(string defaultFileName)
{
return mDbHelper.cursorToIoc(mDbHelper.fetchFileByName(defaultFileName));
}
-
+
+ void ShowFilenameDialog(bool showOpenButton, bool showCreateButton, bool showBrowseButton, string defaultFilename, string detailsText, int requestCodeBrowse)
+ {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.SetView(LayoutInflater.Inflate(Resource.Layout.file_selection_filename, null));
+ Dialog dialog = builder.Create();
+ dialog.Show();
+
+ Button openButton = (Button)dialog.FindViewById(Resource.Id.open);
+ Button createButton = (Button)dialog.FindViewById(Resource.Id.create);
+ TextView enterFilenameDetails = (TextView)dialog.FindViewById(Resource.Id.label_open_by_filename_details);
+ openButton.Visibility = showOpenButton ? ViewStates.Visible : ViewStates.Gone;
+ createButton.Visibility = showCreateButton ? ViewStates.Visible : ViewStates.Gone;
+ // Set the initial value of the filename
+ EditText editFilename = (EditText)dialog.FindViewById(Resource.Id.file_filename);
+ editFilename.Text = defaultFilename;
+ enterFilenameDetails.Text = detailsText;
+ enterFilenameDetails.Visibility = enterFilenameDetails.Text == "" ? ViewStates.Gone : ViewStates.Visible;
+
+ // Open button
+
+ openButton.Click += ( sender, evt) => {
+ String fileName = ((EditText)dialog.FindViewById(Resource.Id.file_filename)).Text;
+
+ IOConnectionInfo ioc = new IOConnectionInfo() {
+ Path = fileName
+ };
+
+ LaunchPasswordActivityForIoc(ioc);
+ };
+
+
+
+ // Create button
+ createButton.Click += (sender, evt) => {
+ String filename = Util.getEditText(this,
+ Resource.Id.file_filename);
+
+ //TODO: allow non-local files?
+
+ // Make sure file name exists
+ if (filename.Length == 0)
+ {
+ Toast
+ .MakeText(this,
+ Resource.String.error_filename_required,
+ ToastLength.Long).Show();
+ return;
+ }
+
+ // Try to create the file
+ Java.IO.File file = new Java.IO.File(filename);
+ try
+ {
+ if (file.Exists())
+ {
+ Toast.MakeText(this,
+ Resource.String.error_database_exists,
+ ToastLength.Long).Show();
+ return;
+ }
+ Java.IO.File parent = file.ParentFile;
+
+ if (parent == null || (parent.Exists() && ! parent.IsDirectory))
+ {
+ Toast.MakeText(this,
+ Resource.String.error_invalid_path,
+ ToastLength.Long).Show();
+ return;
+ }
+
+ if (! parent.Exists())
+ {
+ // Create parent dircetory
+ if (! parent.Mkdirs())
+ {
+ Toast.MakeText(this,
+ Resource.String.error_could_not_create_parent,
+ ToastLength.Long).Show();
+ return;
+
+ }
+ }
+
+ file.CreateNewFile();
+ } catch (Java.IO.IOException ex)
+ {
+ Toast.MakeText(
+ this,
+ GetText(Resource.String.error_file_not_create) + " "
+ + ex.LocalizedMessage,
+ ToastLength.Long).Show();
+ return;
+ }
+
+ // Prep an object to collect a password once the database has
+ // been created
+ CollectPassword password = new CollectPassword(
+ new LaunchGroupActivity(IOConnectionInfo.FromPath(filename), this), this);
+
+ // Create the new database
+ CreateDB create = new CreateDB(this, IOConnectionInfo.FromPath(filename), password, true);
+ ProgressTask createTask = new ProgressTask(
+ this, create,
+ Resource.String.progress_create);
+ createTask.run();
+
+
+ };
+
+ Button cancelButton = (Button)dialog.FindViewById(Resource.Id.fnv_cancel);
+ cancelButton.Click += (sender, e) => {
+ dialog.Dismiss();
+ };
+
+ ImageButton browseButton = (ImageButton)dialog.FindViewById(Resource.Id.browse_button);
+ if (!showBrowseButton)
+ {
+ browseButton.Visibility = ViewStates.Invisible;
+ }
+ browseButton.Click += (sender, evt) => {
+ string filename = ((EditText)dialog.FindViewById(Resource.Id.file_filename)).Text;
+
+ Util.showBrowseDialog(filename, this, requestCodeBrowse);
+
+ };
+
+ }
protected override void OnCreate(Bundle savedInstanceState)
{
@@ -98,34 +216,30 @@ namespace keepass2android
if (mDbHelper.hasRecentFiles())
{
recentMode = true;
+
SetContentView(Resource.Layout.file_selection);
+ fileSelectButtons = new keepass2android.view.FileSelectButtons(this);
+ ((ListView)FindViewById(Android.Resource.Id.List)).AddFooterView(
+ fileSelectButtons);
+
} else
{
SetContentView(Resource.Layout.file_selection_no_recent);
-
+ fileSelectButtons = (view.FileSelectButtons)FindViewById(Resource.Id.file_select);
}
- View fnform = FindViewById(Resource.Id.filename_form);
- fnform.Visibility = ViewStates.Gone;
- Button openButton = (Button)FindViewById(Resource.Id.open);
- Button createButton = (Button)FindViewById(Resource.Id.create);
- TextView enterFilenameDetails = (TextView)FindViewById(Resource.Id.label_open_by_filename_details);
- //OPEN FILE
+
Button openFileButton = (Button)FindViewById(Resource.Id.start_open_file);
+
+
EventHandler openFileButtonClick = (object sender, EventArgs e) =>
{
- if (currentAction == CurrentAction.OpenFile)
- return;
- currentAction = CurrentAction.OpenFile;
- fnform.Visibility = ViewStates.Visible;
- openButton.Visibility = ViewStates.Visible;
- createButton.Visibility = ViewStates.Gone;
- // Set the initial value of the filename
- EditText filename = (EditText)FindViewById(Resource.Id.file_filename);
- filename.Text = Android.OS.Environment.ExternalStorageDirectory + GetString(Resource.String.default_file_path);
- enterFilenameDetails.Text = "";//GetString(Resource.String.enter_filename_details_file);
- enterFilenameDetails.Visibility = enterFilenameDetails.Text == "" ? ViewStates.Gone : ViewStates.Visible;
+ string defaultFilename = Android.OS.Environment.ExternalStorageDirectory + GetString(Resource.String.default_file_path);
+ string detailsText = "";
+ ShowFilenameDialog(true, false, true, defaultFilename, detailsText, Intents.REQUEST_CODE_FILE_BROWSE_FOR_OPEN);
+
+
};
openFileButton.Click += openFileButtonClick;
//OPEN URL
@@ -137,16 +251,7 @@ namespace keepass2android
EventHandler openUrlButtonClick = (object sender, EventArgs e) =>
{
- if (currentAction == CurrentAction.OpenURL)
- return;
- currentAction = CurrentAction.OpenURL;
- fnform.Visibility = ViewStates.Visible;
- openButton.Visibility = ViewStates.Visible;
- createButton.Visibility = ViewStates.Gone;
- EditText filename = (EditText)FindViewById(Resource.Id.file_filename);
- filename.Text = "";
- enterFilenameDetails.Text = GetString(Resource.String.enter_filename_details_url);
- enterFilenameDetails.Visibility = enterFilenameDetails.Text == "" ? ViewStates.Gone : ViewStates.Visible;
+ ShowFilenameDialog(true, false, false, "", GetString(Resource.String.enter_filename_details_url), Intents.REQUEST_CODE_FILE_BROWSE_FOR_OPEN);
};
openUrlButton.Click += openUrlButtonClick;
@@ -154,17 +259,7 @@ namespace keepass2android
Button createNewButton = (Button)FindViewById(Resource.Id.start_create);
EventHandler createNewButtonClick = (object sender, EventArgs e) =>
{
- if (currentAction == CurrentAction.Create)
- return;
- currentAction = CurrentAction.Create;
- fnform.Visibility = ViewStates.Visible;
- openButton.Visibility = ViewStates.Gone;
- createButton.Visibility = ViewStates.Visible;
- // Set the initial value of the filename
- EditText filename = (EditText)FindViewById(Resource.Id.file_filename);
- filename.Text = Android.OS.Environment.ExternalStorageDirectory + GetString(Resource.String.default_file_path);
- enterFilenameDetails.Text = "";//GetString(Resource.String.enter_filename_details_create);
- enterFilenameDetails.Visibility = enterFilenameDetails.Text == "" ? ViewStates.Gone : ViewStates.Visible;
+ ShowFilenameDialog(false, true, true, Android.OS.Environment.ExternalStorageDirectory + GetString(Resource.String.default_file_path), "", Intents.REQUEST_CODE_FILE_BROWSE_FOR_CREATE);
};
createNewButton.Click += createNewButtonClick;
@@ -172,10 +267,6 @@ namespace keepass2android
Button createImportButton = (Button)FindViewById(Resource.Id.start_create_import);
createImportButton.Click += (object sender, EventArgs e) =>
{
- if (currentAction == CurrentAction.CreateImport)
- return;
- currentAction = CurrentAction.CreateImport;
- fnform.Visibility = ViewStates.Visible;
openButton.Visibility = ViewStates.Gone;
createButton.Visibility = ViewStates.Visible;
enterFilenameDetails.Text = GetString(Resource.String.enter_filename_details_create_import);
@@ -185,115 +276,6 @@ namespace keepass2android
filename.Text = Android.OS.Environment.ExternalStorageDirectory + GetString(Resource.String.default_file_path);
};*/
- // Open button
-
- openButton.Click += ( sender, evt) => {
- String fileName = Util.getEditText(this, Resource.Id.file_filename);
-
- IOConnectionInfo ioc = new IOConnectionInfo() {
- Path = fileName
- };
-
- LaunchPasswordActivityForIoc(ioc);
- };
-
-
-
- // Create button
-
- createButton.Click += (sender, evt) => {
- String filename = Util.getEditText(this,
- Resource.Id.file_filename);
-
- //TODO: allow non-local files?
-
- // Make sure file name exists
- if (filename.Length == 0)
- {
- Toast
- .MakeText(this,
- Resource.String.error_filename_required,
- ToastLength.Long).Show();
- return;
- }
-
- // Try to create the file
- Java.IO.File file = new Java.IO.File(filename);
- try
- {
- if (file.Exists())
- {
- Toast.MakeText(this,
- Resource.String.error_database_exists,
- ToastLength.Long).Show();
- return;
- }
- Java.IO.File parent = file.ParentFile;
-
- if (parent == null || (parent.Exists() && ! parent.IsDirectory))
- {
- Toast.MakeText(this,
- Resource.String.error_invalid_path,
- ToastLength.Long).Show();
- return;
- }
-
- if (! parent.Exists())
- {
- // Create parent dircetory
- if (! parent.Mkdirs())
- {
- Toast.MakeText(this,
- Resource.String.error_could_not_create_parent,
- ToastLength.Long).Show();
- return;
-
- }
- }
-
- file.CreateNewFile();
- } catch (Java.IO.IOException ex)
- {
- Toast.MakeText(
- this,
- GetText(Resource.String.error_file_not_create) + " "
- + ex.LocalizedMessage,
- ToastLength.Long).Show();
- return;
- }
-
- // Prep an object to collect a password once the database has
- // been created
- CollectPassword password = new CollectPassword(
- new LaunchGroupActivity(IOConnectionInfo.FromPath(filename), this), this);
-
- // Create the new database
- CreateDB create = new CreateDB(this, IOConnectionInfo.FromPath(filename), password, true);
- ProgressTask createTask = new ProgressTask(
- this, create,
- Resource.String.progress_create);
- createTask.run();
-
-
- };
-
- Button cancelButton = (Button)FindViewById(Resource.Id.fnv_cancel);
- cancelButton.Click += (sender, e) => {
- currentAction = CurrentAction.None;
- fnform.Visibility = ViewStates.Gone;
- EditText editText = (EditText)FindViewById(Resource.Id.file_filename);
- InputMethodManager imm = (InputMethodManager)GetSystemService(
- Context.InputMethodService);
- imm.HideSoftInputFromWindow(editText.WindowToken, 0);
- };
-
- ImageButton browseButton = (ImageButton)FindViewById(Resource.Id.browse_button);
- browseButton.Click += (sender, evt) => {
- string filename = Util.getEditText(this, Resource.Id.file_filename);
-
- Util.showBrowseDialog(filename, this);
-
- };
fillData();
@@ -301,29 +283,18 @@ namespace keepass2android
if (savedInstanceState != null)
{
- CurrentAction newCurrentAction = (CurrentAction)savedInstanceState.GetInt(BundleKey_CurrentAction, (int)currentAction);
mUrlToSearch = savedInstanceState.GetString(BundleKey_UrlToSearchFor, null);
recentMode = savedInstanceState.GetBoolean(BundleKey_RecentMode, recentMode);
- if (newCurrentAction == CurrentAction.OpenFile)
- {
- openFileButtonClick(openFileButton, new EventArgs());
- } else if (newCurrentAction == CurrentAction.OpenURL)
- {
- openUrlButtonClick(openUrlButton, new EventArgs());
-
- } else if (newCurrentAction == CurrentAction.Create)
- {
- createNewButtonClick(createNewButton, new EventArgs());
- }
+
}
+
}
protected override void OnSaveInstanceState(Bundle outState)
{
base.OnSaveInstanceState(outState);
- outState.PutInt(BundleKey_CurrentAction, (int)currentAction);
outState.PutString(BundleKey_UrlToSearchFor, mUrlToSearch);
outState.PutBoolean(BundleKey_RecentMode, recentMode);
}
@@ -387,6 +358,8 @@ namespace keepass2android
// Now create a simple cursor adapter and set it to display
SimpleCursorAdapter notes = new SimpleCursorAdapter(this,
Resource.Layout.file_row, filesCursor, from, to);
+
+
ListAdapter = notes;
}
@@ -456,7 +429,9 @@ namespace keepass2android
fillData();
- if (requestCode == Intents.REQUEST_CODE_FILE_BROWSE && resultCode == Result.Ok) {
+ if ( (requestCode == Intents.REQUEST_CODE_FILE_BROWSE_FOR_CREATE
+ || requestCode == Intents.REQUEST_CODE_FILE_BROWSE_FOR_OPEN)
+ && resultCode == Result.Ok) {
String filename = data.DataString;
if (filename != null) {
if (filename.StartsWith("file://")) {
@@ -464,10 +439,20 @@ namespace keepass2android
}
filename = Java.Net.URLDecoder.Decode(filename);
-
- EditText fn = (EditText) FindViewById(Resource.Id.file_filename);
- fn.Text = filename;
-
+
+ if (requestCode == Intents.REQUEST_CODE_FILE_BROWSE_FOR_OPEN)
+ {
+ IOConnectionInfo ioc = new IOConnectionInfo() {
+ Path = filename
+ };
+
+ LaunchPasswordActivityForIoc(ioc);
+ }
+
+ if (requestCode == Intents.REQUEST_CODE_FILE_BROWSE_FOR_CREATE)
+ {
+ ShowFilenameDialog(false, true, true, filename, "", Intents.REQUEST_CODE_FILE_BROWSE_FOR_CREATE);
+ }
}
}
@@ -488,8 +473,8 @@ namespace keepass2android
Finish();
}
- view.FileNameView fnv = (view.FileNameView)FindViewById(Resource.Id.file_select);
- fnv.updateExternalStorageWarning();
+
+ fileSelectButtons.updateExternalStorageWarning();
if (!createdWithActivityResult)
{
diff --git a/src/keepass2android/intents/Intents.cs b/src/keepass2android/intents/Intents.cs
index d37a3b96..9a87ec53 100644
--- a/src/keepass2android/intents/Intents.cs
+++ b/src/keepass2android/intents/Intents.cs
@@ -37,7 +37,10 @@ namespace keepass2android
public const String COPY_PASSWORD = "keepass2android.copy_password";
public const String FILE_BROWSE = "org.openintents.action.PICK_FILE";
- public const int REQUEST_CODE_FILE_BROWSE = 987321;
+ public const int REQUEST_CODE_FILE_BROWSE_FOR_OPEN = 987321;
+ public const int REQUEST_CODE_FILE_BROWSE_FOR_CREATE = 987322;
+ public const int REQUEST_CODE_FILE_BROWSE_FOR_BINARY = 987323;
+ public const int REQUEST_CODE_FILE_BROWSE_FOR_KEYFILE = 987324;
public const String SHOW_NOTIFICATION = "keepass2android.show_notification";
}
diff --git a/src/keepass2android/keepass2android.csproj b/src/keepass2android/keepass2android.csproj
index f6b05dd7..5111a87b 100644
--- a/src/keepass2android/keepass2android.csproj
+++ b/src/keepass2android/keepass2android.csproj
@@ -88,7 +88,6 @@
-
@@ -158,6 +157,8 @@
+
+
@@ -189,9 +190,6 @@
False
-
- False
-
False
@@ -259,6 +257,24 @@
False
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
@@ -518,12 +534,9 @@
-
-
-
@@ -580,10 +593,44 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -602,14 +649,12 @@
-
-
@@ -631,6 +676,8 @@
+
+
diff --git a/src/keepass2android/search/SearchActivity.cs b/src/keepass2android/search/SearchActivity.cs
index 1c5775db..a2c1da1d 100644
--- a/src/keepass2android/search/SearchActivity.cs
+++ b/src/keepass2android/search/SearchActivity.cs
@@ -31,7 +31,7 @@ using keepass2android.search;
namespace keepass2android
{
- [Activity (Label = "@string/short_app_name", Theme="@style/Base")]
+ [Activity (Label = "@string/app_name", Theme="@style/Base")]
public class SearchActivity : LifecycleDebugActivity
{
bool GetCheckBoxValue(int resId)
@@ -63,8 +63,6 @@ namespace keepass2android
ImageButton btnSearch = (ImageButton)FindViewById(Resource.Id.search_button);
- //TODO: "Enter"-Key should run the search
-
btnSearch.Click += (object sender, EventArgs e) =>
{
PerformSearch();
diff --git a/src/keepass2android/search/SearchResults.cs b/src/keepass2android/search/SearchResults.cs
index 1022a2c4..c78808a3 100644
--- a/src/keepass2android/search/SearchResults.cs
+++ b/src/keepass2android/search/SearchResults.cs
@@ -54,11 +54,13 @@ namespace keepass2android.search
if ( ! mDb.Open ) {
Finish();
}
-
+
query(getSearch(Intent));
+
}
+
private void query (SearchParameters searchParams)
{
try {
diff --git a/src/keepass2android/settings/AppSettingsActivity.cs b/src/keepass2android/settings/AppSettingsActivity.cs
index 8eec2342..a6b5c1dc 100644
--- a/src/keepass2android/settings/AppSettingsActivity.cs
+++ b/src/keepass2android/settings/AppSettingsActivity.cs
@@ -92,7 +92,33 @@ namespace keepass2android
ProgressTask pt = new ProgressTask(this, save, Resource.String.saving_database);
pt.run();
};
+
+ Preference databaseName = FindPreference(GetString(Resource.String.database_name_key));
+ ((EditTextPreference)databaseName).EditText.Text = db.pm.Name;
+ ((EditTextPreference)databaseName).Text = db.pm.Name;
+ databaseName.PreferenceChange += (object sender, Preference.PreferenceChangeEventArgs e) =>
+ {
+ DateTime previousNameChanged = db.pm.NameChanged;
+ String previousName = db.pm.Name;
+ db.pm.Name = e.NewValue.ToString();
+
+ Handler handler = new Handler();
+
+ SaveDB save = new SaveDB(this, App.getDB(), new ActionOnFinish( (success, message) =>
+ {
+ if (!success)
+ {
+ db.pm.Name = previousName;
+ db.pm.NameChanged = previousNameChanged;
+ Toast.MakeText(this, message, ToastLength.Long).Show();
+ }
+ }));
+ ProgressTask pt = new ProgressTask(this, save, Resource.String.saving_database);
+ pt.run();
+ };
+
+
setRounds(db, rounds);
Preference algorithm = FindPreference(GetString(Resource.String.algorithm_key));
diff --git a/src/keepass2android/views/EntryEditSection.cs b/src/keepass2android/views/EntryEditSection.cs
index 64e60886..387a5691 100644
--- a/src/keepass2android/views/EntryEditSection.cs
+++ b/src/keepass2android/views/EntryEditSection.cs
@@ -31,7 +31,7 @@ using KeePassLib.Security;
namespace keepass2android.view
{
- public class EntryEditSection : RelativeLayout
+ public class EntryEditSection : LinearLayout
{
public event EventHandler ContentChanged;
@@ -58,15 +58,20 @@ namespace keepass2android.view
}
- public void setData(String title, ProtectedString value) {
+ public void setData(String title, ProtectedString value)
+ {
setText(Resource.Id.title, title);
setText(Resource.Id.value, value.ReadString());
- CheckBox cb = (CheckBox) FindViewById(Resource.Id.protection);
- cb.Checked = value.IsProtected;
- cb.CheckedChange += (sender, e) => {if (ContentChanged != null)
- ContentChanged(this, new EventArgs());
- };
+ CheckBox cb = (CheckBox)FindViewById(Resource.Id.protection);
+ if (cb != null)
+ {
+ cb.Checked = value.IsProtected;
+ cb.CheckedChange += (sender, e) => {
+ if (ContentChanged != null)
+ ContentChanged(this, new EventArgs());
+ };
+ }
}
public ImageButton getDeleteButton()
diff --git a/src/keepass2android/views/EntrySection.cs b/src/keepass2android/views/EntrySection.cs
index eff78a47..7edfa99d 100644
--- a/src/keepass2android/views/EntrySection.cs
+++ b/src/keepass2android/views/EntrySection.cs
@@ -58,7 +58,12 @@ namespace keepass2android.view
inflater.Inflate(Resource.Layout.entry_section, this);
setText(Resource.Id.title, title);
+
+ FindViewById(Resource.Id.value).Invalidate();
setText(Resource.Id.value, value);
+ //TODO: this seems to cause a bug when rotating the device (and the activity gets destroyed)
+ //After recreating the activity, the value fields all have the same content.
+ FindViewById(Resource.Id.value).SetTextIsSelectable(true);
}
private void setText(int resId, String str) {
diff --git a/src/keepass2android/views/FileNameView.cs b/src/keepass2android/views/FileSelectButtons.cs
similarity index 75%
rename from src/keepass2android/views/FileNameView.cs
rename to src/keepass2android/views/FileSelectButtons.cs
index d5d87708..aea972c2 100644
--- a/src/keepass2android/views/FileNameView.cs
+++ b/src/keepass2android/views/FileSelectButtons.cs
@@ -1,81 +1,80 @@
-/*
-This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
-
- Keepass2Android 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.
-
- Keepass2Android 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.
-
- You should have received a copy of the GNU General Public License
- along with Keepass2Android. If not, see .
- */
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Android.App;
-using Android.Content;
-using Android.OS;
-using Android.Runtime;
-using Android.Views;
-using Android.Widget;
-
-namespace keepass2android.view
-{
- public class FileNameView : RelativeLayout {
-
- public FileNameView(Context context):this(context,null) {
-
- }
-
- public FileNameView(Context context, Android.Util.IAttributeSet attrs)
- :base(context, attrs)
- {
- inflate(context);
- }
-
- public FileNameView (IntPtr javaReference, JniHandleOwnership transfer)
- : base(javaReference, transfer)
- {
-
- }
-
- private void inflate(Context context) {
- LayoutInflater inflater = (LayoutInflater) context.GetSystemService(Context.LayoutInflaterService);
- inflater.Inflate(Resource.Layout.file_selection_filename, this);
- }
-
- public void updateExternalStorageWarning() {
- int warning = -1;
- String state = Android.OS.Environment.ExternalStorageState;
- if (state.Equals(Android.OS.Environment.MediaMountedReadOnly)) {
- warning = Resource.String.warning_read_only;
- } else if (!state.Equals(Android.OS.Environment.MediaMounted)) {
- warning = Resource.String.warning_unmounted;
- }
-
- TextView tv = (TextView) FindViewById(Resource.Id.label_warning);
- TextView label = (TextView) FindViewById(Resource.Id.label_open_by_filename);
- RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(LayoutParams.FillParent, LayoutParams.WrapContent);
-
- if (warning != -1) {
- tv.SetText(warning);
- tv.Visibility = ViewStates.Visible;
-
- lp.AddRule(LayoutRules.Below, Resource.Id.label_warning);
- } else {
- tv.Visibility = ViewStates.Invisible;
-
- }
- label.LayoutParameters = lp;
- }
- }
-}
-
+/*
+This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.
+
+ Keepass2Android 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.
+
+ Keepass2Android 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.
+
+ You should have received a copy of the GNU General Public License
+ along with Keepass2Android. If not, see .
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+
+namespace keepass2android.view
+{
+ public class FileSelectButtons : RelativeLayout {
+
+ public FileSelectButtons(Context context):this(context,null) {
+
+ }
+
+ public FileSelectButtons(Context context, Android.Util.IAttributeSet attrs)
+ :base(context, attrs)
+ {
+ inflate(context);
+ }
+
+ public FileSelectButtons (IntPtr javaReference, JniHandleOwnership transfer)
+ : base(javaReference, transfer)
+ {
+
+ }
+
+ private void inflate(Context context) {
+ LayoutInflater inflater = (LayoutInflater) context.GetSystemService(Context.LayoutInflaterService);
+ inflater.Inflate(Resource.Layout.file_selection_buttons, this);
+ }
+
+ public void updateExternalStorageWarning() {
+ int warning = -1;
+ String state = Android.OS.Environment.ExternalStorageState;
+ if (state.Equals(Android.OS.Environment.MediaMountedReadOnly)) {
+ warning = Resource.String.warning_read_only;
+ } else if (!state.Equals(Android.OS.Environment.MediaMounted)) {
+ warning = Resource.String.warning_unmounted;
+ }
+
+ TextView tv = (TextView) FindViewById(Resource.Id.label_warning);
+
+
+ if (warning != -1) {
+ tv.SetText(warning);
+ tv.Visibility = ViewStates.Visible;
+
+
+ } else {
+ tv.Visibility = ViewStates.Invisible;
+
+ }
+
+ }
+ }
+}
+
diff --git a/src/keepass2android/views/GroupViewOnlyView.cs b/src/keepass2android/views/GroupViewOnlyView.cs
index 59a57d93..41a462e9 100644
--- a/src/keepass2android/views/GroupViewOnlyView.cs
+++ b/src/keepass2android/views/GroupViewOnlyView.cs
@@ -59,6 +59,8 @@ namespace keepass2android.view
View divider2 = FindViewById(Resource.Id.divider2);
divider2.Visibility = ViewStates.Invisible;
+
+ FindViewById(Resource.Id.bottom_bar).Visibility = ViewStates.Invisible;
View list = FindViewById(Android.Resource.Id.List);
LayoutParams lp = (RelativeLayout.LayoutParams) list.LayoutParameters;