Skip to content

Commit db01c63

Browse files
committed
refactor(ui): Use android:name for FragmentContainerView
This commit updates the layout files to use the `android:name` attribute instead of the `class` attribute for `FragmentContainerView` to declare the fragment class. This is the modern, recommended practice. It also removes minor whitespace and `onClick` attributes that are no longer necessary. - Replaces the `class` attribute with `android:name` for all instances of `SupportMapFragment` and `SupportStreetViewPanoramaFragment` within `FragmentContainerView` tags across multiple demo layouts. - Removes unnecessary `onClick` attributes from checkboxes in `layers_demo.xml`. - Cleans up minor whitespace in `camera_clamping_demo.xml`, `street_view_panorama_navigation_demo.xml`, `indoor_demo.xml`, and `ground_overlay_demo.xml`.
1 parent 57ede12 commit db01c63

30 files changed

+36
-50
lines changed

ApiDemos/project/common-ui/src/main/res/layout/background_color_customization_demo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
android:layout_width="0dp"
3838
android:layout_height="0dp"
3939
map:backgroundColor="#fff0b2dd"
40-
class="com.google.android.gms.maps.SupportMapFragment"
40+
android:name="com.google.android.gms.maps.SupportMapFragment"
4141
app:layout_constraintTop_toBottomOf="@+id/top_bar"
4242
app:layout_constraintBottom_toBottomOf="parent"
4343
app:layout_constraintStart_toStartOf="parent"

ApiDemos/project/common-ui/src/main/res/layout/background_color_customization_programmatic_demo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
<androidx.fragment.app.FragmentContainerView
4040
android:id="@+id/map"
41-
class="com.google.android.gms.maps.SupportMapFragment"
41+
android:name="com.google.android.gms.maps.SupportMapFragment"
4242
android:layout_width="0dp"
4343
android:layout_height="0dp"
4444
app:layout_constraintBottom_toBottomOf="parent"

ApiDemos/project/common-ui/src/main/res/layout/basic_demo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
<androidx.fragment.app.FragmentContainerView
3434
android:id="@+id/map"
35-
class="com.google.android.gms.maps.SupportMapFragment"
35+
android:name="com.google.android.gms.maps.SupportMapFragment"
3636
android:layout_width="match_parent"
3737
android:layout_height="match_parent"
3838
app:layout_constraintBottom_toBottomOf="parent"

ApiDemos/project/common-ui/src/main/res/layout/camera_clamping_demo.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
app:layout_constraintTop_toBottomOf="@+id/container"
3737
app:layout_constraintBottom_toBottomOf="parent"
3838
android:id="@+id/map"
39-
class="com.google.android.gms.maps.SupportMapFragment"
39+
android:name="com.google.android.gms.maps.SupportMapFragment"
4040
android:layout_width="fill_parent"
4141
android:layout_height="fill_parent"
4242
map:cameraMaxZoomPreference="14.0"
@@ -93,7 +93,6 @@
9393
android:layout_width="wrap_content"
9494
android:layout_height="wrap_content"
9595
android:layout_weight="0.5"
96-
9796
android:text="@string/clamp_latlng_adelaide" />
9897

9998
<com.google.android.material.button.MaterialButton

ApiDemos/project/common-ui/src/main/res/layout/camera_demo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
<androidx.fragment.app.FragmentContainerView
3434
android:id="@+id/map"
35-
class="com.google.android.gms.maps.SupportMapFragment"
35+
android:name="com.google.android.gms.maps.SupportMapFragment"
3636
android:layout_width="match_parent"
3737
android:layout_height="match_parent" />
3838

ApiDemos/project/common-ui/src/main/res/layout/circle_demo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134

135135
<androidx.fragment.app.FragmentContainerView
136136
android:id="@+id/map"
137-
class="com.google.android.gms.maps.SupportMapFragment"
137+
android:name="com.google.android.gms.maps.SupportMapFragment"
138138
android:layout_width="match_parent"
139139
android:layout_height="match_parent" />
140140

ApiDemos/project/common-ui/src/main/res/layout/cloud_styling_basic_demo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
<androidx.fragment.app.FragmentContainerView
3636
android:id="@+id/map"
37-
class="com.google.android.gms.maps.SupportMapFragment"
37+
android:name="com.google.android.gms.maps.SupportMapFragment"
3838
android:layout_width="match_parent"
3939
android:layout_height="match_parent"
4040
map:cameraTargetLat="47.6089945"

ApiDemos/project/common-ui/src/main/res/layout/events_demo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<androidx.fragment.app.FragmentContainerView
3333
android:id="@+id/map"
34-
class="com.google.android.gms.maps.SupportMapFragment"
34+
android:name="com.google.android.gms.maps.SupportMapFragment"
3535
android:layout_width="match_parent"
3636
android:layout_height="match_parent"
3737
app:layout_constraintTop_toBottomOf="@+id/top_bar" />

ApiDemos/project/common-ui/src/main/res/layout/ground_overlay_demo.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<androidx.fragment.app.FragmentContainerView
3333
android:id="@+id/map"
34-
class="com.google.android.gms.maps.SupportMapFragment"
34+
android:name="com.google.android.gms.maps.SupportMapFragment"
3535
android:layout_width="match_parent"
3636
android:layout_height="match_parent"
3737
app:layout_constraintTop_toBottomOf="@+id/container" />
@@ -65,7 +65,6 @@
6565
android:layout_width="wrap_content"
6666
android:layout_height="wrap_content"
6767
android:layout_below="@+id/transparencySeekBar"
68-
6968
android:text="@string/switch_image" />
7069

7170
<com.google.android.material.checkbox.MaterialCheckBox

ApiDemos/project/common-ui/src/main/res/layout/indoor_demo.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
android:id="@+id/map"
3535
android:layout_width="0dp"
3636
android:layout_height="0dp"
37-
class="com.google.android.gms.maps.SupportMapFragment"
37+
android:name="com.google.android.gms.maps.SupportMapFragment"
3838
app:layout_constraintTop_toBottomOf="@id/top_bar"
3939
app:layout_constraintBottom_toTopOf="@+id/scrollView"
4040
app:layout_constraintStart_toStartOf="parent"
@@ -67,7 +67,6 @@
6767
android:id="@+id/focused_bulding_info_button"
6868
android:layout_width="wrap_content"
6969
android:layout_height="wrap_content"
70-
7170
android:text="@string/focused_building_info" />
7271

7372
<com.google.android.material.button.MaterialButton

0 commit comments

Comments
 (0)