Java Code Examples for android.support.v4.util.ArrayMap#keySet()

The following examples show how to use android.support.v4.util.ArrayMap#keySet() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DataBindingUtils.java    From chaoli-forum-for-android-2 with GNU General Public License v3.0 5 votes vote down vote up
public static void removeCallbacks(BaseActivity activity) {
    ArrayMap<Observable, Observable.OnPropertyChangedCallback> localMap = mGlobalMap.get(activity);
    if (localMap != null) {
        for (Observable observable : localMap.keySet()) {
            observable.removeOnPropertyChangedCallback(localMap.get(observable));
        }
    }
}
 
Example 2
Source File: BackStackRecord.java    From adt-leanback-support with Apache License 2.0 5 votes vote down vote up
private void callSharedElementEnd(TransitionState state, Fragment inFragment,
        Fragment outFragment, boolean isBack, ArrayMap<String, View> namedViews) {
    SharedElementCallback sharedElementCallback = isBack ?
            outFragment.mEnterTransitionCallback :
            inFragment.mEnterTransitionCallback;
    if (sharedElementCallback != null) {
        ArrayList<String> names = new ArrayList<String>(namedViews.keySet());
        ArrayList<View> views = new ArrayList<View>(namedViews.values());
        sharedElementCallback.onSharedElementEnd(names, views, null);
    }
}
 
Example 3
Source File: AutofillDao_Impl.java    From android-AutofillFramework with Apache License 2.0 4 votes vote down vote up
private void __fetchRelationshipFilledAutofillFieldAscomExampleAndroidAutofillServiceModelFilledAutofillField(final ArrayMap<String, ArrayList<FilledAutofillField>> _map) {
  final Set<String> __mapKeySet = _map.keySet();
  if (__mapKeySet.isEmpty()) {
    return;
  }
  StringBuilder _stringBuilder = StringUtil.newStringBuilder();
  _stringBuilder.append("SELECT datasetId,textValue,dateValue,toggleValue,fieldTypeName FROM `FilledAutofillField` WHERE datasetId IN (");
  final int _inputSize = __mapKeySet.size();
  StringUtil.appendPlaceholders(_stringBuilder, _inputSize);
  _stringBuilder.append(")");
  final String _sql = _stringBuilder.toString();
  final int _argCount = 0 + _inputSize;
  final RoomSQLiteQuery _stmt = RoomSQLiteQuery.acquire(_sql, _argCount);
  int _argIndex = 1;
  for (String _item : __mapKeySet) {
    if (_item == null) {
      _stmt.bindNull(_argIndex);
    } else {
      _stmt.bindString(_argIndex, _item);
    }
    _argIndex ++;
  }
  final Cursor _cursor = __db.query(_stmt);
  try {
    final int _itemKeyIndex = _cursor.getColumnIndex("datasetId");
    if (_itemKeyIndex == -1) {
      return;
    }
    final int _cursorIndexOfMDatasetId = _cursor.getColumnIndexOrThrow("datasetId");
    final int _cursorIndexOfMTextValue = _cursor.getColumnIndexOrThrow("textValue");
    final int _cursorIndexOfMDateValue = _cursor.getColumnIndexOrThrow("dateValue");
    final int _cursorIndexOfMToggleValue = _cursor.getColumnIndexOrThrow("toggleValue");
    final int _cursorIndexOfMFieldTypeName = _cursor.getColumnIndexOrThrow("fieldTypeName");
    while(_cursor.moveToNext()) {
      if (!_cursor.isNull(_itemKeyIndex)) {
        final String _tmpKey = _cursor.getString(_itemKeyIndex);
        ArrayList<FilledAutofillField> _tmpCollection = _map.get(_tmpKey);
        if (_tmpCollection != null) {
          final FilledAutofillField _item_1;
          final String _tmpMDatasetId;
          _tmpMDatasetId = _cursor.getString(_cursorIndexOfMDatasetId);
          final String _tmpMTextValue;
          _tmpMTextValue = _cursor.getString(_cursorIndexOfMTextValue);
          final Long _tmpMDateValue;
          if (_cursor.isNull(_cursorIndexOfMDateValue)) {
            _tmpMDateValue = null;
          } else {
            _tmpMDateValue = _cursor.getLong(_cursorIndexOfMDateValue);
          }
          final Boolean _tmpMToggleValue;
          final Integer _tmp;
          if (_cursor.isNull(_cursorIndexOfMToggleValue)) {
            _tmp = null;
          } else {
            _tmp = _cursor.getInt(_cursorIndexOfMToggleValue);
          }
          _tmpMToggleValue = _tmp == null ? null : _tmp != 0;
          final String _tmpMFieldTypeName;
          _tmpMFieldTypeName = _cursor.getString(_cursorIndexOfMFieldTypeName);
          _item_1 = new FilledAutofillField(_tmpMDatasetId,_tmpMFieldTypeName,_tmpMTextValue,_tmpMDateValue,_tmpMToggleValue);
          _tmpCollection.add(_item_1);
        }
      }
    }
  } finally {
    _cursor.close();
  }
}
 
