[android] Migrate last components in altitude chart panel to Material components

Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
Jean-Baptiste
2025-09-01 17:49:37 +02:00
committed by x7z4w
parent 7eb17f612b
commit a5e55491fc
4 changed files with 12 additions and 14 deletions

View File

@@ -20,9 +20,7 @@ import android.text.style.StyleSpan;
import android.text.style.TypefaceSpan; import android.text.style.TypefaceSpan;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView;
import android.widget.ScrollView; import android.widget.ScrollView;
import android.widget.TextView;
import androidx.annotation.IdRes; import androidx.annotation.IdRes;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@@ -70,13 +68,13 @@ final class RoutingBottomMenuController implements View.OnClickListener
@NonNull @NonNull
private final MaterialButton mStart; private final MaterialButton mStart;
@NonNull @NonNull
private final ImageView mAltitudeChart; private final ShapeableImageView mAltitudeChart;
@NonNull @NonNull
private final MaterialTextView mTime; private final MaterialTextView mTime;
@NonNull @NonNull
private final MaterialTextView mAltitudeDifference; private final MaterialTextView mAltitudeDifference;
@NonNull @NonNull
private final TextView mTimeVehicle; private final MaterialTextView mTimeVehicle;
@Nullable @Nullable
private final MaterialTextView mArrival; private final MaterialTextView mArrival;
@NonNull @NonNull
@@ -102,9 +100,9 @@ final class RoutingBottomMenuController implements View.OnClickListener
View transitFrame = getViewById(activity, frame, R.id.transit_panel); View transitFrame = getViewById(activity, frame, R.id.transit_panel);
MaterialTextView error = (MaterialTextView) getViewById(activity, frame, R.id.error); MaterialTextView error = (MaterialTextView) getViewById(activity, frame, R.id.error);
MaterialButton start = (MaterialButton) getViewById(activity, frame, R.id.start); MaterialButton start = (MaterialButton) getViewById(activity, frame, R.id.start);
ImageView altitudeChart = (ImageView) getViewById(activity, frame, R.id.altitude_chart); ShapeableImageView altitudeChart = (ShapeableImageView) getViewById(activity, frame, R.id.altitude_chart);
MaterialTextView time = (MaterialTextView) getViewById(activity, frame, R.id.time); MaterialTextView time = (MaterialTextView) getViewById(activity, frame, R.id.time);
TextView timeVehicle = (TextView) getViewById(activity, frame, R.id.time_vehicle); MaterialTextView timeVehicle = (MaterialTextView) getViewById(activity, frame, R.id.time_vehicle);
MaterialTextView altitudeDifference = (MaterialTextView) getViewById(activity, frame, R.id.altitude_difference); MaterialTextView altitudeDifference = (MaterialTextView) getViewById(activity, frame, R.id.altitude_difference);
MaterialTextView arrival = (MaterialTextView) getViewById(activity, frame, R.id.arrival); MaterialTextView arrival = (MaterialTextView) getViewById(activity, frame, R.id.arrival);
View actionFrame = getViewById(activity, frame, R.id.routing_action_frame); View actionFrame = getViewById(activity, frame, R.id.routing_action_frame);
@@ -124,8 +122,8 @@ final class RoutingBottomMenuController implements View.OnClickListener
private RoutingBottomMenuController(@NonNull Activity context, @NonNull View altitudeChartFrame, private RoutingBottomMenuController(@NonNull Activity context, @NonNull View altitudeChartFrame,
@NonNull View timeElevationLine, @NonNull View transitFrame, @NonNull View timeElevationLine, @NonNull View transitFrame,
@NonNull MaterialTextView error, @NonNull MaterialButton start, @NonNull MaterialTextView error, @NonNull MaterialButton start,
@NonNull ImageView altitudeChart, @NonNull MaterialTextView time, @NonNull ShapeableImageView altitudeChart, @NonNull MaterialTextView time,
@NonNull MaterialTextView altitudeDifference, @NonNull TextView timeVehicle, @NonNull MaterialTextView altitudeDifference, @NonNull MaterialTextView timeVehicle,
@Nullable MaterialTextView arrival, @NonNull View actionFrame, @Nullable MaterialTextView arrival, @NonNull View actionFrame,
@Nullable RoutingBottomMenuListener listener) @Nullable RoutingBottomMenuListener listener)
{ {

View File

@@ -47,14 +47,14 @@
tools:visibility="visible" /> tools:visibility="visible" />
</LinearLayout> </LinearLayout>
<ImageView <com.google.android.material.imageview.ShapeableImageView
android:id="@+id/altitude_chart" android:id="@+id/altitude_chart"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:layout_gravity="center_vertical" /> android:layout_gravity="center_vertical" />
<TextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/time_vehicle" android:id="@+id/time_vehicle"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -56,7 +56,7 @@
android:layout_marginEnd="@dimen/margin_base" android:layout_marginEnd="@dimen/margin_base"
android:layout_gravity="top" > android:layout_gravity="top" >
<TextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/time_vehicle" android:id="@+id/time_vehicle"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -76,7 +76,7 @@
android:textSize="@dimen/text_size_routing_plan_detail_arrival"/> android:textSize="@dimen/text_size_routing_plan_detail_arrival"/>
</LinearLayout> </LinearLayout>
<ImageView <com.google.android.material.imageview.ShapeableImageView
android:id="@+id/altitude_chart" android:id="@+id/altitude_chart"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -57,11 +57,11 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:layout_weight="1"> android:layout_weight="1">
<ImageView <com.google.android.material.imageview.ShapeableImageView
android:id="@+id/altitude_chart" android:id="@+id/altitude_chart"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="match_parent" /> android:layout_width="match_parent" />
<TextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/time_vehicle" android:id="@+id/time_vehicle"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"