From 9a7680c489da1351cf3fabd79f1e15b088120b87 Mon Sep 17 00:00:00 2001 From: Matan Bar Yosef Date: Sat, 9 Jul 2016 20:00:20 +0300 Subject: [PATCH] - filters do not take space anymore when they are invisible --- .../ara/sagi/thesocialnotework/GmapFragment.java | 6 +++--- .../sagi/thesocialnotework/PersonalFragment.java | 4 ++-- app/src/main/res/layout/fragment_personal.xml | 13 +++++++++---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/GmapFragment.java b/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/GmapFragment.java index 9a494ae..e91ea7f 100644 --- a/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/GmapFragment.java +++ b/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/GmapFragment.java @@ -147,7 +147,7 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback { // Log.d(TAG, "" + v.getId()); if (dateFilterIsVisible) { dateFilterIsVisible = false; - mapFilters.setVisibility(View.INVISIBLE); + mapFilters.setVisibility(View.GONE); } else { mapFilters.setVisibility(View.VISIBLE); dateFilterIsVisible = true; @@ -167,7 +167,7 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback { public void onClick(View v) { if (locationFilterIsVisible) { locationFilterIsVisible = false; - mapFilters.setVisibility(View.INVISIBLE); + mapFilters.setVisibility(View.GONE); } else { mapFilters.setVisibility(View.VISIBLE); locationFilterIsVisible = true; @@ -187,7 +187,7 @@ public class GmapFragment extends Fragment implements OnMapReadyCallback { public void onClick(View v) { if (userFilterIsVisible) { userFilterIsVisible = false; - mapFilters.setVisibility(View.INVISIBLE); + mapFilters.setVisibility(View.GONE); } else { mapFilters.setVisibility(View.VISIBLE); userFilterIsVisible = true; diff --git a/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/PersonalFragment.java b/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/PersonalFragment.java index 81573b1..cae9a6e 100644 --- a/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/PersonalFragment.java +++ b/app/src/main/java/com/android_app/matan/ara/sagi/thesocialnotework/PersonalFragment.java @@ -132,7 +132,7 @@ public class PersonalFragment extends Fragment { public void onClick(View v) { if (dateFilterIsVisible) { dateFilterIsVisible = false; - personalSpaceFilters.setVisibility(View.INVISIBLE); + personalSpaceFilters.setVisibility(View.GONE); } else { personalSpaceFilters.setVisibility(View.VISIBLE); dateFilterIsVisible = true; @@ -151,7 +151,7 @@ public class PersonalFragment extends Fragment { public void onClick(View v) { if (userFilterIsVisible) { userFilterIsVisible = false; - personalSpaceFilters.setVisibility(View.INVISIBLE); + personalSpaceFilters.setVisibility(View.GONE); } else { personalSpaceFilters.setVisibility(View.VISIBLE); userFilterIsVisible = true; diff --git a/app/src/main/res/layout/fragment_personal.xml b/app/src/main/res/layout/fragment_personal.xml index 8f0328e..51dda74 100644 --- a/app/src/main/res/layout/fragment_personal.xml +++ b/app/src/main/res/layout/fragment_personal.xml @@ -34,7 +34,8 @@ android:id="@+id/personalSpace_date_filter" android:layout_weight="1" android:src="@drawable/date_icon" - android:scaleType="fitCenter" /> + android:scaleType="fitCenter" + android:focusable="false" /> + android:src="@drawable/permission_icon" + android:focusable="false" + android:focusableInTouchMode="false" /> + android:visibility="gone" + android:id="@+id/personalSpace_filter_options" + android:clickable="false" + android:focusableInTouchMode="false">