コード例 #1
0
ファイル: Page2.cs プロジェクト: doomcat9167/LaneTransitApp
		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);
			SetContentView (Resource.Layout.listView);

			listView = FindViewById <ListView> (Resource.Id.listView);

			mItems = new List<string>();
			mItems.Add ("EmX");
			mItems.Add ("11 - Thurston");
			mItems.Add ("12 - Gateway");
			mItems.Add ("13 - Centennial");
			mItems.Add ("17 - 5th St/Hayden B");
			mItems.Add ("18 - Mohawk");
			mItems.Add ("24 - Donald");
			mItems.Add ("27 - Fairmount");
			mItems.Add ("28 - Hilyard");
			mItems.Add ("32 - W 1st Ave");
			mItems.Add ("33 - Jefferson");
			mItems.Add ("36 - W 18th Ave");
			mItems.Add ("40 - Echo Hollow");
			mItems.Add ("41 - Barger/W 11th");
			mItems.Add ("43 - W 11th / Barger");
			mItems.Add ("51 - Santa Clara");
			mItems.Add ("52 - Irving");
			mItems.Add ("55 - North Park");
			mItems.Add ("66 - VRC/Coburg");
			mItems.Add ("67 - Coburg Rd/VRC");
			mItems.Add ("73 - UO/Willamette");
			mItems.Add ("76 - UO/Warren");
			mItems.Add ("78 - UO/Seneca Sta");
			mItems.Add ("79x - UO/Kinsrow");
			mItems.Add ("81 - LCC/Harris");
			mItems.Add ("82 - LCC/Pearl");
			mItems.Add ("85 - LCC/Springfield");
			mItems.Add ("91 - McKenzie Br");
			mItems.Add ("92 - Lowell/LCC");
			mItems.Add ("93 - Veneta");
			mItems.Add ("95 - Junction City");
			mItems.Add ("96 - Coburg");
			mItems.Add ("98 - Cottage Grove");
			mItems.Add ("Airport Connector");
			mItems.Add ("970x-971x - Butte to Butte Express");
			mItems.Add ("988x-989x - Oregon Country Fair Express");
			mItems.Add ("990x-999x - Autzen Express");
			mItems.Add ("Diamond Express");
			mItems.Add ("Rhody Express");

			RouteList = new List<Route>();
			RouteList.Add (new Route("Emx", "https://www.ltd.org/system-map/route_101/"));
			RouteList.Add (new Route("11 - Thurston", "https://www.ltd.org/system-map/route_101/"));
			RouteList.Add (new Route("13 - Centennial", "https://www.ltd.org/system-map/route_101/"));


			ListViewAdapter adapter = new ListViewAdapter (this, RouteList);

			listView.Adapter = adapter;

			listView.ItemClick += listView_ItemClick;
		}
コード例 #2
0
        private void LoadData()
        {
            listSource = db.selectTableMeal();
            var adapter = new ListViewAdapter(this, listSource);

            listData.Adapter = adapter;
        }
コード例 #3
0
        private void LoadData()
        {
            lstSource = db.SelectTableTag();
            ListViewAdapter adapter = new ListViewAdapter(this, lstSource);

            lstData.Adapter = adapter;
        }
コード例 #4
0
        private void SelectData()
        {
            listSource = db.SqlQuary();
            var adapter = new ListViewAdapter(this, listSource);

            lstViewData.Adapter = adapter;
        }
