congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RestrictionEntry.getSelectedState
Code IndexAdd Tabnine to your IDE (free)

How to use
getSelectedState
method
in
android.content.RestrictionEntry

Best Java code snippets using android.content.RestrictionEntry.getSelectedState (Showing top 2 results out of 315)

origin: googlesamples/android-AppRestrictionSchema

private void updateCanSayHello(RestrictionEntry entry, Bundle restrictions) {
  boolean canSayHello;
  if (restrictions == null || !restrictions.containsKey(KEY_CAN_SAY_HELLO)) {
    canSayHello = entry.getSelectedState();
  } else {
    canSayHello = restrictions.getBoolean(KEY_CAN_SAY_HELLO);
  }
  mTextSayHello.setText(canSayHello ?
      R.string.explanation_can_say_hello_true :
      R.string.explanation_can_say_hello_false);
  mButtonSayHello.setEnabled(canSayHello);
}
origin: googlesamples/android-AppRestrictionEnforcer

if (RESTRICTION_KEY_SAY_HELLO.equals(key)) {
  updateCanSayHello(prefs.getBoolean(RESTRICTION_KEY_SAY_HELLO,
      restriction.getSelectedState()));
} else if (RESTRICTION_KEY_MESSAGE.equals(key)) {
  updateMessage(prefs.getString(RESTRICTION_KEY_MESSAGE,
android.contentRestrictionEntrygetSelectedState

Popular methods of RestrictionEntry

  • getKey
  • getAllSelectedStrings
  • getIntValue
  • getSelectedString
  • setTitle
  • <init>
  • getChoiceValues
  • setChoiceEntries
  • setChoiceValues
  • setDescription
  • setType
  • setType

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • setScale (BigDecimal)
  • putExtra (Intent)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Menu (java.awt)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • JTable (javax.swing)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now