17 package eu.intermodalics.tango_ros_streamer.android;
19 import android.content.Context;
20 import android.preference.SwitchPreference;
21 import android.util.AttributeSet;
22 import android.view.View;
23 import android.view.ViewGroup;
24 import android.widget.Switch;
44 super(context, attrs, defStyle);
54 super(context, attrs);
69 ViewGroup viewGroup= (ViewGroup)view;
71 super.onBindView(view);
80 if (null == viewGroup) {
84 int count = viewGroup.getChildCount();
85 for(
int n = 0; n < count; ++n) {
86 View childView = viewGroup.getChildAt(n);
87 if(childView instanceof Switch) {
88 final Switch switchView = (Switch) childView;
89 switchView.setOnCheckedChangeListener(null);
91 }
else if (childView instanceof ViewGroup){
92 ViewGroup childGroup = (ViewGroup)childView;
CustomSwitchPreference(Context context)
CustomSwitchPreference(Context context, AttributeSet attrs, int defStyle)
void onBindView(View view)
CustomSwitchPreference(Context context, AttributeSet attrs)
void clearListenerInViewGroup(ViewGroup viewGroup)