コード例 #5
0
ファイル: ResourceListEditor.cs プロジェクト: zparr/ATF
        /// <summary>
        /// Finishes initializing component by creating ListView and initializing it, subscribing to drag events,
        /// and registering the control</summary>
        void IInitializable.Initialize()
        {
            m_resourcesListView = new ListView();
            m_resourcesListView.SmallImageList     = ResourceUtil.GetImageList16();
            m_resourcesListView.AllowDrop          = true;
            m_resourcesListView.MultiSelect        = true;
            m_resourcesListView.AllowColumnReorder = true;
            m_resourcesListView.LabelEdit          = true;
            m_resourcesListView.Dock = DockStyle.Fill;

            m_resourcesListView.DragOver           += new DragEventHandler(resourcesListView_DragOver);
            m_resourcesListView.DragDrop           += new DragEventHandler(resourcesListView_DragDrop);
            m_resourcesListView.MouseUp            += new MouseEventHandler(resourcesListView_MouseUp);
            m_resourcesListViewAdapter              = new ListViewAdapter(m_resourcesListView);
            m_resourcesListViewAdapter.LabelEdited +=
                new EventHandler <LabelEditedEventArgs <object> >(resourcesListViewAdapter_LabelEdited);

            m_resourcesControlInfo = new ControlInfo(
                Localizer.Localize("Resources"),
                Localizer.Localize("Resources for selected Event"),
                StandardControlGroup.Bottom);

            m_controlHostService.RegisterControl(m_resourcesListView, m_resourcesControlInfo, this);

            if (m_settingsService != null)
            {
                SettingsServices.RegisterSettings(
                    m_settingsService,
                    this,
                    new BoundPropertyDescriptor(this, () => ListViewSettings, "ListViewSettings", "", "")
                    );
            }
        }
コード例 #6
0
        /// <summary>
        /// Finishes initializing component by creating ListView, and initializing it and subscribing it to events</summary>
        void IInitializable.Initialize()
        {
            m_resourcesListView                    = new ListView();
            m_resourcesListView.AllowDrop          = true;
            m_resourcesListView.MultiSelect        = true;
            m_resourcesListView.AllowColumnReorder = true;
            m_resourcesListView.LabelEdit          = true;
            m_resourcesListView.Dock               = DockStyle.Fill;

            m_resourcesListView.DragOver           += resourcesListView_DragOver;
            m_resourcesListView.DragDrop           += resourcesListView_DragDrop;
            m_resourcesListView.MouseUp            += resourcesListView_MouseUp;
            m_resourcesListViewAdapter              = new ListViewAdapter(m_resourcesListView);
            m_resourcesListViewAdapter.LabelEdited +=
                resourcesListViewAdapter_LabelEdited;

            m_resourcesControlInfo = new ControlInfo(
                "Resources".Localize(),
                "Resources for selected Event".Localize(),
                StandardControlGroup.Bottom);

            m_controlHostService.RegisterControl(m_resourcesListView, m_resourcesControlInfo, this);

            if (m_settingsService != null)
            {
                m_settingsService.RegisterSettings(this, new BoundPropertyDescriptor(this, () => ListViewSettings, "ListViewSettings", "", ""));
            }
        }
コード例 #7
0
        private void LoadData()
        {
            LstSource = db.SelectDoctor();
            var adapter = new ListViewAdapter(this, LstSource);

            lsData.Adapter = adapter;
        }
コード例 #8
0
        /// <summary>
        /// Finishes initializing component by creating ListView and initializing it, subscribing to drag events,
        /// and registering the control</summary>
        void IInitializable.Initialize()
        {
            m_characterListView = new ListView();
            //m_characterListView.SmallImageList = ResourceUtil.GetImageList16();
            m_characterListView.AllowDrop          = false;
            m_characterListView.MultiSelect        = true;
            m_characterListView.AllowColumnReorder = true;
            m_characterListView.LabelEdit          = true;
            m_characterListView.Dock = DockStyle.Top;

            m_characterListView.MouseUp           += characterListView_MouseUp;
            m_characteListViewAdapter              = new ListViewAdapter(m_characterListView);
            m_characteListViewAdapter.LabelEdited +=
                resourcesListViewAdapter_LabelEdited;

            m_characteControlInfo = new ControlInfo(
                "Characters".Localize(),
                "Characters".Localize(),
                StandardControlGroup.Right);

            m_controlHostService.RegisterControl(m_characterListView, m_characteControlInfo, this);

            if (m_settingsService != null)
            {
                m_settingsService.RegisterSettings(this, new BoundPropertyDescriptor(this, () => ListViewSettings, "ListViewSettings", "", ""));
            }
        }
