summaryrefslogtreecommitdiffhomepage
path: root/ui
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-03-10 12:32:23 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-03-10 12:32:23 +0530
commit37adab76e1c0be0e46af3d3d1bd82da3b40b027e (patch)
tree5762caddf0c5b63babd4b4b73cda47031f4b66bc /ui
parent5d342ee1abd347193632dc6f4b00c68189a74d89 (diff)
BaseFragment: Always anchor Snackbars to FAB
This makes tunnel list fragment correctly render them above the FAB. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/BaseFragment.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/BaseFragment.java b/ui/src/main/java/com/wireguard/android/fragment/BaseFragment.java
index dfdcbac1..9e7b635a 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/BaseFragment.java
+++ b/ui/src/main/java/com/wireguard/android/fragment/BaseFragment.java
@@ -119,7 +119,7 @@ public abstract class BaseFragment extends Fragment implements OnSelectedTunnelC
final String message = requireContext().getString(messageResId, error);
final View view = getView();
if (view != null)
- Snackbar.make(view, message, Snackbar.LENGTH_LONG).show();
+ Snackbar.make(view, message, Snackbar.LENGTH_LONG).setAnchorView(view.findViewById(R.id.create_fab)).show();
else
Toast.makeText(requireContext(), message, Toast.LENGTH_LONG).show();
Log.e(TAG, message, throwable);