Example 4
Source File: AutofillDao_Impl.java    From android-AutofillFramework with Apache License 2.0 4 votes vote down vote up
private void __fetchRelationshipAutofillHintAscomExampleAndroidAutofillServiceModelAutofillHint(final ArrayMap<String, ArrayList<AutofillHint>> _map) {
  final Set<String> __mapKeySet = _map.keySet();
  if (__mapKeySet.isEmpty()) {
    return;
  }
  StringBuilder _stringBuilder = StringUtil.newStringBuilder();
  _stringBuilder.append("SELECT autofillHint,fieldTypeName FROM `AutofillHint` WHERE fieldTypeName IN (");
  final int _inputSize = __mapKeySet.size();
  StringUtil.appendPlaceholders(_stringBuilder, _inputSize);
  _stringBuilder.append(")");
  final String _sql = _stringBuilder.toString();
  final int _argCount = 0 + _inputSize;
  final RoomSQLiteQuery _stmt = RoomSQLiteQuery.acquire(_sql, _argCount);
  int _argIndex = 1;
  for (String _item : __mapKeySet) {
    if (_item == null) {
      _stmt.bindNull(_argIndex);
    } else {
      _stmt.bindString(_argIndex, _item);
    }
    _argIndex ++;
  }
  final Cursor _cursor = __db.query(_stmt);
  try {
    final int _itemKeyIndex = _cursor.getColumnIndex("fieldTypeName");
    if (_itemKeyIndex == -1) {
      return;
    }
    final int _cursorIndexOfMAutofillHint = _cursor.getColumnIndexOrThrow("autofillHint");
    final int _cursorIndexOfMFieldTypeName = _cursor.getColumnIndexOrThrow("fieldTypeName");
    while(_cursor.moveToNext()) {
      if (!_cursor.isNull(_itemKeyIndex)) {
        final String _tmpKey = _cursor.getString(_itemKeyIndex);
        ArrayList<AutofillHint> _tmpCollection = _map.get(_tmpKey);
        if (_tmpCollection != null) {
          final AutofillHint _item_1;
          final String _tmpMAutofillHint;
          _tmpMAutofillHint = _cursor.getString(_cursorIndexOfMAutofillHint);
          final String _tmpMFieldTypeName;
          _tmpMFieldTypeName = _cursor.getString(_cursorIndexOfMFieldTypeName);
          _item_1 = new AutofillHint(_tmpMAutofillHint,_tmpMFieldTypeName);
          _tmpCollection.add(_item_1);
        }
      }
    }
  } finally {
    _cursor.close();
  }
}
 
