Example #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.ListView_Activity_Layout);

            SetupToolbar(mToolbarTitle);

            // Setting fonts
            Typeface tf = Typeface.CreateFromAsset(Assets, "HelveticaNeue.ttf");

            List <Gear> gear = null;

            string type = Intent.GetStringExtra("Type");

            if (type == typeof(Headgear).Name)
            {
                gear = DatabaseHelper.GetGear <Headgear>();
            }
            else if (type == typeof(Clothe).Name)
            {
                gear = DatabaseHelper.GetGear <Clothe>();
            }
            else if (type == typeof(Shoe).Name)
            {
                gear = DatabaseHelper.GetGear <Shoe>();
            }

            CustomAdapter <Gear> adapter = new CustomAdapter <Gear>(this, gear, tf);
            ListView             list    = FindViewById <ListView>(Resource.Id.abilityListView);

            list.Adapter = adapter;
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.ListView_Activity_Layout);

            SetupToolbar(mToolbarTitle);

            // Setting fonts
            Typeface tf = Typeface.CreateFromAsset(Assets, "HelveticaNeue.ttf");

            List <Special>          abilities = DatabaseHelper.GetSpecials();
            CustomAdapter <Special> adapter   = new CustomAdapter <Special>(this, abilities, tf);
            ListView list = FindViewById <ListView>(Resource.Id.abilityListView);

            list.Adapter = adapter;
        }