use of com.seven.seven.ui.MainActivity in project seven_develop by seven123456.
the class GankFragment method initView.
@Override
protected void initView() {
EventBus.getDefault().register(this);
gankPresenter = new GankPresenter(this, (MainActivity) getActivity());
inError = rootView.findViewById(R.id.in_error);
inError.setVisibility(View.VISIBLE);
inError.playAnimation();
recyclerView = rootView.findViewById(R.id.recycler);
gankAdapter = new GankAdapter(R.layout.recycler_item_gank);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
recyclerView.setAdapter(gankAdapter);
}
use of com.seven.seven.ui.MainActivity in project seven_develop by seven123456.
the class HomeFragment method initView.
@Override
protected void initView() {
homePresenter = new HomePresenter(this, (MainActivity) getActivity());
EventBus.getDefault().register(this);
linearLayoutManager = new LinearLayoutManager(getContext());
// appBarLayout = rootView.findViewById(R.id.appbar);
// RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) appBarLayout.getLayoutParams();
// layoutParams.height = layoutParams.height + StatusBarUtil.getStatusBarHeight(getActivity());
// appBarLayout.setTitle("首页新闻");
homeTitleBar = rootView.findViewById(R.id.in_home_title);
swipeRefreshLayout = rootView.findViewById(R.id.swf_layout);
recyclerView = rootView.findViewById(R.id.recycler);
errorLayoutView = rootView.findViewById(R.id.error);
errorLayoutView.setVisibility(View.VISIBLE);
errorLayoutView.playAnimation();
initRecyclerView();
}
use of com.seven.seven.ui.MainActivity in project seven_develop by seven123456.
the class UserInfoFragment method initView.
@Override
protected void initView() {
EventBus.getDefault().register(this);
userInfoPresenter = new UserInfoPresenter(this, (MainActivity) getActivity());
headImgView = rootView.findViewById(R.id.img_head_view);
userView = rootView.findViewById(R.id.img_user_view);
userRootView = rootView.findViewById(R.id.user_root);
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.timgs);
headImgView.setImageBitmap(RenderscriptUtils.blurBitmap(bitmap, getContext()));
userView.setImageBitmap(bitmap);
shareApp = rootView.findViewById(R.id.ui_share);
clean = rootView.findViewById(R.id.ui_clean);
collection = rootView.findViewById(R.id.ui_collection);
author = rootView.findViewById(R.id.ui_author);
setting = rootView.findViewById(R.id.ui_setting);
userName = rootView.findViewById(R.id.tv_user_name);
}
use of com.seven.seven.ui.MainActivity in project seven_develop by seven123456.
the class SearchFragment method initView.
@Override
protected void initView() {
StatusBarUtil.setTranslate(getActivity(), false);
EventBus.getDefault().register(this);
hotTagPresenter = new HotTagPresenter(this, (MainActivity) getActivity());
View viewspace = rootView.findViewById(R.id.view_space);
StatusBarUtil.setFadeStatusBarHeight(getContext(), viewspace);
flowLayout = rootView.findViewById(R.id.flow_layout);
urlFlowLayout = rootView.findViewById(R.id.flow_url_layout);
searchView = rootView.findViewById(R.id.search_title);
}
Aggregations