Esempio n. 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            //TabLayoutResource = Resource.Layout.Tabbar;
            //ToolbarResource = Resource.Layout.Toolbar;
            //ActionBar.SetHomeButtonEnabled(true);
            //ActionBar.SetDisplayHomeAsUpEnabled(true);

            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Main);


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

            SetSupportActionBar(toolbar);
            SupportActionBar.Title = "XML RecyclerView Activity";

            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowHomeEnabled(true);

            mLocationsObj = new LocationsObj();
            // Set our view from the "main" layout resource
            mRecycleView   = FindViewById <RecyclerView>(Resource.Id.recyclerView);
            mLayoutManager = new LinearLayoutManager(this);
            mRecycleView.SetLayoutManager(mLayoutManager);
            mAdapter            = new LocationXMLAdapter(mLocationsObj);
            mAdapter.ItemClick += MAdapter_ItemClick;
            mRecycleView.SetAdapter(mAdapter);

            mDialog = new ProgressDialog(this);
            mDialog.SetMessage("Please wait...");
            mDialog.SetCancelable(false);


            retrieveData();
        }
Esempio n. 2
0
 public LocationXMLAdapter(LocationsObj locations)
 {
     mLocationsXML = locations;
 }