Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/fov_telephoto"
android:textSize="10sp"
android:textSize="11sp"
android:paddingStart="2dp"
android:paddingEnd="2dp"
/>
Expand All @@ -136,7 +136,7 @@
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:text="@string/fov_standard"
android:textSize="10sp"
android:textSize="11sp"
android:paddingStart="2dp"
android:paddingEnd="2dp"
/>
Expand All @@ -149,7 +149,7 @@
android:layout_weight="1"
android:layout_marginEnd="2dp"
android:text="@string/fov_wide"
android:textSize="10sp"
android:textSize="11sp"
android:paddingStart="2dp"
android:paddingEnd="2dp"
/>
Expand All @@ -161,7 +161,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/fov_ultrawide"
android:textSize="10sp"
android:textSize="11sp"
android:paddingStart="2dp"
android:paddingEnd="2dp"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,52 +70,43 @@
</LinearLayout>

<!-- Collapsible Content Section -->
<LinearLayout
android:id="@+id/card_content"
<RadioGroup
android:id="@+id/rg_map_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingBottom="12dp"
android:layout_marginTop="4dp"
>

<RadioGroup
android:id="@+id/rg_map_mode"
android:layout_width="match_parent"
<RadioButton
android:id="@+id/rb_roadmap"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="4dp"
>

<RadioButton
android:id="@+id/rb_roadmap"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/roadmap"
/>

<RadioButton
android:id="@+id/rb_hybrid"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/hybrid"
/>
android:checked="true"
android:text="@string/roadmap"
/>

<RadioButton
android:id="@+id/rb_satellite"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/satellite"
/>
</RadioGroup>
<RadioButton
android:id="@+id/rb_hybrid"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/hybrid"
/>

</LinearLayout>
<RadioButton
android:id="@+id/rb_satellite"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/satellite"
/>
</RadioGroup>

</LinearLayout>
</androidx.cardview.widget.CardView>
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
private void initViews() {
controlsCard = findViewById(R.id.control_panel);
cardHeader = findViewById(R.id.card_header);
cardContent = findViewById(R.id.card_content);
cardContent = findViewById(R.id.rg_map_mode);
btnCollapse = findViewById(R.id.btn_collapse);
rgMapMode = findViewById(R.id.rg_map_mode);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package com.example.maps3dkotlin.datavisualization

import android.graphics.Color
import android.os.Bundle
import androidx.core.graphics.toColorInt
import android.os.Handler
import android.os.Looper
import android.transition.TransitionManager
Expand Down Expand Up @@ -278,32 +279,32 @@ class DataVisualizationActivity : SampleBaseActivity() {
when {
currentFloodHeightMeters <= 2.0 -> {
floodRiskBadge.setText(R.string.flood_risk_baseline)
floodRiskBadge.setTextColor(Color.parseColor("#008800"))
floodRiskBadge.setBackgroundColor(Color.parseColor("#2000AA00"))
floodRiskBadge.setTextColor("#008800".toColorInt())
floodRiskBadge.setBackgroundColor("#2000AA00".toColorInt())
}

currentFloodHeightMeters <= 8.0 -> {
floodRiskBadge.setText(R.string.flood_risk_minor)
floodRiskBadge.setTextColor(Color.parseColor("#BB7700"))
floodRiskBadge.setBackgroundColor(Color.parseColor("#20FFAA00"))
floodRiskBadge.setTextColor("#BB7700".toColorInt())
floodRiskBadge.setBackgroundColor("#20FFAA00".toColorInt())
}

currentFloodHeightMeters <= 20.0 -> {
floodRiskBadge.setText(R.string.flood_risk_moderate)
floodRiskBadge.setTextColor(Color.parseColor("#0077CC"))
floodRiskBadge.setBackgroundColor(Color.parseColor("#200088FF"))
floodRiskBadge.setTextColor("#0077CC".toColorInt())
floodRiskBadge.setBackgroundColor("#200088FF".toColorInt())
}

currentFloodHeightMeters <= 35.0 -> {
floodRiskBadge.setText(R.string.flood_risk_storm_surge)
floodRiskBadge.setTextColor(Color.parseColor("#DD4400"))
floodRiskBadge.setBackgroundColor(Color.parseColor("#25FF5500"))
floodRiskBadge.setTextColor("#DD4400".toColorInt())
floodRiskBadge.setBackgroundColor("#25FF5500".toColorInt())
}

else -> {
floodRiskBadge.setText(R.string.flood_risk_extreme)
floodRiskBadge.setTextColor(Color.parseColor("#CC0000"))
floodRiskBadge.setBackgroundColor(Color.parseColor("#25FF0000"))
floodRiskBadge.setTextColor("#CC0000".toColorInt())
floodRiskBadge.setBackgroundColor("#25FF0000".toColorInt())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package com.example.maps3dkotlin.pathfollowing

import android.graphics.Color
import android.os.Bundle
import androidx.core.graphics.toColorInt
import android.os.Handler
import android.os.Looper
import android.view.MotionEvent
Expand Down Expand Up @@ -447,7 +447,7 @@ class PathFollowingActivity : AppCompatActivity(), OnMap3DViewReadyCallback {
val staticOptions = PolylineOptions().apply {
id = STATIC_ROUTE_POLYLINE_ID
path = staticVertices
strokeColor = Color.parseColor("#4285F4") // Wide blue route
strokeColor = "#4285F4".toColorInt() // Wide blue route
strokeWidth = 16.0
zIndex = 1
altitudeMode = pathAltitudeMode
Expand Down Expand Up @@ -493,7 +493,7 @@ class PathFollowingActivity : AppCompatActivity(), OnMap3DViewReadyCallback {
val progressOptions = PolylineOptions().apply {
id = PROGRESS_POLYLINE_ID
path = progressCoordinates
strokeColor = Color.parseColor("#9C27B0") // Narrow purple progress
strokeColor = "#9C27B0".toColorInt() // Narrow purple progress
strokeWidth = 8.0
zIndex = 2
altitudeMode = pathAltitudeMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class RoadmapModeActivity : SampleBaseActivity() {
private fun initViews() {
controlsCard = findViewById(R.id.control_panel)
cardHeader = findViewById(R.id.card_header)
cardContent = findViewById(R.id.card_content)
cardContent = findViewById(R.id.rg_map_mode)
btnCollapse = findViewById(R.id.btn_collapse)
rgMapMode = findViewById(R.id.rg_map_mode)

Expand Down