コード例 #9
0
        private void LoadData()
        {
            var ls      = db.SelectTableItems();
            var adapter = new ListViewAdapter(this, ls);

            listView.Adapter = adapter;
        }
コード例 #10
0
ファイル: MainActivity.cs プロジェクト: dynk/contactList
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            db = new Database();
            db.createDataBase();
            mListView = FindViewById <ListView>(Resource.Id.myListView);

            b        = FindViewById <Button>(Resource.Id.button1);
            b.Click += delegate { callPage(); };

            ListViewAdapter myAdapter = new ListViewAdapter(this, LoadData());

            mListView.Adapter = myAdapter;

            lstSource = db.selectTablePerson();

            mListView.ItemClick += (object sender, ItemClickEventArgs e) =>
            {
                Toast.MakeText(this, "" + lstSource[e.Position].name, ToastLength.Short).Show();
                var intent = new Intent(this, typeof(Details));
                intent.PutExtra("id_user", lstSource[e.Position].Id);
                StartActivity(intent);
            };
        }
コード例 #11
0
        //------------------------------------------------------------------------//
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.existinglistview);

            string text = Intent.GetStringExtra(Intent.ExtraText);
            string subject = Intent.GetStringExtra(Intent.ExtraSubject);
            string html = Intent.GetStringExtra(Intent.ExtraHtmlText);
            Console.WriteLine("text:{0},subject:{1}", text, subject);


            if( text != null ) do_url_processing(text);

            m_adapter = new ListViewAdapter(this, mItemList,m_queue_for_deletion);
            mListview = FindViewById<ListView>(Resource.Id.existinglist);

            mListview.SmoothScrollbarEnabled = true;
            m_adapter.mOnItemCheck += OnCheckItemClick;
            mListview.Adapter = m_adapter;
            mListview.ItemClick += OnListViewItemClick;
            mListview.ItemLongClick += onLongItemClick;
            mListview.TextFilterEnabled = true;

            dbupdateUI(scrolloptions.scroll_to_bottom);

            /**Search bar implementation **/
            mSearch = FindViewById<EditText>(Resource.Id.etSearch);
            mContainer = FindViewById<LinearLayout>(Resource.Id.llcontainer);
            mSearch.Alpha = 0;
            mSearch.TextChanged += mSearch_TextChanged;

        }
コード例 #12
0
        private void LoadData()
        {
            lstSource = db.selectTablePerson();
            var adapter = new ListViewAdapter(this, lstSource);

            lstData.Adapter = adapter;
        }
コード例 #13
0
        private void LoadData()
        {
            listSource = db.GetAll();
            var adapter = new ListViewAdapter(this, listSource);

            listData.Adapter = adapter;
        }
コード例 #14
0
        private void LoadData()
        {
            lstSource = database.selectTablePerson();

            var adapter = new ListViewAdapter(this, Resource.Layout.ls_view_dateTemplate, lstSource);

            lstView.Adapter = adapter;
        }
コード例 #15
0
        //Evento ListViewItem_Click
        private void ListViewPnlCollections_ItemClick(object sender, EventArgs e)
        {
            NormalizeBtnSave();
            DisableTextBoxes();
            CleanPnlCollectionTb();
            //Recupera o Id do ListViewItem selecionado
            var codigo = listView_pnlCollections_Albuns.Items[listView_pnlCollections_Albuns.SelectedItems[0].Index].SubItems[4];

            CollectionsViewType collection_type = (CollectionsViewType)comboBox_pnlCollections_ColecaoSelecionada.SelectedItem;

            switch (collection_type)
            {
            case CollectionsViewType.TAPE:
                lva = new TapeAdapter();
                tbl = new TextBoxLoader(this, lva.BuildTextBoxData(int.Parse(codigo.Text)));
                tbl.DoIt();

                break;

            case CollectionsViewType.VINYL:
                lva = new VinylAdapter();
                tbl = new TextBoxLoader(this, lva.BuildTextBoxData(int.Parse(codigo.Text)));
                tbl.DoIt();

                break;

            case CollectionsViewType.CD:
                lva = new CDAdapter();
                tbl = new TextBoxLoader(this, lva.BuildTextBoxData(int.Parse(codigo.Text)));
                tbl.DoIt();

                break;

            case CollectionsViewType.DVD:
                lva = new DVDAdapter();
                tbl = new TextBoxLoader(this, lva.BuildTextBoxData(int.Parse(codigo.Text)));
                tbl.DoIt();

                break;

            case CollectionsViewType.BLURAY:
                lva = new BluRayAdapter();
                tbl = new TextBoxLoader(this, lva.BuildTextBoxData(int.Parse(codigo.Text)));
                tbl.DoIt();

                break;

            case CollectionsViewType.VCR:
                lva = new VCRAdapter();
                tbl = new TextBoxLoader(this, lva.BuildTextBoxData(int.Parse(codigo.Text)));
                tbl.DoIt();

                break;
            }
        }
