slide left/right transitions

This commit is contained in:
PhilippC 2013-05-17 06:53:58 +02:00
parent e93e9307de
commit 26064a0327
11 changed files with 1115 additions and 1043 deletions

View File

@ -386,7 +386,13 @@ namespace keepass2android
} }
return type; return type;
} }
public override void OnBackPressed()
{
base.OnBackPressed();
OverridePendingTransition(Resource.Animation.anim_enter_back, Resource.Animation.anim_leave_back);
}
protected void fillData(bool trimList) protected void fillData(bool trimList)
{ {
ImageView iv = (ImageView)FindViewById(Resource.Id.entry_icon); ImageView iv = (ImageView)FindViewById(Resource.Id.entry_icon);
@ -640,6 +646,8 @@ namespace keepass2android
//So we can simply Finish. See this page for information on how to do this in more general (future?) cases: //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 //http://developer.android.com/training/implementing-navigation/ancestral.html
Finish(); Finish();
OverridePendingTransition(Resource.Animation.anim_enter_back, Resource.Animation.anim_leave_back);
return true; return true;
} }

View File

@ -160,7 +160,12 @@ namespace keepass2android
cv.OnCreateMenu(menu, menuInfo); cv.OnCreateMenu(menu, menuInfo);
} }
public override void OnBackPressed()
{
base.OnBackPressed();
if ((mGroup != null) && (mGroup.ParentGroup != null))
OverridePendingTransition(Resource.Animation.anim_enter_back, Resource.Animation.anim_leave_back);
}
public override bool OnContextItemSelected(IMenuItem item) { public override bool OnContextItemSelected(IMenuItem item) {
Android.Widget.AdapterView.AdapterContextMenuInfo acmi = (Android.Widget.AdapterView.AdapterContextMenuInfo)item.MenuInfo; Android.Widget.AdapterView.AdapterContextMenuInfo acmi = (Android.Widget.AdapterView.AdapterContextMenuInfo)item.MenuInfo;

View File

@ -260,6 +260,8 @@ namespace keepass2android
//So we can simply Finish. See this page for information on how to do this in more general (future?) cases: //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 //http://developer.android.com/training/implementing-navigation/ancestral.html
Finish(); Finish();
OverridePendingTransition(Resource.Animation.anim_enter_back, Resource.Animation.anim_leave_back);
return true; return true;
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:fromXDelta="100%" android:toXDelta="0%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="400" />
</set>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate android:fromXDelta="-100%" android:toXDelta="0%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="250"/>
</set>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate android:fromXDelta="0%" android:toXDelta="-100%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="400"/>
</set>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:fromXDelta="0%" android:toXDelta="100%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="250" />
</set>

View File

@ -639,6 +639,10 @@
<AndroidResource Include="Resources\layout\entry_extrastring_value.xml" /> <AndroidResource Include="Resources\layout\entry_extrastring_value.xml" />
<AndroidResource Include="Resources\drawable-v11\ic_launcher_gray.png" /> <AndroidResource Include="Resources\drawable-v11\ic_launcher_gray.png" />
<AndroidResource Include="Resources\values-nb\strings.xml" /> <AndroidResource Include="Resources\values-nb\strings.xml" />
<AndroidResource Include="Resources\anim\anim_enter.xml" />
<AndroidResource Include="Resources\anim\anim_leave.xml" />
<AndroidResource Include="Resources\anim\anim_enter_back.xml" />
<AndroidResource Include="Resources\anim\anim_leave_back.xml" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
<ItemGroup> <ItemGroup>
@ -690,6 +694,7 @@
<Folder Include="libs\mips\" /> <Folder Include="libs\mips\" />
<Folder Include="Resources\values-v14\" /> <Folder Include="Resources\values-v14\" />
<Folder Include="Resources\layout-v14\" /> <Folder Include="Resources\layout-v14\" />
<Folder Include="Resources\anim\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\KeePassLib2Android\KeePassLib2Android.csproj"> <ProjectReference Include="..\KeePassLib2Android\KeePassLib2Android.csproj">

View File

@ -137,7 +137,7 @@ namespace keepass2android.view
private void launchEntry() private void launchEntry()
{ {
mAct.LaunchActivityForEntry(mPw, mPos); mAct.LaunchActivityForEntry(mPw, mPos);
mAct.OverridePendingTransition(Resource.Animation.anim_enter, Resource.Animation.anim_leave);
} }
public override void OnCreateMenu(IContextMenu menu, IContextMenuContextMenuInfo menuInfo) public override void OnCreateMenu(IContextMenu menu, IContextMenuContextMenuInfo menuInfo)

View File

@ -90,6 +90,8 @@ namespace keepass2android.view
private void launchGroup() { private void launchGroup() {
GroupActivity.Launch(mAct, mPw); GroupActivity.Launch(mAct, mPw);
mAct.OverridePendingTransition(Resource.Animation.anim_enter, Resource.Animation.anim_leave);
} }
public override void OnCreateMenu(IContextMenu menu, IContextMenuContextMenuInfo menuInfo) { public override void OnCreateMenu(IContextMenu menu, IContextMenuContextMenuInfo menuInfo) {