Ejemplo n.º 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_payment_list);

            SetSupportActionBar(FindViewById <Toolbar>(Resource.Id.toolbar));
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            FindViewById <FloatingActionButton>(Resource.Id.fab_create_payment).Click += (s, e) =>
            {
                var builder = new AlertDialog.Builder(Mvx.Resolve <IMvxAndroidCurrentTopActivity>().Activity);
                builder.SetTitle(Strings.ChooseLabel);
                builder.SetItems(itemForCreationList.ToArray(), OnSelectItemForCreation);
                builder.SetNegativeButton(Strings.CancelLabel, (d, t) => (d as Dialog).Dismiss());
                builder.Show();
            };

            PaymentExpandable = FindViewById <MvxExpandableListView>(Resource.Id.expandable_payment_list);
            PaymentExpandable.ExpandGroup(0);
            RegisterForContextMenu(PaymentExpandable);

            LoadBalancePanel();
            Title = ViewModel.Title;
        }
Ejemplo n.º 2
0
        protected override void OnViewModelSet()
        {
            SetContentView(Resource.Layout.ShowMatchesView);

            MvxExpandableListView   exList  = (MvxExpandableListView)FindViewById(Resource.Id.expandable_match_list);
            MyExpandableListAdapter adapter = new MyExpandableListAdapter(this, (IMvxAndroidBindingContext)BindingContext, ViewModel);

            exList.SetAdapter(adapter);

            var set = this.CreateBindingSet <ShowMatchesView, ShowMatchesViewModel>();

            set.Bind(exList).To(vm => vm.Matches).For(el => el.ItemsSource);
            set.Apply();
            exList.ItemTemplateId = Resource.Layout.item_odds;
        }
Ejemplo n.º 3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_main);

            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            expandableListView = FindViewById <MvxExpandableListView>(Resource.Id.expListView);
            expandableListView.SetOnGroupClickListener(this);

            FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab);

            fab.Click += FabOnClick;
        }
Ejemplo n.º 4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_payment_list);

            SetSupportActionBar(FindViewById <Toolbar>(Resource.Id.toolbar));
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            FindViewById <FloatingActionMenu>(Resource.Id.fab_menu_add_element).SetClosedOnTouchOutside(true);

            paymentExpandable = FindViewById <MvxExpandableListView>(Resource.Id.expandable_payment_list);
            if (paymentExpandable.Count > 0)
            {
                paymentExpandable.ExpandGroup(0);
            }
            RegisterForContextMenu(paymentExpandable);

            LoadBalancePanel();
            Title = ViewModel.Title;
        }
 public static string BindSelectedItem(this MvxExpandableListView mvxExpandableListView)
 => MvxAndroidPropertyBinding.MvxExpandableListView_SelectedItem;
Ejemplo n.º 6
0
 public MvxExpandableListViewSelectedItemTargetBinding(MvxExpandableListView target)
     : base(target)
 {
 }