mirror of
https://github.com/moparisthebest/keepass2android
synced 2025-02-12 04:50:21 -05:00
Add move button in entry view
This commit is contained in:
parent
d34194aeec
commit
f725a30a03
@ -123,6 +123,28 @@ namespace keepass2android
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void SetupMoveButtons() {
|
||||||
|
View moveView = FindViewById(Resource.Id.entry_move);
|
||||||
|
if (App.Kp2a.GetDb().CanWrite)
|
||||||
|
{
|
||||||
|
moveView.Visibility = ViewStates.Visible;
|
||||||
|
moveView.Click += (sender, e) =>
|
||||||
|
{
|
||||||
|
NavigateToFolderAndLaunchMoveElementTask navMoveTask =
|
||||||
|
new NavigateToFolderAndLaunchMoveElementTask(Entry.ParentGroup,Entry.Uuid, false);
|
||||||
|
navMoveTask.SetActivityResult(this, KeePass.ExitNormal );
|
||||||
|
Finish();
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
moveView.Visibility = ViewStates.Gone;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private class PluginActionReceiver : BroadcastReceiver
|
private class PluginActionReceiver : BroadcastReceiver
|
||||||
{
|
{
|
||||||
private readonly EntryActivity _activity;
|
private readonly EntryActivity _activity;
|
||||||
@ -349,6 +371,7 @@ namespace keepass2android
|
|||||||
FillData();
|
FillData();
|
||||||
|
|
||||||
SetupEditButtons();
|
SetupEditButtons();
|
||||||
|
SetupMoveButtons ();
|
||||||
|
|
||||||
App.Kp2a.GetDb().LastOpenedEntry = new PwEntryOutput(Entry, App.Kp2a.GetDb().KpDatabase);
|
App.Kp2a.GetDb().LastOpenedEntry = new PwEntryOutput(Entry, App.Kp2a.GetDb().KpDatabase);
|
||||||
|
|
||||||
|
1990
src/keepass2android/Resources/Resource.designer.cs
generated
1990
src/keepass2android/Resources/Resource.designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,28 +1,28 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent">
|
android:layout_height="fill_parent">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/top"
|
android:id="@+id/top"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:orientation="horizontal" />
|
android:orientation="horizontal" />
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/bottom_bar"
|
android:id="@+id/bottom_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:divider="?android:attr/dividerVertical"
|
android:divider="?android:attr/dividerVertical"
|
||||||
|
android:showDividers="middle"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:dividerPadding="12dp">
|
android:dividerPadding="12dp">
|
||||||
|
<FrameLayout
|
||||||
<FrameLayout
|
|
||||||
style="?android:attr/actionButtonStyle"
|
style="?android:attr/actionButtonStyle"
|
||||||
android:id="@+id/entry_edit"
|
android:id="@+id/entry_edit"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
<TextView
|
<TextView
|
||||||
style="?android:actionBarTabTextStyle"
|
style="?android:actionBarTabTextStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -32,11 +32,27 @@
|
|||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="@string/menu_edit" />
|
android:text="@string/menu_edit" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
<FrameLayout
|
||||||
</LinearLayout>
|
android:id="@+id/entry_move"
|
||||||
|
style="?android:attr/actionButtonStyle"
|
||||||
<ImageView
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1">
|
||||||
|
<!-- TODO: Modify move icon -->
|
||||||
|
<TextView
|
||||||
|
style="?android:actionBarTabTextStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:paddingRight="20dp"
|
||||||
|
android:drawableLeft="?attr/NewEntryDrawable"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/menu_move_light" />
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
<ImageView
|
||||||
android:id="@+id/entry_divider2"
|
android:id="@+id/entry_divider2"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -44,16 +60,16 @@
|
|||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:tint="@color/blue_highlight"
|
android:tint="@color/blue_highlight"
|
||||||
android:src="@android:drawable/divider_horizontal_bright" />
|
android:src="@android:drawable/divider_horizontal_bright" />
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/entry_scroll"
|
android:id="@+id/entry_scroll"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_above="@id/entry_divider2"
|
android:layout_above="@id/entry_divider2"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
android:scrollbarStyle="insideOverlay">
|
android:scrollbarStyle="insideOverlay">
|
||||||
<keepass2android.view.EntryContentsView
|
<keepass2android.view.EntryContentsView
|
||||||
android:id="@+id/entry_contents"
|
android:id="@+id/entry_contents"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="fill_parent" />
|
android:layout_width="fill_parent" />
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@ -131,6 +131,7 @@
|
|||||||
<string name="menu_db_settings">Database settings</string>
|
<string name="menu_db_settings">Database settings</string>
|
||||||
<string name="menu_delete">Delete</string>
|
<string name="menu_delete">Delete</string>
|
||||||
<string name="menu_move">Move to another group</string>
|
<string name="menu_move">Move to another group</string>
|
||||||
|
<string name="menu_move_light">Move</string>
|
||||||
<string name="menu_navigate">Navigate to this group</string>
|
<string name="menu_navigate">Navigate to this group</string>
|
||||||
<string name="menu_donate">Donate a beer...</string>
|
<string name="menu_donate">Donate a beer...</string>
|
||||||
<string name="menu_edit">Edit</string>
|
<string name="menu_edit">Edit</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user