mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-05-08 21:12:26 +00:00
Fix inset issues on older platforms
Fix issues in fab, connections, apps, stats, log and app details
This commit is contained in:
@@ -1858,7 +1858,7 @@ public class Utils {
|
||||
mlp.rightMargin = insets.right;
|
||||
v.setLayoutParams(mlp);
|
||||
|
||||
return WindowInsetsCompat.CONSUMED;
|
||||
return windowInsets;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class BaseActivity extends AppCompatActivity {
|
||||
if (topInset > 0)
|
||||
view.setPadding(0, topInset, 0, 0); // Shift the toolbar down if needed
|
||||
|
||||
return WindowInsetsCompat.CONSUMED;
|
||||
return insets;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ public class AppOverview extends Fragment implements MenuProvider {
|
||||
WindowInsetsCompat.Type.displayCutout());
|
||||
v.setPadding(insets.left, 0, insets.right, insets.bottom);
|
||||
|
||||
return WindowInsetsCompat.CONSUMED;
|
||||
return windowInsets;
|
||||
});
|
||||
sv.setClipToPadding(false);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class EmptyRecyclerView extends RecyclerView {
|
||||
// when not open, apply as a padding for an optimal edge-to-edge experience
|
||||
v.setPadding(0, 0, 0, !isImeOpen ? insets.bottom : 0);
|
||||
|
||||
return WindowInsetsCompat.CONSUMED;
|
||||
return windowInsets;
|
||||
});
|
||||
setClipToPadding(false);
|
||||
}
|
||||
@@ -158,7 +158,7 @@ public class EmptyRecyclerView extends RecyclerView {
|
||||
WindowInsetsCompat.Type.displayCutout());
|
||||
v.setPadding(0, insets.top, 0, 0);
|
||||
|
||||
return WindowInsetsCompat.CONSUMED;
|
||||
return windowInsets;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
tools:openDrawer="start">
|
||||
|
||||
<include
|
||||
layout="@layout/main_screen"
|
||||
layout="@layout/tabs_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activities.MainActivity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/app_bar_layout">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:background="@color/colorActionBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppBarOverlay"
|
||||
app:popupTheme="@style/PopupOverlay" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:tabTextColor="@color/colorTabText"
|
||||
app:tabSelectedTextColor="@color/colorTabTextSelected"
|
||||
app:tabIndicatorColor="@color/colorTab"
|
||||
app:tabMaxWidth="0dp"
|
||||
app:tabGravity="fill" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
Reference in New Issue
Block a user