diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2020-02-23 20:00:19 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2020-02-25 08:57:27 +0530 |
commit | e5e2e7571fc16f18b431f8cadeb583bc5783a9f6 (patch) | |
tree | 31325a163ee40751010146051a9dfea3043e89be /app/src/main/java/com/wireguard | |
parent | c889a8c8dea7db9fdf9374ff7d72537434932560 (diff) |
Setup EdgeToEdge
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/java/com/wireguard')
3 files changed, 10 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.java index 353a5dff..57e0d8ea 100644 --- a/app/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.java +++ b/app/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.java @@ -20,6 +20,7 @@ import com.wireguard.android.databinding.TunnelDetailFragmentBinding; import com.wireguard.android.databinding.TunnelDetailPeerBinding; import com.wireguard.android.model.Tunnel; import com.wireguard.android.model.Tunnel.State; +import com.wireguard.android.ui.EdgeToEdge; import com.wireguard.crypto.Key; import java.util.Timer; @@ -72,6 +73,8 @@ public class TunnelDetailFragment extends BaseFragment { super.onCreateView(inflater, container, savedInstanceState); binding = TunnelDetailFragmentBinding.inflate(inflater, container, false); binding.executePendingBindings(); + EdgeToEdge.setUpRoot((ViewGroup) binding.getRoot()); + EdgeToEdge.setUpScrollingContent((ViewGroup) binding.getRoot(), null); return binding.getRoot(); } diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java index 4990e69f..960b6d93 100644 --- a/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java +++ b/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java @@ -28,6 +28,7 @@ import com.wireguard.android.databinding.TunnelEditorFragmentBinding; import com.wireguard.android.fragment.AppListDialogFragment.AppExclusionListener; import com.wireguard.android.model.Tunnel; import com.wireguard.android.model.TunnelManager; +import com.wireguard.android.ui.EdgeToEdge; import com.wireguard.android.util.ErrorMessages; import com.wireguard.android.viewmodel.ConfigProxy; import com.wireguard.config.Config; @@ -89,6 +90,8 @@ public class TunnelEditorFragment extends BaseFragment implements AppExclusionLi super.onCreateView(inflater, container, savedInstanceState); binding = TunnelEditorFragmentBinding.inflate(inflater, container, false); binding.executePendingBindings(); + EdgeToEdge.setUpRoot((ViewGroup) binding.getRoot()); + EdgeToEdge.setUpScrollingContent(binding.mainContainer, null); return binding.getRoot(); } diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java index c86da99e..d903fa10 100644 --- a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java +++ b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java @@ -37,6 +37,7 @@ import com.wireguard.android.databinding.ObservableKeyedRecyclerViewAdapter; import com.wireguard.android.databinding.TunnelListFragmentBinding; import com.wireguard.android.databinding.TunnelListItemBinding; import com.wireguard.android.model.Tunnel; +import com.wireguard.android.ui.EdgeToEdge; import com.wireguard.android.util.ErrorMessages; import com.wireguard.android.widget.MultiselectableRelativeLayout; import com.wireguard.config.BadConfigException; @@ -222,6 +223,9 @@ public class TunnelListFragment extends BaseFragment { bottomSheet.show(requireFragmentManager(), "BOTTOM_SHEET"); }); binding.executePendingBindings(); + EdgeToEdge.setUpRoot((ViewGroup) binding.getRoot()); + EdgeToEdge.setUpFAB(binding.createFab); + EdgeToEdge.setUpScrollingContent(binding.tunnelList, binding.createFab); return binding.getRoot(); } |