Beispiel #1
0
        /// <summary>
        /// 页面控件
        /// </summary>
        protected void InitViews(View view)
        {
            tv_btn1 = view.FindViewById <TextView>(Resource.Id.tv_btn1);
            tv_btn2 = view.FindViewById <TextView>(Resource.Id.tv_btn2);
            tv_btn3 = view.FindViewById <TextView>(Resource.Id.tv_btn3);
            tv_btn1.SetOnClickListener(this);
            tv_btn2.SetOnClickListener(this);
            tv_btn3.SetOnClickListener(this);


            mSwipeRefreshLayout = (SwipeRefreshLayout)view.FindViewById(Resource.Id.refresher);
            mRecyclerView       = (RecyclerView)view.FindViewById(Resource.Id.recycler_view);

            mSwipeRefreshLayout.SetColorSchemeColors(Color.ParseColor("#db0000"));
            //mSwipeRefreshLayout.SetColorScheme(Resource.Color.xam_dark_blue,
            //Resource.Color.xam_purple,
            //Resource.Color.xam_gray,
            //Resource.Color.xam_green);


            linearLayoutManager = new LinearLayoutManager(CurrActivity);
            mAdapter            = new RenewReportAdapter(CurrActivity, teachReportList);
            mRecyclerView.SetLayoutManager(linearLayoutManager);
            mRecyclerView.SetAdapter(mAdapter);
            mAdapter.NotifyDataSetChanged();

            mSwipeRefreshLayout.SetOnRefreshListener(this);
            RecyclerViewItemOnGestureListener viewOnGestureListener = new RecyclerViewItemOnGestureListener(mRecyclerView, this);

            mRecyclerView.AddOnItemTouchListener(new RecyclerViewItemOnItemTouchListener(mRecyclerView, viewOnGestureListener));
        }
Beispiel #2
0
        protected override void InitViews()
        {
            FindViewById <TextView>(Resource.Id.tv_title).Text = string.Format("{0}教学报表", currReportInfo.Item3);

            tv_btn1 = FindViewById <TextView>(Resource.Id.tv_btn1);
            tv_btn2 = FindViewById <TextView>(Resource.Id.tv_btn2);
            tv_btn3 = FindViewById <TextView>(Resource.Id.tv_btn3);

            mSwipeRefreshLayout = FindViewById <SwipeRefreshLayout>(Resource.Id.refresher);
            mRecyclerView       = FindViewById <RecyclerView>(Resource.Id.recycler_view);
            mSwipeRefreshLayout.SetColorSchemeColors(Color.ParseColor("#db0000"));

            linearLayoutManager = new LinearLayoutManager(CurrActivity);
            mAdapter            = new RenewReportAdapter(CurrContext, teachReportList);
            mRecyclerView.SetLayoutManager(linearLayoutManager);
            mRecyclerView.SetAdapter(mAdapter);
            mAdapter.NotifyDataSetChanged();

            mSwipeRefreshLayout.SetOnRefreshListener(this);
            //mSwipeRefreshLayout.SetOnScrollChangeListener(this);

            //mAdapter.SetOnItemClickListener(this);

            RecyclerViewItemOnGestureListener viewOnGestureListener = new RecyclerViewItemOnGestureListener(mRecyclerView, this);

            mRecyclerView.AddOnItemTouchListener(new RecyclerViewItemOnItemTouchListener(mRecyclerView, viewOnGestureListener));

            arrowDown   = AppUtils.GetDrawable(CurrActivity, Resource.Drawable.arrow_down);
            arrowDownOn = AppUtils.GetDrawable(CurrActivity, Resource.Drawable.arrow_down_on);

            SetClassStatusImg(FindViewById <ImageButton>(Resource.Id.imgBtn_lessonIng), "init");
        }