From 77dc5040a23ad4a8ee0fa067dc72d469711c19b9 Mon Sep 17 00:00:00 2001 From: Philipp Crocoll Date: Sun, 31 Jan 2016 17:43:00 +0100 Subject: [PATCH] implemented "get regular version" button and kp2a-offline splash logo --- src/KeePass.sln | 5 ++-- .../FileStorageSelectionActivity.cs | 25 ++++++------------ ...wnloadstoragetypes.png => ic_storage_kp2a} | Bin ...adstoragetypes.png => ic_storage_kp2a.png} | Bin .../fileselect/FileSelectActivity.cs | 5 ++-- src/keepass2android/keepass2android.csproj | 16 +++++------ 6 files changed, 21 insertions(+), 30 deletions(-) rename src/keepass2android/Resources/drawable-mdpi/{downloadstoragetypes.png => ic_storage_kp2a} (100%) rename src/keepass2android/Resources/drawable-xhdpi/{downloadstoragetypes.png => ic_storage_kp2a.png} (100%) diff --git a/src/KeePass.sln b/src/KeePass.sln index e0ad92d3..2608e9a5 100644 --- a/src/KeePass.sln +++ b/src/KeePass.sln @@ -107,6 +107,7 @@ Global {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Release|x64.Build.0 = Release|Any CPU {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Any CPU.ActiveCfg = ReleaseNoNet|Any CPU {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Any CPU.Build.0 = ReleaseNoNet|Any CPU + {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Any CPU.Deploy.0 = ReleaseNoNet|Any CPU {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Mixed Platforms.ActiveCfg = ReleaseNoNet|Any CPU {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Mixed Platforms.Build.0 = ReleaseNoNet|Any CPU {A6CF8A86-37C1-4197-80FE-519DE2C842F5}.ReleaseNoNet|Mixed Platforms.Deploy.0 = ReleaseNoNet|Any CPU @@ -146,8 +147,8 @@ Global {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Release|Win32.ActiveCfg = Release|Any CPU {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.Release|x64.ActiveCfg = Release|Any CPU - {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Any CPU.ActiveCfg = Release|Any CPU - {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Any CPU.Build.0 = Release|Any CPU + {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Any CPU.ActiveCfg = ReleaseNoNet|Any CPU + {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Any CPU.Build.0 = ReleaseNoNet|Any CPU {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Mixed Platforms.ActiveCfg = ReleaseNoNet|Any CPU {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Mixed Platforms.Build.0 = ReleaseNoNet|Any CPU {53A9CB7F-6553-4BC0-B56B-9410BB2E59AA}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU diff --git a/src/keepass2android/FileStorageSelectionActivity.cs b/src/keepass2android/FileStorageSelectionActivity.cs index c9023df5..4c8f3e3b 100644 --- a/src/keepass2android/FileStorageSelectionActivity.cs +++ b/src/keepass2android/FileStorageSelectionActivity.cs @@ -126,9 +126,15 @@ namespace keepass2android var protocolId = _protocolIds[position]; btn.Tag = protocolId; + + + Drawable drawable = App.Kp2a.GetResourceDrawable("ic_storage_" + protocolId); - - String title = App.Kp2a.GetResourceString("filestoragename_" + protocolId); + + String title = + protocolId == "kp2a" ? App.Kp2a.GetResourceString("get_regular_version") + : + App.Kp2a.GetResourceString("filestoragename_" + protocolId); var str = new SpannableString(title); btn.TextFormatted = str; @@ -136,21 +142,6 @@ namespace keepass2android btn.SetCompoundDrawablesWithIntrinsicBounds(null, drawable, null, null); return btn; -#if NoNet - TODO: kp2a button -#endif - /* - if (_protocolIds[position] == "kp2a") - { - return new FileStorageViewKp2a(_context); - } - else - { - var view = new FileStorageView(_context, _protocolIds[position], position); - return view; - } - */ - } public override int Count diff --git a/src/keepass2android/Resources/drawable-mdpi/downloadstoragetypes.png b/src/keepass2android/Resources/drawable-mdpi/ic_storage_kp2a similarity index 100% rename from src/keepass2android/Resources/drawable-mdpi/downloadstoragetypes.png rename to src/keepass2android/Resources/drawable-mdpi/ic_storage_kp2a diff --git a/src/keepass2android/Resources/drawable-xhdpi/downloadstoragetypes.png b/src/keepass2android/Resources/drawable-xhdpi/ic_storage_kp2a.png similarity index 100% rename from src/keepass2android/Resources/drawable-xhdpi/downloadstoragetypes.png rename to src/keepass2android/Resources/drawable-xhdpi/ic_storage_kp2a.png diff --git a/src/keepass2android/fileselect/FileSelectActivity.cs b/src/keepass2android/fileselect/FileSelectActivity.cs index 91448a39..a29b084c 100644 --- a/src/keepass2android/fileselect/FileSelectActivity.cs +++ b/src/keepass2android/fileselect/FileSelectActivity.cs @@ -120,11 +120,10 @@ namespace keepass2android FindViewById(Resource.Id.recent_files).Visibility = ViewStates.Invisible; Android.Util.Log.Debug("KP2A", "Recent files invisible"); #if NoNet - TODO - ImageView imgView = FindViewById(Resource.Id.imglogo) as ImageView; + ImageView imgView = FindViewById(Resource.Id.splashlogo) as ImageView; if (imgView != null) { - imgView.SetImageDrawable(Resources.GetDrawable(Resource.Drawable.ic_keepass2android_nonet)); + imgView.SetImageDrawable(Resources.GetDrawable(Resource.Drawable.splashlogo_offline)); } #endif } diff --git a/src/keepass2android/keepass2android.csproj b/src/keepass2android/keepass2android.csproj index a5964f21..2cefcf1b 100644 --- a/src/keepass2android/keepass2android.csproj +++ b/src/keepass2android/keepass2android.csproj @@ -85,17 +85,17 @@ + + ..\packages\Xamarin.Android.Support.v7.MediaRouter.21.0.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll + - ..\packages\Xamarin.Android.Support.v4.23.1.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll + ..\packages\Xamarin.Android.Support.v4.22.2.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll - ..\packages\Xamarin.Android.Support.v7.AppCompat.23.1.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll - - - ..\packages\Xamarin.Android.Support.v7.RecyclerView.23.1.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll + ..\packages\Xamarin.Android.Support.v7.AppCompat.22.2.1.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll - ..\packages\Xamarin.Android.Support.Design.23.1.1.0\lib\MonoAndroid403\Xamarin.Android.Support.Design.dll + ..\packages\Xamarin.Android.Support.Design.22.2.1.0\lib\MonoAndroid403\Xamarin.Android.Support.Design.dll ..\packages\Xamarin.GooglePlayServices.Base.27.0.0.0\lib\MonoAndroid41\Xamarin.GooglePlayServices.Base.dll @@ -314,7 +314,7 @@ - + @@ -1558,7 +1558,7 @@ - +