aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005/dsub/view/DrawerAdapter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/github/daneren2005/dsub/view/DrawerAdapter.java')
-rw-r--r--src/github/daneren2005/dsub/view/DrawerAdapter.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/view/DrawerAdapter.java b/src/github/daneren2005/dsub/view/DrawerAdapter.java
index 9832ad05..345ca34c 100644
--- a/src/github/daneren2005/dsub/view/DrawerAdapter.java
+++ b/src/github/daneren2005/dsub/view/DrawerAdapter.java
@@ -90,6 +90,15 @@ public class DrawerAdapter extends ArrayAdapter<String> {
return position;
}
+ public int getAdapterPosition(int position) {
+ for(int i = position; i >= 0; i--) {
+ if(!visible.get(i)) {
+ position--;
+ }
+ }
+
+ return position;
+ }
public void setItemVisible(int position, boolean visible) {
if(this.visible.get(position) != visible) {