fixed display issues in EntryActivity

This commit is contained in:
Philipp Crocoll 2014-05-11 13:21:28 +02:00
parent 9008785c69
commit a2dc7449d4
16 changed files with 367 additions and 516 deletions

View File

@ -17,8 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwofishCipher", "TwofishCip
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JavaFileStorageBindings", "JavaFileStorageBindings\JavaFileStorageBindings.csproj", "{48574278-4779-4B3A-A9E4-9CF1BC285D0B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppCompatV7Binding", "AppCompatV7Binding\AppCompatV7Binding.csproj", "{23233A28-D74F-4BF8-B4D8-834060840BD7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidFileChooserBinding", "AndroidFileChooserBinding\AndroidFileChooserBinding.csproj", "{3C0F7FE5-639F-4422-A087-8B26CF862D1B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KP2AKdbLibraryBinding", "KP2AKdbLibraryBinding\KP2AKdbLibraryBinding.csproj", "{70D3844A-D9FA-4A64-B205-A84C6A822196}"
@ -210,24 +208,6 @@ Global
{48574278-4779-4B3A-A9E4-9CF1BC285D0B}.ReleaseNoNet|Mixed Platforms.Build.0 = ReleaseNoNet|Any CPU
{48574278-4779-4B3A-A9E4-9CF1BC285D0B}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
{48574278-4779-4B3A-A9E4-9CF1BC285D0B}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Debug|Win32.ActiveCfg = Debug|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Debug|x64.ActiveCfg = Debug|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Release|Any CPU.Build.0 = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Release|Win32.ActiveCfg = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.Release|x64.ActiveCfg = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.ReleaseNoNet|Any CPU.ActiveCfg = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.ReleaseNoNet|Any CPU.Build.0 = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.ReleaseNoNet|Mixed Platforms.ActiveCfg = ReleaseNoNet|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.ReleaseNoNet|Mixed Platforms.Build.0 = ReleaseNoNet|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
{23233A28-D74F-4BF8-B4D8-834060840BD7}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
{3C0F7FE5-639F-4422-A087-8B26CF862D1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C0F7FE5-639F-4422-A087-8B26CF862D1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C0F7FE5-639F-4422-A087-8B26CF862D1B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU

View File

@ -572,7 +572,7 @@ namespace keepass2android
private void PopulateBinaries()
{
ViewGroup binariesGroup = (ViewGroup) FindViewById(Resource.Id.binaries);
foreach (KeyValuePair<string, string> pair in new Dictionary<string, string>() {{"abc", ""}, {"test.png", "uia"}})
foreach (KeyValuePair<string, string> pair in new Dictionary<string, string>())
{
String key = pair.Key;

View File

@ -17,8 +17,8 @@
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<AndroidUseLatestPlatformSdk />
<TargetFrameworkVersion>v4.4</TargetFrameworkVersion>
<AndroidSupportedAbis>armeabi-v7a</AndroidSupportedAbis>
<TargetFrameworkVersion>v4.2</TargetFrameworkVersion>
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
<AndroidStoreUncompressedFileExtensions />
<MandroidI18n />
<JavaMaximumHeapSize />
@ -99,6 +99,7 @@
<AndroidResource Include="Resources\Layout\plugin_list.xml">
<SubType>AndroidResource</SubType>
</AndroidResource>
<AndroidResource Include="Resources\Layout\sftp_credentials.axml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\Main.axml" />
@ -126,7 +127,9 @@
<AndroidResource Include="Resources\Layout\ListViewPluginRow.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\plugin_details.xml" />
<AndroidResource Include="Resources\Layout\plugin_details.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\text_with_help.xml" />
@ -159,22 +162,6 @@
<ItemGroup>
<AndroidResource Include="Resources\Drawable\BlueButton.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Values-v14\styles_light.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Values-v14\colors.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Values-v14\styles.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Values-v14\styles_dark.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Drawable\btn_new_group.png" />
</ItemGroup>
@ -603,6 +590,117 @@
<ItemGroup>
<AndroidResource Include="Resources\Menu\entry.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\about.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\create_database.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\database_settings.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\donate.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\donate_bday.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\donate_bdaymissed.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\edit_extra_string_dialog.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\file_row.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\file_selection.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\file_selection_buttons.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\file_selection_filename.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\file_selection_no_recent.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\file_storage_setup.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\filestorage_selection.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\filestorage_selection_listitem.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\filestorage_selection_listitem_kp2a.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\generate_password.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\group_add_entry.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\group_edit.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\group_header.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\group_list_entry.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\icon.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\icon_picker.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\InViewButton.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\password.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\QuickUnlock.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\QuickUnlock_Unused.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\SaveButton.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\search.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\searchurlresults.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\searchurlresults_empty.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\set_password.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\sftpcredentials.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\StartScreenButtons.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Layout\url_credentials.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Values\styles_dark.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\Values\styles_light.xml" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="12" android:targetSdkVersion="19" />
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />
<application></application>
</manifest>

View File

@ -12,7 +12,7 @@
android:layout_height="wrap_content"
android:gravity="right"
style="@style/TextAppearance_Help"
android:textColor="@color/light_gray"
android:layout_alignParentRight="true"
android:background="?android:attr/selectableItemBackground"
/>

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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 <http://www.gnu.org/licenses/>.
-->
<resources>
<color name="blue_highlight">#0000dd</color>
<color name="group">#333333</color>
<color name="icon_background">#00555555</color>
<color name="icon_text">#000000</color>
<color name="light_gray">#a8a8a8</color>
<color name="dark_gray">#303030</color>
<color name="element_being_moved">#a8a8a8</color>
<color name="emphasis">#31b6e7</color>
<color name="emphasis2">#4f7a8a</color>
</resources>

View File

@ -1,188 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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 <http://www.gnu.org/licenses/>.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="GroupTextSmall">
<item name="@android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="GroupText">
<item name="@android:textColor">?android:attr/textColorPrimary</item>
<item name="@android:textSize">20sp</item>
</style>
<style name="GroupTextLarge">
<item name="@android:textColor">?android:attr/textColorPrimary</item>
<item name="@android:textSize">28sp</item>
</style>
<style name="ElementTextSmall">
<item name="@android:textSize">15sp</item>
</style>
<style name="ElementText">
<item name="@android:textSize">20sp</item>
</style>
<style name="ElementTextLarge">
<item name="@android:textSize">28sp</item>
</style>
<style name="GroupLabel">
</style>
<style name="WhiteOnBlack">
</style>
<style name="WhiteOnBlackSmall" parent="WhiteOnBlack">
</style>
<style name="WhiteOnDarkSmall" parent="WhiteOnBlack">
</style>
<style name="ElementTextTitle" parent="WhiteOnBlack">
</style>
<style name="EntryItem">
<item name="android:layout_marginLeft">12dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">16sp</item>
</style>
<style name="EntryFieldHeader">
<item name="android:drawableBottom">@drawable/section_header</item>
<item name="android:drawablePadding">2dp</item>
<item name="android:layout_marginLeft">12dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginBottom">3dp</item>
<item name="android:layout_marginTop">14dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">16sp</item>
<item name="android:textStyle">bold</item>
</style>
<style name="InfoHeader">
<item name="android:drawableBottom">@drawable/section_header</item>
<item name="android:drawablePadding">2dp</item>
<item name="android:layout_marginLeft">0dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginBottom">3dp</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">14sp</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BottomBarActionButton">
<item name="android:background">?android:attr/selectableItemBackground</item>
</style>
<style name="TextAppearance_EditEntry_Small">
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textAllCaps">true</item>
</style>
<style name="TextAppearance_EditEntry_LabelSmall" parent="TextAppearance_EditEntry_Small">
<item name="android:minHeight">24dip</item>
<item name="android:layout_width">144dip</item>
<item name="android:layout_marginTop">12dip</item>
<item name="android:layout_marginLeft">16dip</item>
<item name="android:layout_marginRight">16dip</item>
<item name="android:paddingLeft">8dip</item>
<item name="android:paddingRight">8dip</item>
<item name="android:layout_marginBottom">-12dip</item>
</style>
<style name="TextAppearance_EditEntry">
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textSize">18sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="TextAppearance_EditEntry_Value" parent="TextAppearance_EditEntry">
<item name="android:gravity">center_vertical</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginLeft">12dip</item>
</style>
<style name="TextAppearance_SmallHeading" parent="TextAppearance_EditEntry_Small">
<item name="android:minHeight">24dip</item>
<item name="android:layout_width">144dip</item>
<item name="android:layout_marginTop">12dip</item>
<item name="android:layout_marginRight">16dip</item>
<item name="android:paddingRight">8dip</item>
<item name="android:layout_marginBottom">-12dip</item>
</style>
<style name="TextAppearance_SubElement">
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textSize">18sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:gravity">center_vertical</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginLeft">12dip</item>
</style>
<style name="TextAppearance_Help">
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
<item name="android:textSize">24sp</item>
<item name="android:padding">12sp</item>
<item name="android:gravity">center_vertical</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginLeft">12dip</item>
</style>
<style name="EditEntryButton">
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
<item name="android:layout_marginTop">12dip</item>
<item name="android:layout_marginLeft">24dip</item>
<item name="android:layout_marginRight">24dip</item>
<item name="android:paddingLeft">8dip</item>
<item name="android:paddingRight">8dip</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
</style>
<style name="AdditionalStringLayout">
<item name="android:layout_marginLeft">24dip</item>
<item name="android:layout_marginRight">24dip</item>
</style>
<style name="MinusButton">
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:src">@drawable/ic_menu_remove_field_holo_light</item>
</style>
<style name="ExtraFieldHeader" parent="android:Widget.Holo.Light.TextView">
<item name="android:layout_marginLeft">16dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginBottom">3dp</item>
<item name="android:layout_marginTop">4dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">14sp</item>
<item name="android:textStyle">bold</item>
</style>
</resources>

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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 <http://www.gnu.org/licenses/>.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="BaseDark" parent="android:Theme.Holo">
<item name="TextColorGroup">?android:attr/textColorPrimary</item>
<item name="TextColorHeader">?android:attr/textColorPrimary</item>
<item name="TextColorItem">?android:attr/textColorSecondary</item>
<item name="CancelDrawable">@android:drawable/ic_menu_close_clear_cancel</item>
<item name="AddFieldDrawable">@drawable/ic_menu_add_field_holodark</item>
<item name="NewGroupDrawable">@drawable/btn_new_group_holodark</item>
<item name="NewEntryDrawable">@drawable/device_access_new_account_holodark</item>
<item name="OpenFileDrawable">@drawable/collections_collection_holodark</item>
<item name="CreateDbDrawable">@drawable/collections_new_label_holodark</item>
<item name="OpenUrlDrawable">@drawable/location_web_site_holodark</item>
<item name="ic_menu_add_field">@drawable/ic_menu_add_field_holodark</item>
<item name="ic_launcher_folder_small">@drawable/ic_launcher_folder_small</item>
<item name="ic_action_search_drawable">@drawable/ic_action_search_holodark</item>
<item name="NavigationAcceptDrawable">@drawable/navigation_accept_dark</item>
</style>
<style name="NoTitleBarDark" parent="BaseDark"></style>
<style name="BaseDark_Dialog" parent="android:Theme.Holo.Dialog" />
<style name="DialogDark" parent="BaseDark_Dialog"></style>
<style name="ThemeDark" parent="BaseDark"></style>
</resources>

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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 <http://www.gnu.org/licenses/>.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="BaseLight" parent="android:Theme.Holo.Light">
<item name="TextColorGroup">?android:attr/textColorPrimary</item>
<item name="TextColorHeader">?android:attr/textColorPrimary</item>
<item name="TextColorItem">?android:attr/textColorSecondary</item>
<item name="CancelDrawable">@android:drawable/ic_menu_close_clear_cancel</item>
<item name="AddFieldDrawable">@drawable/ic_menu_add_field_holo_light</item>
<item name="NewGroupDrawable">@drawable/btn_new_group</item>
<item name="NewEntryDrawable">@drawable/device_access_new_account</item>
<item name="OpenFileDrawable">@drawable/collections_collection</item>
<item name="CreateDbDrawable">@drawable/collections_new_label</item>
<item name="OpenUrlDrawable">@drawable/location_web_site</item>
<item name="ic_menu_add_field">@drawable/ic_menu_add_field_holo_light</item>
<item name="ic_launcher_folder_small">@drawable/ic_launcher_folder_small</item>
<item name="ic_action_search_drawable">@drawable/ic_action_search</item>
<item name="NavigationAcceptDrawable">@drawable/navigation_accept</item> <!--Holo Dark: ..dark.png -->
</style>
<style name="NoTitleBarLight" parent="BaseLight">
</style>
<style name="BaseLight_Dialog" parent="android:Theme.Holo.Light.Dialog" />
<style name="DialogLight" parent="BaseLight_Dialog"></style>
<style name="ThemeLight" parent="BaseLight"></style>
<!-- "default" for Preference activity etc.:-->
<style name="NoTitleBar" parent="BaseLight"></style>
</resources>

View File

@ -19,24 +19,19 @@
-->
<resources>
<style name="Base">
<item name="OpenFileDrawable">@drawable/collections_collection</item>
<item name="CreateDbDrawable">@drawable/collections_new_label</item>
<item name="OpenUrlDrawable">@drawable/location_web_site</item>
<item name="ic_action_search_drawable">@drawable/ic_action_search_holodark</item>
<item name="ic_launcher_folder_small">@drawable/ic_launcher_folder_small</item>
</style>
<style name="NoTitleBar"></style>
<style name="Dialog" parent="android:Theme.Dialog"></style>
<style name="GroupTextSmall" parent="android:Theme">
<item name="@android:textColor">@color/group</item>
<item name="@android:textColor">?android:attr/textColorPrimary</item>
<item name="@android:textSize">15sp</item>
</style>
<style name="GroupText" parent="android:Theme">
<item name="@android:textColor">@color/group</item>
<item name="@android:textColor">?android:attr/textColorPrimary</item>
<item name="@android:textSize">20sp</item>
</style>
<style name="GroupTextLarge" parent="android:Theme">
<item name="@android:textColor">@color/group</item>
<item name="@android:textColor">?android:attr/textColorPrimary</item>
<item name="@android:textSize">28sp</item>
</style>
<style name="ElementTextSmall">
@ -68,57 +63,146 @@
<item name="@android:textSize">12sp</item>
<item name="@android:background">#222222</item>
</style>
<style name="EntryFieldHeader" parent="WhiteOnDarkSmall">
<item name="@android:textSize">12sp</item>
</style>
<style name="ElementTextTitle" parent="WhiteOnBlack">
<item name="@android:textColor">@color/group</item>
<item name="@android:background">@android:color/transparent</item>
</style>
<style name="EntryItem">
<item name="@android:padding">5sp</item>
<item name="android:layout_marginLeft">12dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">18sp</item>
</style>
<style name="MinusButton">
<item name="android:src">@drawable/ic_menu_remove_field_holo_light</item>
</style>
<style name="EntryFieldHeader">
<item name="android:drawableBottom">@drawable/section_header</item>
<item name="android:drawablePadding">1dp</item>
<item name="android:drawablePadding">2dp</item>
<item name="android:layout_marginLeft">12dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginBottom">3dp</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">@color/emphasis</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">18sp</item>
<item name="android:textStyle">bold</item>
<item name="@android:background">@android:color/transparent</item>
</style>
<style name="InfoHeader">
<item name="android:drawableBottom">@drawable/section_header</item>
<item name="android:drawablePadding">1dp</item>
<item name="android:layout_marginBottom">3dp</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:paddingLeft">0dp</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">@color/emphasis</item>
<item name="android:textSize">14sp</item>
<item name="android:textStyle">bold</item>
<item name="@android:background">@android:color/transparent</item>
</style>
<style name="EditEntryButton">
</style>
<style name="ExtraFieldHeader">
<item name="android:drawablePadding">1dp</item>
<item name="android:drawablePadding">2dp</item>
<item name="android:layout_marginLeft">0dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginBottom">3dp</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">@color/emphasis2</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">14sp</item>
<item name="android:textStyle">bold</item>
</style>
<style name="BottomBarActionButton">
<item name="android:background">?android:attr/selectableItemBackground</item>
</style>
<style name="TextAppearance_EditEntry_Small">
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textAllCaps">true</item>
</style>
<style name="TextAppearance_EditEntry_LabelSmall" parent="TextAppearance_EditEntry_Small">
<item name="android:minHeight">24dip</item>
<item name="android:layout_width">144dip</item>
<item name="android:layout_marginTop">12dip</item>
<item name="android:layout_marginLeft">16dip</item>
<item name="android:layout_marginRight">16dip</item>
<item name="android:paddingLeft">8dip</item>
<item name="android:paddingRight">8dip</item>
<item name="android:layout_marginBottom">-12dip</item>
</style>
<style name="TextAppearance_EditEntry">
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textSize">18sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="TextAppearance_EditEntry_Value" parent="TextAppearance_EditEntry">
<item name="android:gravity">center_vertical</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginLeft">12dip</item>
</style>
<style name="TextAppearance_SmallHeading" parent="TextAppearance_EditEntry_Small">
<item name="android:minHeight">24dip</item>
<item name="android:layout_width">144dip</item>
<item name="android:layout_marginTop">12dip</item>
<item name="android:layout_marginRight">16dip</item>
<item name="android:paddingRight">8dip</item>
<item name="android:layout_marginBottom">-12dip</item>
</style>
<style name="TextAppearance_SubElement">
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textSize">18sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:gravity">center_vertical</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginLeft">12dip</item>
</style>
<style name="TextAppearance_Help">
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
<item name="android:textSize">24sp</item>
<item name="android:paddingLeft">12sp</item>
<item name="android:gravity">center_vertical</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginLeft">12dip</item>
</style>
<style name="EditEntryButton">
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
<item name="android:layout_marginTop">12dip</item>
<item name="android:layout_marginLeft">24dip</item>
<item name="android:layout_marginRight">24dip</item>
<item name="android:paddingLeft">8dip</item>
<item name="android:paddingRight">8dip</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
</style>
<style name="AdditionalStringLayout">
<item name="android:layout_marginLeft">24dip</item>
<item name="android:layout_marginRight">24dip</item>
</style>
<style name="MinusButton">
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:src">@drawable/ic_menu_remove_field_holo_light</item>
</style>
<style name="ExtraFieldHeader" parent="android:Widget.Holo.Light.TextView">
<item name="android:layout_marginLeft">16dip</item>
<item name="android:layout_marginRight">12dip</item>
<item name="android:layout_marginBottom">3dp</item>
<item name="android:layout_marginTop">4dp</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:textAllCaps">true</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">14sp</item>
<item name="android:textStyle">bold</item>
<item name="@android:background">@android:color/transparent</item>
</style>
<style name="PaddedContainer">

View File

@ -65,7 +65,16 @@ namespace keepass2android
act.StartActivityForResult(i, 0);
}
public EntryActivity (IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)
{
}
public EntryActivity()
{
}
protected PwEntry Entry;
@ -473,7 +482,7 @@ namespace keepass2android
_popupMenuItems[popupKey] = new List<IPopupMenuItem>();
return _popupMenuItems[popupKey];
}
internal Android.Net.Uri WriteBinaryToFile(string key, bool writeToCacheDirectory)
internal Uri WriteBinaryToFile(string key, bool writeToCacheDirectory)
{
ProtectedBinary pb = Entry.Binaries.Get(key);
System.Diagnostics.Debug.Assert(pb != null);
@ -514,7 +523,7 @@ namespace keepass2android
}
}
string filename = targetFile.AbsolutePath;
Android.Net.Uri fileUri = Android.Net.Uri.FromFile(targetFile);
Uri fileUri = Uri.FromFile(targetFile);
byte[] pbData = pb.ReadData();
try
@ -534,7 +543,7 @@ namespace keepass2android
Toast.MakeText(this, GetString(Resource.String.SaveAttachment_doneMessage, new Java.Lang.Object[] { filename }), ToastLength.Short).Show();
if (writeToCacheDirectory)
{
return Android.Net.Uri.Parse("content://" + AttachmentContentProvider.Authority + "/"
return Uri.Parse("content://" + AttachmentContentProvider.Authority + "/"
+ filename);
}
return fileUri;
@ -629,7 +638,7 @@ namespace keepass2android
*/
}
FindViewById(Resource.Id.entry_binaries_label).Visibility = true ? ViewStates.Visible : ViewStates.Gone;
FindViewById(Resource.Id.entry_binaries_label).Visibility = Entry.Binaries.Any() ? ViewStates.Visible : ViewStates.Gone;
}
// url = file path or whatever suitable URL you want.
@ -762,10 +771,6 @@ namespace keepass2android
popupMenu.Show();
}
private void ShowPopup(int resAnchor, string popupKey)
{
ShowPopup(FindViewById(resAnchor), popupKey);
}
private void SetPasswordTypeface(TextView textView)
{
@ -774,15 +779,6 @@ namespace keepass2android
textView.Typeface = _passwordFont;
}
private void PopulateText(int viewId, int containerViewId, int resId)
{
View header = FindViewById(containerViewId);
TextView tv = (TextView) FindViewById(viewId);
header.Visibility = tv.Visibility = ViewStates.Visible;
tv.SetText(resId);
}
private void PopulateText(int viewId, int containerViewId, String text)
{
View container = FindViewById(containerViewId);

View File

@ -18,6 +18,7 @@ This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file
using System;
using Android.Content;
using Android.OS;
using Android.Runtime;
using KeePassLib.Serialization;
namespace keepass2android
@ -41,6 +42,12 @@ namespace keepass2android
_design = new ActivityDesign(this);
}
protected LockCloseActivity(IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)
{
}
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);

View File

@ -14,7 +14,6 @@
android:src="@drawable/vdots"
android:gravity="right|bottom"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
/>
<TextView
android:id="@+id/entry_extra"

View File

@ -36,7 +36,6 @@
android:src="@drawable/vdots"
android:gravity="right|bottom"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
/>
<TextView
android:id="@+id/entry_user_name"
@ -73,7 +72,6 @@
android:src="@drawable/vdots"
android:gravity="right|bottom"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
/>
<TextView
android:id="@+id/entry_url"
@ -110,7 +108,6 @@
android:src="@drawable/vdots"
android:gravity="right|bottom"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
/>
<TextView
android:id="@+id/entry_password"

View File

@ -24,6 +24,7 @@
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/help"
style="@style/TextAppearance_SubElement"
android:paddingTop="0dp"
/>

View File

@ -162,7 +162,9 @@
<style name="TextAppearance_Help">
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
<item name="android:textSize">24sp</item>
<item name="android:padding">12sp</item>
<item name="android:paddingLeft">12sp</item>
<item name="android:paddingRight">12sp</item>
<item name="android:paddingBottom">12sp</item>
<item name="android:gravity">center_vertical</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginRight">12dip</item>