コード例 #1
0
        public static Dataset BuildDataset(Context context, FieldCollection fields, FilledItem filledItem,
                                           InlinePresentationSpec inlinePresentationSpec = null)
        {
            var overlayPresentation = BuildOverlayPresentation(
                filledItem.Name,
                filledItem.Subtitle,
                filledItem.Icon,
                context);

            var inlinePresentation = BuildInlinePresentation(
                inlinePresentationSpec,
                filledItem.Name,
                filledItem.Subtitle,
                filledItem.Icon,
                null,
                context);

            var datasetBuilder = new Dataset.Builder(overlayPresentation);

            if (inlinePresentation != null)
            {
                datasetBuilder.SetInlinePresentation(inlinePresentation);
            }
            if (filledItem.ApplyToFields(fields, datasetBuilder))
            {
                return(datasetBuilder.Build());
            }
            return(null);
        }
コード例 #2
0
ファイル: AutofillHelpers.cs プロジェクト: wade1990/mobile-1
        public static Dataset BuildDataset(Context context, FieldCollection fields, FilledItem filledItem)
        {
            var datasetBuilder = new Dataset.Builder(
                BuildListView(filledItem.Name, filledItem.Subtitle, filledItem.Icon, context));

            if (filledItem.ApplyToFields(fields, datasetBuilder))
            {
                return(datasetBuilder.Build());
            }
            return(null);
        }