IT. Expert System.

Android Reference

SwitchPreference


android.preference

Class SwitchPreference

    • Constructor Detail

      • SwitchPreference

        public SwitchPreference(Context context,
                        AttributeSet attrs,
                        int defStyle)
        Construct a new SwitchPreference with the given style options.
        Parameters:
        context - The Context that will style this preference
        attrs - Style attributes that differ from the default
        defStyle - Theme attribute defining the default style options
      • SwitchPreference

        public SwitchPreference(Context context,
                        AttributeSet attrs)
        Construct a new SwitchPreference with the given style options.
        Parameters:
        context - The Context that will style this preference
        attrs - Style attributes that differ from the default
      • SwitchPreference

        public SwitchPreference(Context context)
        Construct a new SwitchPreference with default style options.
        Parameters:
        context - The Context that will style this preference
    • Method Detail

      • onBindView

        protected void onBindView(View view)
        Description copied from class: Preference
        Binds the created View to the data for this Preference.

        This is a good place to grab references to custom Views in the layout and set properties on them.

        Make sure to call through to the superclass's implementation.

        Overrides:
        onBindView in class Preference
        Parameters:
        view - The View that shows this Preference.
        See Also:
        Preference.onCreateView(ViewGroup)
      • setSwitchTextOn

        public void setSwitchTextOn(CharSequence onText)
        Set the text displayed on the switch widget in the on state. This should be a very short string; one word if possible.
        Parameters:
        onText - Text to display in the on state
      • setSwitchTextOff

        public void setSwitchTextOff(CharSequence offText)
        Set the text displayed on the switch widget in the off state. This should be a very short string; one word if possible.
        Parameters:
        offText - Text to display in the off state
      • setSwitchTextOn

        public void setSwitchTextOn(int resId)
        Set the text displayed on the switch widget in the on state. This should be a very short string; one word if possible.
        Parameters:
        resId - The text as a string resource ID
      • setSwitchTextOff

        public void setSwitchTextOff(int resId)
        Set the text displayed on the switch widget in the off state. This should be a very short string; one word if possible.
        Parameters:
        resId - The text as a string resource ID
      • getSwitchTextOn

        public CharSequence getSwitchTextOn()
        Returns:
        The text that will be displayed on the switch widget in the on state
      • getSwitchTextOff

        public CharSequence getSwitchTextOff()
        Returns:
        The text that will be displayed on the switch widget in the off state


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3161 / . Delta: 0.05083 с