1 package com.introlab.rtabmap;
3 import android.content.Context;
4 import android.preference.SwitchPreference;
5 import android.util.AttributeSet;
6 import android.view.View;
7 import android.view.ViewGroup;
8 import android.widget.Switch;
28 super(context, attrs, defStyle);
38 super(context, attrs);
53 ViewGroup viewGroup= (ViewGroup)view;
55 super.onBindView(view);
64 if (null == viewGroup) {
68 int count = viewGroup.getChildCount();
69 for(
int n = 0; n < count; ++n) {
70 View childView = viewGroup.getChildAt(n);
71 if(childView instanceof Switch) {
72 final Switch switchView = (Switch) childView;
73 switchView.setOnCheckedChangeListener(null);
75 }
else if (childView instanceof ViewGroup){
76 ViewGroup childGroup = (ViewGroup)childView;
CustomSwitchPreference(Context context, AttributeSet attrs, int defStyle)
CustomSwitchPreference(Context context)
CustomSwitchPreference(Context context, AttributeSet attrs)
void onBindView(View view)
void clearListenerInViewGroup(ViewGroup viewGroup)