Пример #1
0
        public MvxAppCompatAutoCompleteTextView(Context context, IAttributeSet attrs,
                                                MvxFilteringAdapter adapter) : base(context, attrs)
        {
            var itemTemplateId = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs);

            adapter.ItemTemplateId = itemTemplateId;
            Adapter    = adapter;
            ItemClick += OnItemClick;
        }
        public MvxLinearLayout(Context context, IAttributeSet attrs, IMvxAdapterWithChangedEvent adapter)
            : base(context, attrs)
        {
            var itemTemplateId = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs);

            if (adapter != null)
            {
                Adapter = adapter;
                Adapter.ItemTemplateId = itemTemplateId;
            }
            ChildViewRemoved += OnChildViewRemoved;
        }
Пример #3
0
        public MvxGridView(Context context, IAttributeSet attrs, IMvxAdapter adapter)
            : base(context, attrs)
        {
            // Note: Any calling derived class passing a null adapter is responsible for setting
            // it's own itemTemplateId
            if (adapter == null)
            {
                return;
            }

            var itemTemplateId = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs);

            adapter.ItemTemplateId = itemTemplateId;
            Adapter = adapter;
        }
Пример #4
0
        public MvxAutoCompleteTextView(Context context, IAttributeSet attrs,
                                       MvxFilteringAdapter adapter)
            : base(context, attrs)
        {
            var itemTemplateId = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs);

            if (itemTemplateId > 0)
            {
                adapter.ItemTemplateId = itemTemplateId;
            }

            Adapter = adapter;

            // note - we shouldn't realy need both of these... but we do
            ItemClick    += OnItemClick;
            ItemSelected += OnItemSelected;
        }
Пример #5
0
        public MvxAppCompatSpinner(Context context, IAttributeSet attrs, IMvxAdapter adapter)
            : base(context, attrs)
        {
            var itemTemplateId         = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs);
            var dropDownItemTemplateId = MvxAttributeHelpers.ReadDropDownListItemTemplateId(context, attrs);

            if (itemTemplateId > 0)
            {
                adapter.ItemTemplateId = itemTemplateId;
            }
            if (dropDownItemTemplateId > 0)
            {
                adapter.DropDownItemTemplateId = dropDownItemTemplateId;
            }

            Adapter       = adapter;
            ItemSelected += OnItemSelected;
        }
Пример #6
0
        public MvxExpandableListView(Context context, IAttributeSet attrs, MvxExpandableListAdapter adapter)
            : base(context, attrs)
        {
            if (adapter == null)
            {
                return;
            }

            var groupTemplateId = MvxAttributeHelpers.ReadGroupItemTemplateId(context, attrs);
            var itemTemplateId  = MvxAttributeHelpers.ReadListItemTemplateId(context, attrs);

            SetAdapter(adapter);

            if (groupTemplateId > 0)
            {
                adapter.GroupTemplateId = groupTemplateId;
            }

            if (itemTemplateId > 0)
            {
                adapter.ItemTemplateId = itemTemplateId;
            }
        }
 public MvxFrameControl(Context context, IAttributeSet attrs)
     : this(MvxAttributeHelpers.ReadTemplateId(context, attrs), context, attrs)
 {
 }