allow plugin action for notes field, fixes view problem after update

This commit is contained in:
Philipp Crocoll 2015-02-17 06:27:59 +01:00
parent 95f5524425
commit d825d8b5e6
2 changed files with 31 additions and 10 deletions

View File

@ -353,6 +353,7 @@ namespace keepass2android
_appTask = AppTask.GetTaskInOnCreate(savedInstanceState, Intent); _appTask = AppTask.GetTaskInOnCreate(savedInstanceState, Intent);
Entry = db.Entries[uuid]; Entry = db.Entries[uuid];
Android.Util.Log.Debug("KP2A", "Notes: " + Entry.Strings.ReadSafe(PwDefs.NotesField));
// Refresh Menu contents in case onCreateMenuOptions was called before Entry was set // Refresh Menu contents in case onCreateMenuOptions was called before Entry was set
ActivityCompat.InvalidateOptionsMenu(this); ActivityCompat.InvalidateOptionsMenu(this);
@ -734,6 +735,9 @@ namespace keepass2android
PopulateText(Resource.Id.entry_expires, Resource.Id.entryfield_container_expires, null); PopulateText(Resource.Id.entry_expires, Resource.Id.entryfield_container_expires, null);
} }
PopulateStandardText(Resource.Id.entry_comment, Resource.Id.entryfield_container_comment, PwDefs.NotesField); PopulateStandardText(Resource.Id.entry_comment, Resource.Id.entryfield_container_comment, PwDefs.NotesField);
RegisterTextPopup(FindViewById<RelativeLayout>(Resource.Id.comment_container),
FindViewById(Resource.Id.username_vdots), PwDefs.NotesField);
PopulateText(Resource.Id.entry_tags, Resource.Id.entryfield_container_tags, concatTags(Entry.Tags)); PopulateText(Resource.Id.entry_tags, Resource.Id.entryfield_container_tags, concatTags(Entry.Tags));
PopulateText(Resource.Id.entry_override_url, Resource.Id.entryfield_container_overrideurl, Entry.OverrideUrl); PopulateText(Resource.Id.entry_override_url, Resource.Id.entryfield_container_overrideurl, Entry.OverrideUrl);

View File

@ -143,25 +143,42 @@
style="@style/EntryItem" /> style="@style/EntryItem" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/entryfield_container_comment" android:id="@+id/entryfield_container_comment"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:orientation="vertical"> android:orientation="vertical">
<!-- Comment -->
<TextView <TextView
android:id="@+id/entry_comment_label" android:id="@+id/entry_comment_label"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/entry_comment" android:text="@string/entry_user_name"
style="@style/EntryFieldHeader" /> style="@style/EntryFieldHeader" />
<!-- Comment -->
<RelativeLayout
android:id="@+id/comment_container"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:clickable="true"
android:background="?android:attr/selectableItemBackground">
<ImageView
android:id="@+id/comment_vdots"
android:layout_width="wrap_content"
android:layout_height="15dp"
android:src="@drawable/vdots"
android:gravity="right|bottom"
android:layout_alignParentRight="true" />
<TextView <TextView
android:id="@+id/entry_comment" android:id="@+id/entry_comment"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textIsSelectable="true" android:layout_toLeftOf="@id/username_vdots"
style="@style/EntryItem" /> style="@style/EntryItem" />
</RelativeLayout>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/extra_strings" android:id="@+id/extra_strings"
android:layout_width="fill_parent" android:layout_width="fill_parent"