protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_practice_repast); var mToolbar = FindViewById <Toolbar>(Resource.Id.toolbar); mToolbar.NavigationClick += (sender, e) => { Finish(); }; var mRefreshLayout = FindViewById(Resource.Id.refreshLayout) as IRefreshLayout; if (isFirstEnter) { isFirstEnter = false; mRefreshLayout.AutoRefresh();//第一次进入触发自动刷新,演示效果 } var recyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerView); recyclerView.SetItemAnimator(new DefaultItemAnimator()); recyclerView.SetLayoutManager(new LinearLayoutManager(this)); //recyclerView.AddItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.Vertical)); mAdapter = new CustomBaseRecyclerAdapter(loadModels(), Resource.Layout.listitem_practive_repast); recyclerView.SetAdapter(mAdapter); mRefreshLayout.SetOnRefreshLoadmoreListener(new CustomOnRefreshLoadmoreListener(this)); //状态栏透明和间距处理 StatusBarUtil.darkMode(this); StatusBarUtil.setPaddingSmart(this, recyclerView); StatusBarUtil.setPaddingSmart(this, mToolbar); StatusBarUtil.setPaddingSmart(this, FindViewById(Resource.Id.blurview)); StatusBarUtil.setMargin(this, FindViewById(Resource.Id.gifview)); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_practice_profile); var mToolbar = FindViewById <Toolbar>(Resource.Id.toolbar); mToolbar.NavigationClick += (sender, e) => { Finish(); }; //状态栏透明和间距处理 StatusBarUtil.darkMode(this); StatusBarUtil.setPaddingSmart(this, mToolbar); StatusBarUtil.setPaddingSmart(this, FindViewById(Resource.Id.profile)); StatusBarUtil.setPaddingSmart(this, FindViewById(Resource.Id.blurview)); }