コード例 #16
0
 private void buildList()
 {
     listView = new ListViewAdapter <Session>(listContainer.GetComponent <RectTransform>(), listButton.gameObject,
                                              (listObject, session, position) => {
         Button button = listObject.GetComponent <Button>();
         button.transform.GetChild(0).GetComponent <TextMeshProUGUI>().text = session.sessionName;
         button.onClick.AddListener(() => presenter.selectSession(session));
     });
     listView.data = sessions;
     listView.notifiyDataChanged();
 }
コード例 #17
0
        private void LoadData()
        {
            listSourcePush  = db.selectTable();
            listSourcePush2 = db.selectTablePush2();
            listSourcePull  = db.selectTablePull();
            listSourcePull2 = db.selectTablePull2();
            listSourceLegs  = db.selectTableLegs();
            var adapter = new ListViewAdapter(this, listSourcePush);

            lstViewData.Adapter = adapter;
        }
コード例 #18
0
        void reloadData()
        {
            var since = DateTime.UtcNow.AddMinutes(-1);

            Database.Main.GetCo2Async(1, since).ContinueWith(t => {
                this.RunOnUiThread(() => {
                    Data        = t.Result.Cast <Telemetry>().ToList();
                    ListAdapter = new ListViewAdapter(this);
                });
            });
        }
コード例 #19
0
ファイル: EventSequenceContext.cs プロジェクト: zoombapup/ATF
        /// <summary>
        /// Performs initialization when the adapter is connected to the event context's DomNode.
        /// Raises the HistoryContext NodeSet event and performs custom processing.</summary>
        protected override void OnNodeSet()
        {
            DomNode.AttributeChanged += DomNode_AttributeChanged;
            DomNode.ChildInserted    += DomNode_ChildInserted;
            DomNode.ChildRemoved     += DomNode_ChildRemoved;

            m_listViewAdapter = new ListViewAdapter(m_listView);
            m_listViewAdapter.AllowSorting = true;
            m_listViewAdapter.ListView     = this;

            base.OnNodeSet();
        }
コード例 #20
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            this.bootstrapper = new SimpleActivityBootstrapper(this);
            this.bootstrapper.Run(Resource.Layout.LazyList);
            this.DataContext = this.bootstrapper.BuildDataContext <LazyListViewModel>();
            ListViewAdapter <LazyListItemViewModel> .Build(this.Items, this.DataContext.Items, this.GetAdapter, this.LayoutInflater);

            this.Items.ChoiceMode     = ChoiceMode.Single;
            this.Items.ItemClick     += Items_ItemClick;
            this.Items.ItemLongClick += Items_ItemLongClick;
        }
コード例 #21
0
 private void LoadData()
 {
     try
     {
         listSource = db.selectTable();
         var adapter = new ListViewAdapter(this, listSource);
         lstViewData.Adapter = adapter;
     }
     catch
     {
     }
 }
