示例#1
0
  private void initInstances(View root) {
    collapsingToolbarLayout =
        (CollapsingToolbarLayout) getActivity().findViewById(R.id.collapsing_toolbar);
    toolbar = (Toolbar) getActivity().findViewById(R.id.toolbar);
    ivLogo = (ImageView) getActivity().findViewById(R.id.ivLogo);

    linearLayoutTabOptions = (LinearLayout) root.findViewById(R.id.linearLayoutTabOptions);
    iconFavorite = (IconTextView) root.findViewById(R.id.iconFavorite);
    iconResume = (IconTextView) root.findViewById(R.id.iconResume);
    iconNavigator = (IconTextView) root.findViewById(R.id.iconNavigator);
    layoutNavigator = (LinearLayout) root.findViewById(R.id.layoutNavigator);
    tvAddress = (TextView) root.findViewById(R.id.tvAddress);
    tvSalary = (TextView) root.findViewById(R.id.tvSalary);
    tvWelfare = (TextView) root.findViewById(R.id.tvWelfare);
    tvRequirement = (TextView) root.findViewById(R.id.tvRequirement);
    tvDescription = (TextView) root.findViewById(R.id.tvDescription);
    tvJob = (TextView) root.findViewById(R.id.tvJob);
    tvNotice = (TextView) root.findViewById(R.id.tvNotice);

    //        collapsingToolbarLayout.setExpandedTitleColor(getResources().getColor(R.color.black));

    iconFavorite.setOnClickListener(onClickListener);
    iconResume.setOnClickListener(onClickListener);
    iconNavigator.setOnClickListener(onClickListener);

    isFavorite = true;

    busProvider = BusProvider.getInstance(getActivity());
    jobdetailController =
        new JobdetailController(
            getActivity(), busProvider, HTTPManager.getInstance(), GsonManager.getInstance());
    favoriteController =
        new FavoriteController(
            getActivity(), busProvider, HTTPManager.getInstance(), GsonManager.getInstance());

    authorizeMember();

    progressDialog = new ProgressDialog(getActivity());
    progressDialog.setMessage(getString(R.string.loading));
    progressDialog.setCancelable(false);
    progressDialog.show();
  }
示例#2
0
 @Override
 public void onStop() {
   busProvider.getBus().unregister(this);
   super.onStop();
 }
示例#3
0
 @Override
 public void onStart() {
   super.onStart();
   busProvider.getBus().register(this);
 }