Example 5
Source File: AutofillDao_Impl.java    From android-AutofillFramework with Apache License 2.0 4 votes vote down vote up
private void __fetchRelationshipResourceIdHeuristicAscomExampleAndroidAutofillServiceModelResourceIdHeuristic(final ArrayMap<String, ArrayList<ResourceIdHeuristic>> _map) {
  final Set<String> __mapKeySet = _map.keySet();
  if (__mapKeySet.isEmpty()) {
    return;
  }
  StringBuilder _stringBuilder = StringUtil.newStringBuilder();
  _stringBuilder.append("SELECT resourceIdHeuristic,packageName,fieldTypeName FROM `ResourceIdHeuristic` WHERE fieldTypeName IN (");
  final int _inputSize = __mapKeySet.size();
  StringUtil.appendPlaceholders(_stringBuilder, _inputSize);
  _stringBuilder.append(")");
  final String _sql = _stringBuilder.toString();
  final int _argCount = 0 + _inputSize;
  final RoomSQLiteQuery _stmt = RoomSQLiteQuery.acquire(_sql, _argCount);
  int _argIndex = 1;
  for (String _item : __mapKeySet) {
    if (_item == null) {
      _stmt.bindNull(_argIndex);
    } else {
      _stmt.bindString(_argIndex, _item);
    }
    _argIndex ++;
  }
  final Cursor _cursor = __db.query(_stmt);
  try {
    final int _itemKeyIndex = _cursor.getColumnIndex("fieldTypeName");
    if (_itemKeyIndex == -1) {
      return;
    }
    final int _cursorIndexOfMResourceIdHeuristic = _cursor.getColumnIndexOrThrow("resourceIdHeuristic");
    final int _cursorIndexOfMPackageName = _cursor.getColumnIndexOrThrow("packageName");
    final int _cursorIndexOfMFieldTypeName = _cursor.getColumnIndexOrThrow("fieldTypeName");
    while(_cursor.moveToNext()) {
      if (!_cursor.isNull(_itemKeyIndex)) {
        final String _tmpKey = _cursor.getString(_itemKeyIndex);
        ArrayList<ResourceIdHeuristic> _tmpCollection = _map.get(_tmpKey);
        if (_tmpCollection != null) {
          final ResourceIdHeuristic _item_1;
          final String _tmpMResourceIdHeuristic;
          _tmpMResourceIdHeuristic = _cursor.getString(_cursorIndexOfMResourceIdHeuristic);
          final String _tmpMPackageName;
          _tmpMPackageName = _cursor.getString(_cursorIndexOfMPackageName);
          final String _tmpMFieldTypeName;
          _tmpMFieldTypeName = _cursor.getString(_cursorIndexOfMFieldTypeName);
          _item_1 = new ResourceIdHeuristic(_tmpMResourceIdHeuristic,_tmpMFieldTypeName,_tmpMPackageName);
          _tmpCollection.add(_item_1);
        }
      }
    }
  } finally {
    _cursor.close();
  }
}
 
