コード例 #1
0
  @Nullable
  @Override
  public View onCreateView(
      LayoutInflater inflater,
      @Nullable ViewGroup viewContainer,
      @Nullable Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_likes_list, viewContainer, false);
    toolbar = ViewUtils.getView(rootView, R.id.t__likes_list__toolbar);
    likersListView = ViewUtils.getView(rootView, R.id.rv__likes_list);

    likesAdapter = new LikesAdapter();
    likersListView.setLayoutManager(new LinearLayoutManager(getActivity()));
    likersListView.setAdapter(likesAdapter);

    toolbar.setNavigationOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            getContainer().closeLikesList();
          }
        });

    Message likedMessage = getArguments().getParcelable(ARGUMENT_LIKED_MESSAGE);
    likesAdapter.setLikes(likedMessage.getLikes());

    return rootView;
  }
コード例 #2
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   View view = inflater.inflate(R.layout.fragment_notification, container, false);
   chatheadView = ViewUtils.getView(view, R.id.mncv__notifications__chathead);
   chatheadVisibleDuration =
       getResources().getInteger(R.integer.notification__chathead__show_duration);
   return view;
 }
コード例 #3
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_otr_device_limit, container, false);
    view.setOnClickListener(this);

    logoutButton = ViewUtils.getView(view, R.id.zb__otr_device_limit__logout);
    logoutButton.setIsFilled(false);
    logoutButton.setAccentColor(getResources().getColor(R.color.text__primary_dark));
    logoutButton.setOnClickListener(this);

    manageDevicesButton = ViewUtils.getView(view, R.id.zb__otr_device_limit__manage_devices);
    manageDevicesButton.setIsFilled(true);
    manageDevicesButton.setAccentColor(getResources().getColor(R.color.text__primary_dark));
    manageDevicesButton.setOnClickListener(this);

    return view;
  }