/// <summary> /// Called when the host view is attempting to determine if an item's position has changed. We /// </summary> /// <param name="objectValue"></param> /// <returns></returns> public override int GetItemPosition(Java.Lang.Object objectValue) { if (objectValue.Equals(Wizard.PreviousStep)) { return(PositionUnchanged); } return(PositionNone); //Indicates that the item is no longer present in the adapter.. Forces a screen reload.. causing the updated context data to appear }
protected override void OnPostExecute(Java.Lang.Object result) { if (result.Equals("success")) { Log.Info("SetVerifyIdTask", "AdvertisingIdClient.VerifyAdId called successfully."); } else { Log.Info("SetVerifyIdTask", "error"); } }
public Java.Lang.Object Apply(Java.Lang.Object context, Java.Lang.Object groupName) { // Developers can create a special group layout for any given group name. if (groupName.Equals("Group 2")) { EditorGroup group = new EditorGroup((Context)context, groupName.ToString(), Resource.Layout.dataform_custom_group); // Each group can have a specific layout manager, be it a table layout, a linear layout, a placeholder layout or even something completely custom. group.LayoutManager = new DataFormPlaceholderLayoutManager((Context)context, Resource.Layout.dataform_group_placeholder_layout); return(group); } return(null); }
private static void SaveItem(IDataItem dataItem, ISharedPreferencesEditor editor, IDictionary <string, object> allPrefs) { DataMap dataMap = DataMapItem.FromDataItem(dataItem).DataMap; if (dataMap.KeySet().Count == 0 && dataItem.Uri.PathSegments.LastOrDefault() != PrefListener.KEY_SYNC_DONE) { // Testing has shown that when an item is deleted from the Data API, it // will often come through as an empty TYPE_CHANGED rather than a TYPE_DELETED. DeleteItem(dataItem.Uri, editor, allPrefs); } else { foreach (var key in dataMap.KeySet()) { Java.Lang.Object value = dataMap.Get(key); if (value == null) { if (allPrefs != null && value.Equals(allPrefs.ContainsKey(key))) { editor.Remove(key); } continue; } if (allPrefs != null && value.Equals(allPrefs[key])) { // No change to value. continue; } if (key.Equals(KEY_TIMESTAMP)) { continue; } if (value is Java.Lang.Boolean) { editor.PutBoolean(key, (bool)value); } else if (value is Java.Lang.Float) { editor.PutFloat(key, (float)value); } else if (value is Java.Lang.Integer) { editor.PutInt(key, (int)value); } else if (value is Java.Lang.Long) { editor.PutLong(key, (long)value); } else if (value is Java.Lang.String) { editor.PutString(key, (string)value); } else if (value is Java.Lang.Object javaValue && javaValue.Class.SimpleName == "String[]") { if (Build.VERSION.SdkInt >= BuildVersionCodes.Honeycomb) { editor.PutStringSet(key, (string[])value); } }
public static bool equals(this Java.Lang.Object left, Java.Lang.Object right) { return(left.Equals(right)); }