Example 6
Source File: AutofillDao_Impl.java    From android-AutofillFramework with Apache License 2.0 4 votes vote down vote up
private void __fetchRelationshipFilledAutofillFieldAscomExampleAndroidAutofillServiceModelFilledAutofillField(final ArrayMap<String, ArrayList<FilledAutofillField>> _map) {
  final Set<String> __mapKeySet = _map.keySet();
  if (__mapKeySet.isEmpty()) {
    return;
  }
  StringBuilder _stringBuilder = StringUtil.newStringBuilder();
  _stringBuilder.append("SELECT datasetId,textValue,dateValue,toggleValue,fieldTypeName FROM `FilledAutofillField` WHERE datasetId IN (");
  final int _inputSize = __mapKeySet.size();
  StringUtil.appendPlaceholders(_stringBuilder, _inputSize);
  _stringBuilder.append(")");
  final String _sql = _stringBuilder.toString();
  final int _argCount = 0 + _inputSize;
  final RoomSQLiteQuery _stmt = RoomSQLiteQuery.acquire(_sql, _argCount);
  int _argIndex = 1;
  for (String _item : __mapKeySet) {
    if (_item == null) {
      _stmt.bindNull(_argIndex);
    } else {
      _stmt.bindString(_argIndex, _item);
    }
    _argIndex ++;
  }
  final Cursor _cursor = __db.query(_stmt);
  try {
    final int _itemKeyIndex = _cursor.getColumnIndex("datasetId");
    if (_itemKeyIndex == -1) {
      return;
    }
    final int _cursorIndexOfMDatasetId = _cursor.getColumnIndexOrThrow("datasetId");
    final int _cursorIndexOfMTextValue = _cursor.getColumnIndexOrThrow("textValue");
    final int _cursorIndexOfMDateValue = _cursor.getColumnIndexOrThrow("dateValue");
    final int _cursorIndexOfMToggleValue = _cursor.getColumnIndexOrThrow("toggleValue");
    final int _cursorIndexOfMFieldTypeName = _cursor.getColumnIndexOrThrow("fieldTypeName");
    while(_cursor.moveToNext()) {
      if (!_cursor.isNull(_itemKeyIndex)) {
        final String _tmpKey = _cursor.getString(_itemKeyIndex);
        ArrayList<FilledAutofillField> _tmpCollection = _map.get(_tmpKey);
        if (_tmpCollection != null) {
          final FilledAutofillField _item_1;
          final String _tmpMDatasetId;
          _tmpMDatasetId = _cursor.getString(_cursorIndexOfMDatasetId);
          final String _tmpMTextValue;
          _tmpMTextValue = _cursor.getString(_cursorIndexOfMTextValue);
          final Long _tmpMDateValue;
          if (_cursor.isNull(_cursorIndexOfMDateValue)) {
            _tmpMDateValue = null;
          } else {
            _tmpMDateValue = _cursor.getLong(_cursorIndexOfMDateValue);
          }
          final Boolean _tmpMToggleValue;
          final Integer _tmp;
          if (_cursor.isNull(_cursorIndexOfMToggleValue)) {
            _tmp = null;
          } else {
            _tmp = _cursor.getInt(_cursorIndexOfMToggleValue);
          }
          _tmpMToggleValue = _tmp == null ? null : _tmp != 0;
          final String _tmpMFieldTypeName;
          _tmpMFieldTypeName = _cursor.getString(_cursorIndexOfMFieldTypeName);
          _item_1 = new FilledAutofillField(_tmpMDatasetId,_tmpMFieldTypeName,_tmpMTextValue,_tmpMDateValue,_tmpMToggleValue);
          _tmpCollection.add(_item_1);
        }
      }
    }
  } finally {
    _cursor.close();
  }
}
 
Example 7
Source File: AutofillDao_Impl.java    From android-AutofillFramework with Apache License 2.0 4 votes vote down vote up
private void __fetchRelationshipAutofillHintAscomExampleAndroidAutofillServiceModelAutofillHint(final ArrayMap<String, ArrayList<AutofillHint>> _map) {
  final Set<String> __mapKeySet = _map.keySet();
  if (__mapKeySet.isEmpty()) {
    return;
  }
  StringBuilder _stringBuilder = StringUtil.newStringBuilder();
  _stringBuilder.append("SELECT autofillHint,fieldTypeName FROM `AutofillHint` WHERE fieldTypeName IN (");
  final int _inputSize = __mapKeySet.size();
  StringUtil.appendPlaceholders(_stringBuilder, _inputSize);
  _stringBuilder.append(")");
  final String _sql = _stringBuilder.toString();
  final int _argCount = 0 + _inputSize;
  final RoomSQLiteQuery _stmt = RoomSQLiteQuery.acquire(_sql, _argCount);
  int _argIndex = 1;
  for (String _item : __mapKeySet) {
    if (_item == null) {
      _stmt.bindNull(_argIndex);
    } else {
      _stmt.bindString(_argIndex, _item);
    }
    _argIndex ++;
  }
  final Cursor _cursor = __db.query(_stmt);
  try {
    final int _itemKeyIndex = _cursor.getColumnIndex("fieldTypeName");
    if (_itemKeyIndex == -1) {
      return;
    }
    final int _cursorIndexOfMAutofillHint = _cursor.getColumnIndexOrThrow("autofillHint");
    final int _cursorIndexOfMFieldTypeName = _cursor.getColumnIndexOrThrow("fieldTypeName");
    while(_cursor.moveToNext()) {
      if (!_cursor.isNull(_itemKeyIndex)) {
        final String _tmpKey = _cursor.getString(_itemKeyIndex);
        ArrayList<AutofillHint> _tmpCollection = _map.get(_tmpKey);
        if (_tmpCollection != null) {
          final AutofillHint _item_1;
          final String _tmpMAutofillHint;
          _tmpMAutofillHint = _cursor.getString(_cursorIndexOfMAutofillHint);
          final String _tmpMFieldTypeName;
          _tmpMFieldTypeName = _cursor.getString(_cursorIndexOfMFieldTypeName);
          _item_1 = new AutofillHint(_tmpMAutofillHint,_tmpMFieldTypeName);
          _tmpCollection.add(_item_1);
        }
      }
    }
  } finally {
    _cursor.close();
  }
}
 
