aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain
diff options
context:
space:
mode:
authorKent <itaqmail@gmail.com>2015-03-20 06:11:50 +0800
committerKent <itaqmail@gmail.com>2015-03-20 06:11:50 +0800
commit4d43950841b567d83e7879ed00702253fd9ba5b2 (patch)
tree9098853bbcd893d3076c011fa290e1d61bf62a4b /OpenKeychain
parentcfef53be01f72da477d0cb66e40865d7dcd9b125 (diff)
downloadopen-keychain-4d43950841b567d83e7879ed00702253fd9ba5b2.tar.gz
open-keychain-4d43950841b567d83e7879ed00702253fd9ba5b2.tar.bz2
open-keychain-4d43950841b567d83e7879ed00702253fd9ba5b2.zip
- Added footer so that the Floating Action Button won't block the last few items' content
Diffstat (limited to 'OpenKeychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java
index f8939f3d1..793fb4524 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/KeyListFragment.java
@@ -169,6 +169,22 @@ public class KeyListFragment extends LoaderFragment
mStickyList.setDrawingListUnderStickyHeader(false);
mStickyList.setFastScrollEnabled(true);
+ // Adds an empty footer view so that the Floating Action Button won't block content
+ // in last few rows.
+ View footer = new View(getActivity());
+
+ int spacing = (int) android.util.TypedValue.applyDimension(
+ android.util.TypedValue.COMPLEX_UNIT_DIP, 72, getResources().getDisplayMetrics()
+ );
+
+ android.widget.AbsListView.LayoutParams params = new android.widget.AbsListView.LayoutParams(
+ android.widget.AbsListView.LayoutParams.MATCH_PARENT,
+ spacing
+ );
+
+ footer.setLayoutParams(params);
+ mStickyList.addFooterView(footer, null, false);
+
/*
* Multi-selection
*/
@@ -369,7 +385,7 @@ public class KeyListFragment extends LoaderFragment
/**
* Show dialog to delete key
*
- * @param hasSecret must contain whether the list of masterKeyIds contains a secret key or not
+ * @param hasSecret must contain whether the list of masterKeyIds contains a secret key or not
*/
public void showDeleteKeyDialog(final ActionMode mode, long[] masterKeyIds, boolean hasSecret) {
// Can only work on singular secret keys
@@ -909,5 +925,4 @@ public class KeyListFragment extends LoaderFragment
}
-
}