mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
Compare commits
1 Commits
8cffa508f3
...
fx_topbar
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7eaacbef14 |
@@ -102,7 +102,7 @@ public class NavigationController implements TrafficManager.TrafficCallback, Nav
|
||||
final View navigationBarBackground = mFrame.findViewById(R.id.nav_bottom_sheet_nav_bar);
|
||||
final View nextTurnContainer = mFrame.findViewById(R.id.nav_next_turn_container);
|
||||
ViewCompat.setOnApplyWindowInsetsListener(mStreetFrame, (v, windowInsets) -> {
|
||||
UiUtils.setViewInsetsPaddingNoBottom(v, windowInsets);
|
||||
UiUtils.setViewNavigationInsetsPaddingNoBottom(v, windowInsets);
|
||||
|
||||
final Insets safeDrawingInsets = windowInsets.getInsets(WindowInsetUtils.TYPE_SAFE_DRAWING);
|
||||
nextTurnContainer.setPadding(safeDrawingInsets.left, nextTurnContainer.getPaddingTop(),
|
||||
@@ -113,6 +113,10 @@ public class NavigationController implements TrafficManager.TrafficCallback, Nav
|
||||
navigationBarBackground.getLayoutParams().width = mFrame.findViewById(R.id.nav_bottom_sheet).getWidth();
|
||||
return windowInsets;
|
||||
});
|
||||
ViewCompat.setOnApplyWindowInsetsListener(turnFrame, (v, windowInsets) -> {
|
||||
UiUtils.setViewNavigationInsetsPaddingNoBottom(v, windowInsets);
|
||||
return windowInsets;
|
||||
});
|
||||
}
|
||||
|
||||
private void updateVehicle(@NonNull RoutingInfo info)
|
||||
|
||||
@@ -281,6 +281,12 @@ public final class UiUtils
|
||||
view.setPadding(systemInsets.left, systemInsets.top, systemInsets.right, view.getPaddingBottom());
|
||||
}
|
||||
|
||||
public static void setViewNavigationInsetsPaddingNoBottom(View view, WindowInsetsCompat windowInsets)
|
||||
{
|
||||
final Insets systemInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||
view.setPadding(systemInsets.left, systemInsets.top, systemInsets.right, view.getPaddingBottom());
|
||||
}
|
||||
|
||||
public static void setupNavigationIcon(@NonNull MaterialToolbar toolbar, @NonNull View.OnClickListener listener)
|
||||
{
|
||||
View customNavigationButton = toolbar.findViewById(R.id.back);
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/statutbar"
|
||||
android:layout_height="15dp"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/street_frame"
|
||||
android:layout_width="500dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_half_plus_eight"
|
||||
android:layout_marginTop="@dimen/margin_quarter"
|
||||
android:layout_marginEnd="@dimen/margin_quarter"
|
||||
app:cardCornerRadius="@dimen/margin_half"
|
||||
android:elevation="@dimen/nav_elevation"
|
||||
@@ -52,7 +52,7 @@
|
||||
app:layout_constraintEnd_toStartOf="@+id/street_frame"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/statutbar"
|
||||
android:layout_marginTop="@dimen/margin_half_plus_eight"
|
||||
android:layout_marginTop="@dimen/margin_quarter"
|
||||
android:layout_marginStart="@dimen/margin_quarter"
|
||||
android:clickable="true"
|
||||
android:elevation="@dimen/nav_elevation">
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/statutbar"
|
||||
android:layout_height="25dp"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/street_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_half_plus"
|
||||
android:layout_marginTop="@dimen/margin_quarter"
|
||||
android:layout_marginStart="@dimen/nav_street_left"
|
||||
android:layout_marginEnd="@dimen/margin_quarter"
|
||||
app:cardCornerRadius="@dimen/margin_half"
|
||||
@@ -55,7 +55,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/statutbar"
|
||||
android:layout_marginStart="@dimen/margin_half"
|
||||
android:layout_marginTop="@dimen/margin_half_plus"
|
||||
android:layout_marginTop="@dimen/margin_quarter"
|
||||
android:clickable="true"
|
||||
android:elevation="@dimen/nav_elevation">
|
||||
<LinearLayout
|
||||
|
||||
Reference in New Issue
Block a user