コード例 #22
0
        /// <summary>
        /// Performs initialization when the adapter is connected to the context's DomNode.
        /// Raises the HistoryContext NodeSet event and performs custom processing.</summary>
        protected override void OnNodeSet()
        {
            DomNode.AttributeChanged += new EventHandler <AttributeEventArgs>(DomNode_AttributeChanged);
            DomNode.ChildInserted    += new EventHandler <ChildEventArgs>(DomNode_ChildInserted);
            DomNode.ChildRemoved     += new EventHandler <ChildEventArgs>(DomNode_ChildRemoved);

            m_listViewAdapter = new ListViewAdapter(m_listView);
            m_listViewAdapter.AllowSorting = true;
            m_listViewAdapter.ListView     = this;

            base.OnNodeSet();
        }
コード例 #23
0
 private void LoadData()
 {
     Choices = database.GetChoices();
     if (Choices.Count == 0)
     {
         TextView.Text = "There is no data in database.";
     }
     else
     {
         var adapter = new ListViewAdapter(this, Choices);
         listView.Adapter = adapter;
     }
 }
コード例 #24
0
        private void Buscar_Click(object sender, EventArgs e)
        {
            if (txtbuscar.Text.Length == 0)
            {
                LoadData();
            }
            else
            {
                LstSource = LstSource.Where(x => x.NombreDoctor.Contains(txtbuscar.Text)).ToList();

                var adapter = new ListViewAdapter(this, LstSource);
                lsData.Adapter = adapter;
            }
        }
コード例 #25
0
 private void buildList()
 {
     ranksListView = new ListViewAdapter <Rank>(container, listItem, (item, rank, position) => {
         item.transform.GetChild(0).GetComponent <TextMeshProUGUI>().text = rank.username;             // userName
         item.transform.GetChild(1).GetComponent <TextMeshProUGUI>().text = rank.rankValue.ToString(); // score
         item.transform.GetChild(2).GetComponent <TextMeshProUGUI>().text = rank.order.ToString();     // order
         if (rank == userRank)
         {
             item.GetComponent <Image>().color = Color.cyan;
         }
     });
     ranksListView.data = ranks;
     ranksListView.notifiyDataChanged();
 }
コード例 #26
0
//public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
//{
//    Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);

//    base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
//}
//public bool OnNavigationItemSelected(IMenuItem item)
//{
//    switch (item.ItemId)
//    {
//        case Resource.Id.navigation_home:
//            //textMessage.SetText(Resource.String.title_home);
//            return true;
//        case Resource.Id.navigation_dashboard:
//            //textMessage.SetText(Resource.String.title_dashboard);
//            return true;
//    }
//    return false;
//}
        private async void CarregarDados()
        {
            using (var client = new HttpClient())
            {
                // envia a requisição GET
                var uri    = "https://fprestapi.000webhostapp.com/api/Usuario/Read.php";
                var result = await client.GetStringAsync(uri);

                // processa a resposta
                var posts = JsonConvert.DeserializeObject <List <Usuario> >(result);

                usuarios = posts;
                var adapter = new ListViewAdapter(this, usuarios);
                lvDados.Adapter = adapter;
            }
        }
コード例 #27
0
ファイル: FileViewer.cs プロジェクト: zparr/ATF
        public FileViewer(MainForm mainForm)
        {
            m_mainForm = mainForm;

            // create a standard WinForms ListView control
            m_listView                    = new ListView();
            m_listView.Dock               = DockStyle.Fill;
            m_listView.Text               = "File Viewer";
            m_listView.BackColor          = SystemColors.Window;
            m_listView.SmallImageList     = ResourceUtil.GetImageList16();
            m_listView.AllowColumnReorder = true;

            // create an adapter to drive the ListView control
            m_listViewAdapter = new ListViewAdapter(m_listView);

            m_fileListView = new FileListView();
        }
コード例 #28
0
        private void LoadData()
        {
            var messageDialog = new Android.App.AlertDialog.Builder(this);

            try
            {
                listRutina = db.SelectTableRutina();
                var adapter = new ListViewAdapter(this, listRutina);
                listData.Adapter = adapter;
            }
            catch (Exception ex)
            {
                messageDialog.SetMessage("Error: " + ex);
                messageDialog.SetNeutralButton("Try again later", delegate { });
                messageDialog.Show();
            }
        }
