0.9.8-pre2

This commit is contained in:
Philipp Crocoll 2015-08-12 06:40:14 +02:00
parent 6bb4e69f38
commit 15f73257fa
26 changed files with 642 additions and 105 deletions

View File

@ -10,7 +10,6 @@
<RootNamespace>AndroidFileChooserBinding</RootNamespace>
<AssemblyName>AndroidFileChooserBinding</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v2.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -10,7 +10,6 @@
<RootNamespace>JavaFileStorageBindings</RootNamespace>
<AssemblyName>JavaFileStorageBindings</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v2.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -10,7 +10,6 @@
<RootNamespace>KP2AKdbLibraryBinding</RootNamespace>
<AssemblyName>KP2AKdbLibraryBinding</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v2.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePassLib2Android", "KeePassLib2Android\KeePassLib2Android.csproj", "{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "keepass2android", "keepass2android\keepass2android.csproj", "{A6CF8A86-37C1-4197-80FE-519DE2C842F5}"
@ -41,6 +43,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialTest", "MaterialTes
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialTest2", "MaterialTest2\MaterialTest2.csproj", "{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialTest3", "MaterialTest3\MaterialTest3.csproj", "{4512BF32-7443-4BF9-B46B-80E7F2D41B36}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -81,6 +85,7 @@ Global
{545B4A6B-8BBA-4FBE-92FC-4AC060122A54}.ReleaseNoNet|x64.ActiveCfg = ReleaseNoNet|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|Any CPU.Deploy.0 = Debug|Any CPU
{A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{A6CF8A86-37C1-4197-80FE-519DE2C842F5}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
@ -434,6 +439,7 @@ Global
{83B92CEE-9923-44E6-B0B4-9930D0BFE95E}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
@ -457,6 +463,30 @@ Global
{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}.ReleaseNoNet|Win32.Build.0 = Release|Any CPU
{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
{B7BBC4A2-0301-4DFF-B03C-C88CD4F1F890}.ReleaseNoNet|x64.Build.0 = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Debug|Win32.ActiveCfg = Debug|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Debug|x64.ActiveCfg = Debug|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Release|Any CPU.Build.0 = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Release|Any CPU.Deploy.0 = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Release|Win32.ActiveCfg = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.Release|x64.ActiveCfg = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.ReleaseNoNet|Any CPU.ActiveCfg = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.ReleaseNoNet|Any CPU.Build.0 = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.ReleaseNoNet|Any CPU.Deploy.0 = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.ReleaseNoNet|Mixed Platforms.ActiveCfg = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.ReleaseNoNet|Mixed Platforms.Build.0 = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.ReleaseNoNet|Mixed Platforms.Deploy.0 = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
{4512BF32-7443-4BF9-B46B-80E7F2D41B36}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -12,7 +12,7 @@
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AssemblyName>KeePassLib2Android</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0.3</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>

View File

@ -21,10 +21,10 @@ namespace keepass2android
WriteDemanded = 2
}
protected const int RequestCodeFileStorageSelectionForPrimarySelect = 983713;
private const int RequestCodeFileStorageSelectionForCopyToWritableLocation = 983714;
private const int RequestCodeFileFileBrowseForWritableLocation = 983715;
private const int RequestCodeFileBrowseForOpen = 983716;
protected const int RequestCodeFileStorageSelectionForPrimarySelect = 33713;
private const int RequestCodeFileStorageSelectionForCopyToWritableLocation = 33714;
private const int RequestCodeFileFileBrowseForWritableLocation = 33715;
private const int RequestCodeFileBrowseForOpen = 33716;
protected IOConnectionInfo _selectedIoc;

View File

@ -15,6 +15,7 @@
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -1,19 +1,72 @@
using System;
using Android.App;
using Android.Content;
using Android.Graphics;
using Android.Runtime;
using Android.Support.V4.View;
using Android.Support.V4.Widget;
using Android.Support.V7.App;
using Android.Support.Design.Widget;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Util;
using Toolbar = Android.Support.V7.Widget.Toolbar;
namespace MaterialTest2
{
[Activity(Theme="@style/MyTheme", Label = "MaterialTest", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : ActionBarActivity
public class MyDrawerLayout : Android.Support.V4.Widget.DrawerLayout
{
private bool _fitsSystemWindows;
protected MyDrawerLayout(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
{
}
public MyDrawerLayout(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle)
{
}
public MyDrawerLayout(Context context, IAttributeSet attrs) : base(context, attrs)
{
}
public MyDrawerLayout(Context context) : base(context)
{
}
private int[] mInsets = new int[4];
protected override bool FitSystemWindows(Rect insets)
{
if (Build.VERSION.SdkInt >= Build.VERSION_CODES.Kitkat)
{
// Intentionally do not modify the bottom inset. For some reason,
// if the bottom inset is modified, window resizing stops working.
// TODO: Figure out why.
mInsets[0] = insets.Left;
mInsets[1] = insets.Top;
mInsets[2] = insets.Right;
insets.Left = 0;
insets.Top = 0;
insets.Right = 0;
}
return base.FitSystemWindows(insets);
}
public int[] GetInsets()
{
return mInsets;
}
}
[Activity(Theme="@style/MyTheme", Label = "MaterialTest", MainLauncher = false, Icon = "@drawable/icon", WindowSoftInputMode = SoftInput.AdjustResize)]
public class MainActivity : AppCompatActivity
{
int count = 1;
@ -23,6 +76,23 @@ namespace MaterialTest2
private string mDrawerTitle;
public override bool OnCreateOptionsMenu(IMenu menu)
{
MenuInflater.Inflate(Resource.Menu.menu_password, menu);
return true;
}
public override bool OnOptionsItemSelected(IMenuItem item)
{
switch (item.ItemId)
{
case Android.Resource.Id.Home:
mDrawerLayout.OpenDrawer(Android.Support.V4.View.GravityCompat.Start);
return true;
}
return base.OnOptionsItemSelected(item);
}
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
@ -32,7 +102,7 @@ namespace MaterialTest2
mDrawerTitle = this.Title;
//mPlanetTitles = this.Resources.GetStringArray (Resource.Array.planets_array);
mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawerLayout);
mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
//mDrawerList = FindViewById<RecyclerView> (Resource.Id.left_drawer);
@ -40,7 +110,7 @@ namespace MaterialTest2
// improve performance by indicating the list if fixed size.
//mDrawerList.HasFixedSize = true;
//mDrawerList.SetLayoutManager (new LinearLayoutManager (this));
NavigationView nv;
// set up the drawer's list view with items and click listener
//mDrawerList.SetAdapter (new PlanetAdapter (mPlanetTitles, this));
// enable ActionBar app icon to behave as action to toggle nav drawer
@ -59,18 +129,62 @@ namespace MaterialTest2
// and attach an event to it
Button button = FindViewById<Button>(Resource.Id.MyButton);
button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
button.Click += delegate { button.Text = string.Format("{0} clicks!", count++);
FindViewById(Resource.Id.MyButton).SetMinimumHeight(30*count);
};
var toolbar = FindViewById<Toolbar> (Resource.Id.toolbar2);
//Toolbar will now take on default Action Bar characteristics
FindViewById<ImageButton>(Resource.Id.eyebutton).Click += delegate(object sender, EventArgs args)
{
Snackbar.Make(FindViewById<ImageButton>(Resource.Id.eyebutton), "Here's a snackbar!", Snackbar.LengthLong).SetAction("Action",
new ClickListener(v =>
{
Console.WriteLine("Action handler");
})).Show();
};
var toolbar = FindViewById<Toolbar> (Resource.Id.toolbar);
//SupportActionBar.SetBackgroundDrawable(GetDrawable(Resource.Drawable.ic_keepass2android));
//Toolbar will now take on default Action Bar characteristics
SetSupportActionBar (toolbar);
//You can now use and reference the ActionBar
SupportActionBar.Title = "Hello from Toolbar";
//SupportActionBar.Title = "Hello from Toolbar";
SupportActionBar.SetDisplayHomeAsUpEnabled (true);
SupportActionBar.SetHomeButtonEnabled(true);
var collapsingToolbar = FindViewById<CollapsingToolbarLayout> (Resource.Id.collapsing_toolbar);
collapsingToolbar.SetTitle ("Unlock Database");
//SupportActionBar.SetHomeAsUpIndicator (Resource.Drawable.ic_menu);
//SupportActionBar.SetDisplayHomeAsUpEnabled (true);
//var toggle = new ActionBarDrawerToggle(
SupportActionBar.SetDisplayHomeAsUpEnabled(true);
SupportActionBar.SetHomeButtonEnabled(true);
mDrawerToggle.SyncState();
var fab = FindViewById<FloatingActionButton> (Resource.Id.fab);
fab.Click += (sender, e) => {
Snackbar.Make (fab, "Here's a snackbar!", Snackbar.LengthLong).SetAction ("Action",
new ClickListener (v => {
Console.WriteLine ("Action handler");
})).Show ();
};
}
public class ClickListener : Java.Lang.Object, View.IOnClickListener
{
public ClickListener (Action<View> handler)
{
Handler = handler;
}
public Action<View> Handler { get; set; }
public void OnClick (View v)
{
var h = Handler;
if (h != null)
h (v);
}
}
internal class MyActionBarDrawerToggle : ActionBarDrawerToggle

View File

@ -42,40 +42,213 @@
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="Xamarin.Android.Support.v4">
<HintPath>..\packages\Xamarin.Android.Support.v4.21.0.3.0\lib\MonoAndroid10\Xamarin.Android.Support.v4.dll</HintPath>
<Reference Include="Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Xamarin.Android.Support.v4.22.2.0.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.v7.AppCompat">
<HintPath>..\packages\Xamarin.Android.Support.v7.AppCompat.21.0.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
<Reference Include="Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Xamarin.Android.Support.v7.AppCompat.22.2.0.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Android.Support.Design">
<HintPath>..\packages\Xamarin.Android.Support.Design.22.2.0.0\lib\MonoAndroid403\Xamarin.Android.Support.Design.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="EntryEditActivity.cs" />
<Compile Include="FileStorageSelect.cs" />
<Compile Include="GroupActivity.cs" />
<Compile Include="GroupEditActivity.cs" />
<Compile Include="GroupListFragment.cs" />
<Compile Include="MainActivity.cs" />
<Compile Include="PwEntryView.cs" />
<Compile Include="PwGroupView.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SplashActivity.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
<None Include="packages.config" />
<None Include="Properties\AndroidManifest.xml">
<SubType>Designer</SubType>
</None>
<AndroidResource Include="Resources\drawable\group_icon_bkg_drawable.xml" />
<AndroidResource Include="Resources\layout\my_list_item.axml">
<SubType>AndroidResource</SubType>
</AndroidResource>
<AndroidResource Include="Resources\values\dimens.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\layout\nav_header.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\drawable-xhdpi\ic_dashboard.png" />
<AndroidResource Include="Resources\drawable-xhdpi\ic_discuss.png" />
<AndroidResource Include="Resources\drawable-xhdpi\ic_done.png" />
<AndroidResource Include="Resources\drawable-xhdpi\ic_event.png" />
<AndroidResource Include="Resources\drawable-xhdpi\ic_forum.png" />
<AndroidResource Include="Resources\drawable-xhdpi\ic_headset.png" />
<AndroidResource Include="Resources\drawable-xhdpi\ic_menu.png" />
<AndroidResource Include="Resources\layout\Splash.axml">
<SubType>AndroidResource</SubType>
</AndroidResource>
<AndroidResource Include="Resources\layout\filestorageselect.xml">
<SubType>AndroidResource</SubType>
</AndroidResource>
<AndroidResource Include="Resources\layout\entry_edit.axml">
<SubType>AndroidResource</SubType>
</AndroidResource>
<AndroidResource Include="Resources\layout\group.axml">
<SubType>AndroidResource</SubType>
</AndroidResource>
<AndroidResource Include="Resources\layout\generate_password.axml">
<SubType>AndroidResource</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Main.axml" />
<AndroidResource Include="Resources\values\Strings.xml" />
<AndroidResource Include="Resources\layout\Main.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\values\Strings.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\drawable\Icon.png" />
<AndroidResource Include="Resources\layout\toolbar2.xml" />
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\values-v21\styles.xml" />
<AndroidResource Include="Resources\layout\toolbar2.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\values\styles.xml">
<SubType>Designer</SubType>
</AndroidResource>
<AndroidResource Include="Resources\values-v21\styles.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
<ItemGroup>
<XamarinComponentReference Include="xamandroidsupportv7appcompat">
<Version>21.0.3.0</Version>
<AndroidResource Include="Resources\drawable\drawer_shadow.9.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\ic_keepass2android.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\toolbar_bg.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\list_selector.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\colors.xml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\color\" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\menu\menu_password.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\ic_action_eye_open.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\splashlogo.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\createnewdb.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\opendb.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\splash_bg_selector.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\splash_button_bg.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\storagetype_grid_bg.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\storagetype_button_bg.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\group_list_entry.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\entry_list_entry.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\grouplistitem_selector.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\checked_drawable.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\listitem_unchecked_drawable.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\colortest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\entry_icon_bkg_drawable.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\checkmark.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\rightarrow.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\grouplistfragment.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<XamarinComponentReference Include="xamandroidsupportdesign">
<Visible>False</Visible>
<Version>22.2.0.0</Version>
</XamarinComponentReference>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\drawer_shadow.9.png" />
<AndroidResource Include="Resources\layout\group_edit.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_attachments.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_comments.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_created.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_expires.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_extras.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_group.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_modified.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_password.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_tags.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_url.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\ic_entry_username.png" />
</ItemGroup>
</Project>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="MaterialTest2.MaterialTest2">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<application android:label="MaterialTest2"></application>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="MaterialTest2.MaterialTest2" android:installLocation="auto">
<uses-sdk />
<application android:label="MaterialTest2" android:icon="@drawable/ic_discuss"></application>
</manifest>

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<include
android:id="@+id/toolbar2"
layout="@layout/toolbar2" />
<android.support.v4.widget.DrawerLayout
android:layout_width="match_parent"
android:id="@+id/drawerLayout"
android:layout_height="match_parent"
android:layout_below="@id/toolbar2">
<!-- activity view -->
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/main_content">
<Button
android:id="@+id/MyButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/Hello" />
<CheckBox
android:text="CheckBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/checkBox1" />
<EditText
android:inputType="textEmailAddress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/editText1" />
</LinearLayout>
<!-- navigation drawer -->
<RelativeLayout
android:layout_gravity="left|start"
android:layout_width="match_parent"
android:background="#fff"
android:layout_height="match_parent">
<Button
android:id="@+id/MyButton2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/Hello" />
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>

View File

@ -4,7 +4,11 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:background="@drawable/toolbar_bg"
local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
local:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
local:popupTheme="@style/ThemeOverlay.AppCompat.Light" >
</android.support.v7.widget.Toolbar>

View File

@ -10,5 +10,22 @@
<item name="android:windowAllowReturnTransitionOverlap">true</item>
<item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
<item name="android:windowSharedElementExitTransition">@android:transition/move</item>
<item name="android:actionModeBackground">@color/appAccentColor</item>
</style>
<style name="MyTheme_ActionBar" parent="MyTheme_ActionBar.Base">
<item name="android:actionModeBackground">@color/appAccentColor</item>
<item name="actionModeBackground">@color/appAccentColor</item>
</style>
<style name="EntryFieldHeader">
<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">false</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textSize">12sp</item>
</style>
</resources>

View File

@ -6,4 +6,5 @@
<string name="action_settings">Settings</string>
<string name="drawer_open">open</string>
<string name="drawer_close">close</string>
<string name="group">Group</string>
</resources>

View File

@ -1,29 +1,172 @@
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<style name="MyTheme" parent="MyTheme.Base">
<style name="BottomBarButton" parEntryEditSingleLine_ImageView="@style/Widget.AppCompat.Button.Borderless">
<item name="android:textSize">16sp</item>
<item name="android:layout_margin">6dp</item>
<item name="android:layout_marginLeft">4dp</item>
<item name="android:layout_marginRight">4dp</item>
<item name="android:paddingBottom">10dp</item>
<item name="android:paddingTop">10dp</item>
<item name="android:paddingLeft">8dp</item>
<item name="android:paddingRight">8dp</item>
<item name="android:textColor">#2196f3</item>
</style>
<!--
<style name="SplashScreenButton" parent="Widget.AppCompat.Button">
<item name="colorButtonNormal">#fff</item>
<item name="android:textSize">16sp</item>
<item name="android:layout_height">32sp</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:layout_marginBottom">8dp</item>
</style>
-->
<style name="SplashScreenButton" parent="@style/Widget.AppCompat.Button" >
<item name="android:textSize">16sp</item>
<item name="android:layout_height">40sp</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:background">@drawable/splash_button_bg</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:layout_marginBottom">8dp</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:drawablePadding">10dp</item>
<item name="android:textAllCaps">false</item>
<item name="android:gravity">left|center_vertical</item>
<item name="android:textColor">#737373</item>
</style>
<style name="EntryEditSingleLine_ImageView">
<item name="android:layout_width">40dp</item>
<item name="android:layout_gravity">top</item>
<item name="android:layout_marginRight">16dp</item>
<item name="android:layout_marginTop">16dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">0</item>
</style>
<style name="EntryEditSingleLine_TextInputLayout">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
</style>
<style name="EntryEditSingleLine_EditText">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingTop">0dp</item>
</style>
<style name="EntryEditSingleLine_container">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">8dp</item>
<item name="android:orientation">horizontal</item>
<item name="android:gravity">center_vertical</item>
</style>
<style name="MyTheme" parent="MyTheme.Base">
<item name="actionModeBackground">@color/appAccentColor</item>
</style>
<!--style name="MyTheme.ActionMode" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionModeBackground">#FFFFFF</item>
</style-->
<style name="MyTheme_ActionBar" parent="MyTheme_ActionBar.Base">
<item name="actionModeBackground">@color/appAccentColor</item>
</style>
<!-- Base theme applied no matter what API -->
<style name="MyTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="MyTheme.Base" parent="Theme.AppCompat.Holo.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette-->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">#2196F3</item>
<item name="colorPrimary">@color/appPrimaryColor</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">#1976D2</item>
<item name="colorPrimaryDark">@color/appPrimaryDarkColor</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">#FF4081</item>
<item name="colorAccent">@color/appAccentColor</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
</style>
<style name="MyTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette-->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">@color/appPrimaryColor</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">@color/appPrimaryDarkColor</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">@color/appAccentColor</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
</style>
<style name="MyTheme_ActionBar.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">true</item>
<item name="colorPrimary">@color/appPrimaryColor</item>
<item name="colorPrimaryDark">@color/appPrimaryDarkColor</item>
<item name="colorAccent">@color/appAccentColor</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<item name="actionModeBackground">@color/appPrimaryDarkColor</item>
</style>
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/black</item>
<item name="color">@android:color/white</item>
</style>
<style name="GroupDetailInSearchResult">
<item name="@android:textStyle">italic</item>
</style>
<style name="Base_Dialog" parent="Theme.AppCompat.Light.Dialog" />
<style name="Dialog" parent="Base_Dialog"></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_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_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>
</resources>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Xamarin.Android.Support.v4" version="21.0.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="21.0.3.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.Design" version="22.2.0.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v4" version="22.2.0.0" targetFramework="MonoAndroid50" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="22.2.0.0" targetFramework="MonoAndroid50" />
</packages>

View File

@ -10,7 +10,6 @@
<RootNamespace>PluginSdkBinding</RootNamespace>
<AssemblyName>PluginSdkBinding</AssemblyName>
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v2.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -16,14 +16,119 @@ This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file
*/
using System;
using Android.Content.Res;
using Android.Graphics;
using Android.OS;
using Android.Runtime;
using Android.Preferences;
using Android.Support.V7.App;
using Android.Views;
using Java.Lang;
using keepass2android;
namespace keepass2android
{
public class AppCompatPreferenceActivity: PreferenceActivity
{
public AppCompatPreferenceActivity(IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)
{
}
public AppCompatPreferenceActivity()
{
}
private AppCompatDelegate _appCompatDelegate;
AppCompatDelegate Delegate
{
get
{
if (_appCompatDelegate == null)
_appCompatDelegate = AppCompatDelegate.Create(this, null);
return _appCompatDelegate;
}
}
protected override void OnCreate(Bundle savedInstanceState)
{
Delegate.InstallViewFactory();
Delegate.OnCreate(savedInstanceState);
base.OnCreate(savedInstanceState);
}
public override MenuInflater MenuInflater
{
get { return Delegate.MenuInflater; }
}
public override void SetContentView(int layoutResId)
{
Delegate.SetContentView(layoutResId);
}
public override void SetContentView(View view) {
Delegate.SetContentView(view);
}
public override void SetContentView(View view, ViewGroup.LayoutParams @params) {
Delegate.SetContentView(view, @params);
}
public override void AddContentView(View view, ViewGroup.LayoutParams @params) {
Delegate.AddContentView(view, @params);
}
protected override void OnPostResume()
{
base.OnPostResume();
Delegate.OnPostResume();
}
protected override void OnTitleChanged(ICharSequence title, Color color)
{
base.OnTitleChanged(title, color);
Delegate.SetTitle(title);
}
public override void OnConfigurationChanged(Configuration newConfig)
{
base.OnConfigurationChanged(newConfig);
Delegate.OnConfigurationChanged(newConfig);
}
protected override void OnStop()
{
base.OnStop();
Delegate.OnStop();
}
protected override void OnDestroy()
{
base.OnDestroy();
Delegate.OnDestroy();
}
public override void InvalidateOptionsMenu()
{
Delegate.InvalidateOptionsMenu();
}
}
public class LockingPreferenceActivity : PreferenceActivity {
public class LockingPreferenceActivity : AppCompatPreferenceActivity {
public LockingPreferenceActivity (IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)

View File

@ -54,7 +54,7 @@
</intent-filter>
</activity>
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:theme="@style/Base" android:name="keepass2android.PasswordActivity">
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:theme="@style/MyTheme" android:name="keepass2android.PasswordActivity">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="56"
android:versionName="0.9.8 preview 1"
android:versionCode="57"
android:versionName="0.9.8 preview 2 (alpha)"
package="keepass2android.keepass2android"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />

View File

@ -538,7 +538,9 @@
<string name="NoFilenameWarning">The URI you have entered does not look like a filename. Are you sure this is a valid file?</string>
<string name="ChangeLog_0_9_8">
Version 0.9.8\n
Version 0.9.8 preview 2 (alpha)\n
*** NOTE: This preview is meant for early testing of the new UI design. It is currently not fully functional!***
* Material design.
* Support for Storage Access Framework (allows write to SD card and Google Drive in KP2A Offline)\n
* Try to detect erroneous user input when entering WebDAV URLs (directory instead of file)\n
* Changed password font\n

View File

@ -1,3 +1,4 @@
/*
This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file is based on Keepassdroid, Copyright Brian Pellin.

View File

@ -13,7 +13,6 @@
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidSupportedAbis>armeabi</AndroidSupportedAbis>
<AndroidStoreUncompressedFileExtensions />
<TargetFrameworkVersion>v2.2</TargetFrameworkVersion>
<MandroidI18n />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">