Пример #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.WelcomePg);

            TextView tv1  = FindViewById <TextView>(Resource.Id.tv1);
            string   text = Intent.GetStringExtra("name") ?? "Not  Found";

            tv1.Text = "Welcome User:"******"select * from Vendors", null);
            StartManagingCursor(cursor);
            /* Custom Curson Adapter*/

            Button tvs = FindViewById <Button>(Resource.Id.tvs);

            tvs.Click += delegate
            {
                var tologin = new Intent(this, typeof(MainActivity));
                StartActivity(tologin);
            };



            CustomAdapterView adapterVendor = new CustomAdapterView(this, cursor, dbHelper);



            mylist.Adapter = adapterVendor;


            /* Search View Event */
            searchView.QueryTextChange += (sender, e) => adapterVendor.Filter.InvokeFilter(e.NewText);

            searchView.QueryTextSubmit += (sender, e) =>
            {
                Toast.MakeText(this, "Searched for : " + e.Query, ToastLength.Short).Show();
                e.Handled = true;
            };

            mylist.ItemClick += OnListItemClick;

            mylist.ItemClick += (object sender, Android.Widget.AdapterView.ItemClickEventArgs e) =>
            {
                string selectedFromList = mylist.GetItemAtPosition(e.Position).ToString();

                var activity1 = new Intent(this, typeof(DisplayDetails));

                StartActivity(activity1);
            };
            mylist.ItemClick += OnListItemClick;
        }
Пример #2
0
 public VendorFilter(CustomAdapterView adapter, DBHelper dbb)
 {
     this.adapter = adapter;
     this.dbb     = dbb;
 }