コード例 #29
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);
            View view = inflater.Inflate(Resource.Layout.layout_bottom_nav_fragment, null);

            ListView listView = view.FindViewById <ListView>(Resource.Id.listView);
            var      temArr   = GetData();
            var      adapter  = new ListViewAdapter <string>(inflater.Context, temArr, Resource.Layout.item_list_view);

            listView.Adapter    = adapter;
            listView.ItemClick += (o, e) =>
            {
                Toast.MakeText(view.Context, e.Position.ToString(), ToastLength.Short).Show();
            };

            return(view);
        }
コード例 #30
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            Logistics.Clear();
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.MenuAlcohole);

            lstData = FindViewById <ListView>(Resource.Id.listView);
            var adapter = new ListViewAdapter(this, DataContainer.alcohols);

            lstData.Adapter = adapter;

            lstData.ItemClick += lstData_ItemClick;

            FindViewById <Button>(Resource.Id.btnNext).Click += (o, e) =>
            {
                StartActivity(typeof(LastWindowActivity));
            };
        }
コード例 #31
0
        private void OsposobiAdapter()
        {
            bool send = false;

            for (int i = 0; i < 20; i++)
            {
                MessageContent message = new MessageContent();
                int            broj    = i + 1;
                message.Message = "Probna poruka " + broj;
                message.Name    = "Ime " + broj;
                message.Time    = DateTime.Now.ToShortTimeString();
                message.IsSend  = send;
                send            = !send;
                _listMessage.Add(message);
            }

            ListViewAdapter adapter = new ListViewAdapter(this, _listMessage);

            _listChat.Adapter = adapter;
        }
コード例 #32
0
ファイル: PushEditor.cs プロジェクト: LeonHick/MyWorkoutPal
        private void LoadData()
        {
            try
            {
                var day = this.Intent.Extras.GetString("Day");

                listSourceWorkout = db.selectTableWorkout();
                listSource        = db.selectTable().FindAll(Exercise => Exercise.Workout.Equals(day)); // This is just the data where the workout = whatever day was clicked
                listSourceInfo    = db.selectTableInfo();

                var adapter = new ListViewAdapter(this, listSource);
                lstViewData.Adapter = adapter;
            }
            catch (Exception e)
            {
                System.Exception myException = e;
                Toast            error       = Toast.MakeText(this, "Load Data Error: " + e.Message, ToastLength.Short);
                error.Show();
            }
        }
コード例 #33
0
        private void mSearch_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            mfiltered_list.Clear();
            //mListview.SetFilterText(mSearch.Text.ToString());
            List<ShopItem> searchedItems = (from item in mItemList
                                           where item.ItemBrief.Contains(mSearch.Text,StringComparison.OrdinalIgnoreCase) ||
                                           item.ItemDescription.Contains(mSearch.Text,StringComparison.OrdinalIgnoreCase) select item).ToList<ShopItem>();

            foreach(var filtereditem in searchedItems)
            {
                mfiltered_list.Add(filtereditem);
            }
            m_adapter = new ListViewAdapter(this, mfiltered_list, m_queue_for_deletion);
            m_adapter.mOnItemCheck -= OnCheckItemClick;
            m_adapter.mOnItemCheck += OnCheckItemClick;

            mListview.Adapter = m_adapter;
        }
