public RetrieveXMLData(Context context, LocationXMLAdapter adapter, AssetManager assets, AsyncResponse asyncResponse)
 {
     mContext    = context;
     mAdapter    = adapter;
     mAssets     = assets;
     resDelegate = asyncResponse;
 }
Exemple #2
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();
        }
 public RetrieveXMLData(Context context, LocationXMLAdapter adapter, AssetManager assets)
 {
     mContext = context;
     mAdapter = adapter;
     mAssets  = assets;
 }