mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Add search title
This commit is contained in:
@@ -112,6 +112,7 @@ public class GroupActivity extends LockingActivity
|
||||
private static final String NODE_TO_MOVE_KEY = "NODE_TO_MOVE_KEY";
|
||||
|
||||
private Toolbar toolbar;
|
||||
private View searchTitleView;
|
||||
private ExpandableLayout toolbarPasteExpandableLayout;
|
||||
private Toolbar toolbarPaste;
|
||||
private ImageView iconView;
|
||||
@@ -219,6 +220,7 @@ public class GroupActivity extends LockingActivity
|
||||
iconView = findViewById(R.id.icon);
|
||||
addNodeButtonView = findViewById(R.id.add_node_button);
|
||||
toolbar = findViewById(R.id.toolbar);
|
||||
searchTitleView = findViewById(R.id.search_title);
|
||||
groupNameView = findViewById(R.id.group_name);
|
||||
toolbarPasteExpandableLayout = findViewById(R.id.expandable_toolbar_paste_layout);
|
||||
toolbarPaste = findViewById(R.id.toolbar_paste);
|
||||
@@ -408,6 +410,11 @@ public class GroupActivity extends LockingActivity
|
||||
}
|
||||
}
|
||||
}
|
||||
if (currentGroupIsASearch) {
|
||||
searchTitleView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
searchTitleView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Assign icon
|
||||
if (currentGroupIsASearch) {
|
||||
|
||||
@@ -59,7 +59,7 @@ public class SearchDbHelper<PwDatabaseVersion extends PwDatabase<PwGroupSearch,
|
||||
public PwGroupSearch search(PwDatabaseVersion pm, String qStr, int max) {
|
||||
|
||||
PwGroupSearch group = pm.createGroup();
|
||||
group.setName(mCtx.getString(R.string.search_results));
|
||||
group.setName("\"" + qStr + "\"");
|
||||
group.setEntries(new ArrayList<>());
|
||||
|
||||
// Search all entries
|
||||
|
||||
@@ -64,6 +64,12 @@
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/toolbar"
|
||||
android:orientation="vertical">
|
||||
<TextView android:id="@+id/search_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/search_results"
|
||||
android:visibility="gone"
|
||||
style="@style/KeepassDXStyle.TextAppearance.DefaultTextOnPrimary" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user