Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Commit 21a4719

Browse files
committed
convert to switchcompat
1 parent d47e9f5 commit 21a4719

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

mapcache/src/main/java/mil/nga/mapcache/view/layer/LayerDetailViewHolder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import android.widget.Switch;
1010
import android.widget.TextView;
1111

12+
import androidx.appcompat.widget.SwitchCompat;
1213
import androidx.recyclerview.widget.RecyclerView;
1314

1415
import com.google.android.material.button.MaterialButton;
@@ -54,7 +55,7 @@ public class LayerDetailViewHolder extends RecyclerView.ViewHolder{
5455
/**
5556
* active / inactive switch
5657
*/
57-
private final Switch layerOn;
58+
private final SwitchCompat layerOn;
5859

5960
/**
6061
* Description
@@ -145,7 +146,7 @@ public LayerDetailViewHolder(View view, View.OnClickListener backListener,
145146
layerCountDetailText = (TextView) view.findViewById(R.id.layerCountDetail);
146147
layerTypeIcon = (ImageView) view.findViewById(R.id.layer_type_icon);
147148
descriptionText = (TextView) view.findViewById(R.id.text_description);
148-
layerOn = (Switch) view.findViewById(R.id.enableSwitch);
149+
layerOn = view.findViewById(R.id.enableSwitch);
149150
mLayerDelete = view.findViewById(R.id.layerDeleteButton);
150151
mLayerRename = view.findViewById(R.id.layerRenameButton);
151152
mLayerCopy = view.findViewById(R.id.layerCopyButton);

mapcache/src/main/res/layout/fragment_layer_detail.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
android:textColor="@color/grey_blue_secondary"
210210
android:textAppearance="@style/textAppearanceSubtitle2_light_heavy" />
211211

212-
<Switch
212+
<androidx.appcompat.widget.SwitchCompat
213213
android:id="@+id/enableSwitch"
214214
android:layout_width="wrap_content"
215215
android:layout_height="wrap_content"

0 commit comments

Comments
 (0)