Example 8
Source File: AutofillDao_Impl.java    From android-AutofillFramework with Apache License 2.0 4 votes vote down vote up
private void __fetchRelationshipResourceIdHeuristicAscomExampleAndroidAutofillServiceModelResourceIdHeuristic(final ArrayMap<String, ArrayList<ResourceIdHeuristic>> _map) {
  final Set<String> __mapKeySet = _map.keySet();
  if (__mapKeySet.isEmpty()) {
    return;
  }
  StringBuilder _stringBuilder = StringUtil.newStringBuilder();
  _stringBuilder.append("SELECT resourceIdHeuristic,packageName,fieldTypeName FROM `ResourceIdHeuristic` WHERE fieldTypeName IN (");
  final int _inputSize = __mapKeySet.size();
  StringUtil.appendPlaceholders(_stringBuilder, _inputSize);
  _stringBuilder.append(")");
  final String _sql = _stringBuilder.toString();
  final int _argCount = 0 + _inputSize;
  final RoomSQLiteQuery _stmt = RoomSQLiteQuery.acquire(_sql, _argCount);
  int _argIndex = 1;
  for (String _item : __mapKeySet) {
    if (_item == null) {
      _stmt.bindNull(_argIndex);
    } else {
      _stmt.bindString(_argIndex, _item);
    }
    _argIndex ++;
  }
  final Cursor _cursor = __db.query(_stmt);
  try {
    final int _itemKeyIndex = _cursor.getColumnIndex("fieldTypeName");
    if (_itemKeyIndex == -1) {
      return;
    }
    final int _cursorIndexOfMResourceIdHeuristic = _cursor.getColumnIndexOrThrow("resourceIdHeuristic");
    final int _cursorIndexOfMPackageName = _cursor.getColumnIndexOrThrow("packageName");
    final int _cursorIndexOfMFieldTypeName = _cursor.getColumnIndexOrThrow("fieldTypeName");
    while(_cursor.moveToNext()) {
      if (!_cursor.isNull(_itemKeyIndex)) {
        final String _tmpKey = _cursor.getString(_itemKeyIndex);
        ArrayList<ResourceIdHeuristic> _tmpCollection = _map.get(_tmpKey);
        if (_tmpCollection != null) {
          final ResourceIdHeuristic _item_1;
          final String _tmpMResourceIdHeuristic;
          _tmpMResourceIdHeuristic = _cursor.getString(_cursorIndexOfMResourceIdHeuristic);
          final String _tmpMPackageName;
          _tmpMPackageName = _cursor.getString(_cursorIndexOfMPackageName);
          final String _tmpMFieldTypeName;
          _tmpMFieldTypeName = _cursor.getString(_cursorIndexOfMFieldTypeName);
          _item_1 = new ResourceIdHeuristic(_tmpMResourceIdHeuristic,_tmpMFieldTypeName,_tmpMPackageName);
          _tmpCollection.add(_item_1);
        }
      }
    }
  } finally {
    _cursor.close();
  }
}