Code example for Switch

            mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            // Temp Switches provided as placeholder until the adapter replaces these with actual 
            // Switches inflated from their layouts. Must be done before adapter is set in super 
            mWifiEnabler = new WifiEnabler(context, new Switch(context));
            mBluetoothEnabler = new BluetoothEnabler(context, new Switch(context));
            mProfileEnabler = new ProfileEnabler(context, new Switch(context));
        public View getView(int position, View convertView, ViewGroup parent) {
            HeaderViewHolder holder;
            Header header = getItem(position);
            int headerType = getHeaderType(header);
            View view = null;
            if (convertView == null || headerType == HEADER_TYPE_SWITCH) {
                holder = new HeaderViewHolder();
                switch (headerType) {
                    case HEADER_TYPE_CATEGORY:
                        view = new TextView(getContext(), null,