Search in sources :

Example 1 with MainActivity

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);
}
Also used : GankAdapter(com.seven.seven.gank.adapter.GankAdapter) GankPresenter(com.seven.seven.gank.presenter.GankPresenter) MainActivity(com.seven.seven.ui.MainActivity) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 2 with MainActivity

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();
}
Also used : HomePresenter(com.seven.seven.home.presenter.HomePresenter) MainActivity(com.seven.seven.ui.MainActivity) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 3 with MainActivity

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);
}
Also used : Bitmap(android.graphics.Bitmap) UserInfoPresenter(com.seven.seven.user.presenter.UserInfoPresenter) MainActivity(com.seven.seven.ui.MainActivity)

Example 4 with MainActivity

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);
}
Also used : HotTagPresenter(com.seven.seven.search.presenter.HotTagPresenter) MainActivity(com.seven.seven.ui.MainActivity) View(android.view.View) TextView(android.widget.TextView)

Aggregations

MainActivity (com.seven.seven.ui.MainActivity)4 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)2 Bitmap (android.graphics.Bitmap)1 View (android.view.View)1 TextView (android.widget.TextView)1 GankAdapter (com.seven.seven.gank.adapter.GankAdapter)1 GankPresenter (com.seven.seven.gank.presenter.GankPresenter)1 HomePresenter (com.seven.seven.home.presenter.HomePresenter)1 HotTagPresenter (com.seven.seven.search.presenter.HotTagPresenter)1 UserInfoPresenter (com.seven.seven.user.presenter.UserInfoPresenter)1