コード例 #34
0
ファイル: MainActivity.cs プロジェクト: josephkiran/Projects
        ////Lifecycle methods
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);
            Log.Debug ("OnCreate", "OnCreate called, initializing views...");

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);

            // UI to print last location
            button = FindViewById<Button> (Resource.Id.myButton);
            latitude = FindViewById<TextView> (Resource.Id.latitude);
            longitude = FindViewById<TextView> (Resource.Id.longitude);
            provider = FindViewById<TextView> (Resource.Id.provider);

            // UI to print location updates
            button2 = FindViewById<Button> (Resource.Id.myButton2);
            latitude2 = FindViewById<TextView> (Resource.Id.latitude2);
            longitude2 = FindViewById<TextView> (Resource.Id.longitude2);
            provider2 = FindViewById<TextView> (Resource.Id.provider2);

            //UI Sensor
            txtRaw = FindViewById<TextView>(Resource.Id.txtRaw);
            txtStdDev = FindViewById<TextView>(Resource.Id.txtStdDev);
            txtOverallDev = FindViewById<TextView>(Resource.Id.txtAvgStdDev);
            txtCondition = FindViewById<TextView>(Resource.Id.txtCondition);

            txtRange1 = FindViewById<EditText>(Resource.Id.txtRange1);
            txtRange2 = FindViewById<EditText>(Resource.Id.txtRange2);
            txtRange3 = FindViewById<EditText>(Resource.Id.txtRange3);
            txtRange4 = FindViewById<EditText>(Resource.Id.txtRange4);
            //txtRange1.Text = "0.45";
            //txtRange2.Text = "0.75";
            //txtRange3.Text = "1.2";
            //txtRange4.Text = "3";
            txtRange1.Text = "0.7";
            txtRange2.Text = "1.0";
            txtRange3.Text = "4";
            txtRange4.Text = "8";
            GPXDataSet.SlightBumpRange = 4;
            GPXDataSet.BumpRange = 8;

            //JK Socket
            _mySocket = new JKSocket("192.168.1.24", 1800);
            _mySocket.RecdDataEvent = recvText;
            _mySocket.StatusEvent = ClientStatusUpdate;

            _kmlGen = new KMLGenerator();
            btnGenerateCSV = FindViewById<Button>(Resource.Id.btnGenerateKML);
            togglebutton = FindViewById<ToggleButton>(Resource.Id.togglebutton);
            _tgStartStop = FindViewById<ToggleButton>(Resource.Id.tgStartStop);
            _tgStartStop.Checked = false;
            togglebutton.Checked = true;
            _mpWorse = MediaPlayer.Create(this, Resource.Raw.Worse);
            _mpSBumpy = MediaPlayer.Create(this, Resource.Raw.SBumpy);
            _mpBumpy = MediaPlayer.Create(this, Resource.Raw.Bumpy);

            mSensorManager = (SensorManager)GetSystemService(SensorService);
            _gpxDataSet = new GPXDataSet();
            GPXDataSet.PlayRoadStatus = new Action<RoadType>(PlayRoadType);
            _sensorData = new List<SensorData>();
            _tmrOverallAvg.Elapsed += new ElapsedEventHandler(_gpxDataSet.OnOverallAvgTimedEvent);
            _tmrOverallAvg.Interval = 5000;
            //_tmrOverallAvg.Enabled = true;

            _tmrSampling.Elapsed += new ElapsedEventHandler(this.OnSamplingTimedEvent);
            _tmrSampling.Interval = SAMPLE_TIME_INTERVAL;
            //_tmrSampling.Enabled = true;

            _tmrSampling.Enabled = false;
            _tmrOverallAvg.Enabled = false;

            mlistView = FindViewById<ListView>(Resource.Id.myListView);
            _arrAdp = new ListViewAdapter(this, _gpxDataSet.GPXDataList);
            mlistView.Adapter = _arrAdp;

            _isGooglePlayServicesInstalled = IsGooglePlayServicesInstalled ();

            if (_isGooglePlayServicesInstalled) {
                // pass in the Context, ConnectionListener and ConnectionFailedListener
                apiClient = new GoogleApiClientBuilder (this, this, this)
                    .AddApi (LocationServices.API).Build ();

                // generate a location request that we will pass into a call for location updates
                locRequest = new LocationRequest ();

            } else {
                Log.Error ("OnCreate", "Google Play Services is not installed");
                Toast.MakeText (this, "Google Play Services is not installed", ToastLength.Long).Show ();
                Finish ();
            }
        }