How to implement what I want. We have a list of items, go to the list in the ItemAcitivty I know how. And there is still the creation of an ITA and how by pressing a button in this activation, you can go to the ItemActivity with the newly filled data.

This action happens in onBindViewHolder

itemHolder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { eventSelected(itemHolder, item); } }); 

-

 public void eventSelected(EventsListItemViewHolder itemViewHolder, EventListItem item) { String id = item.event.getId(); ActivityOptionsCompat optionsCompat = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Pair<View, String> p1 = Pair.create((View) itemViewHolder.mTitleView, "event_title"); Pair<View, String> p2 = Pair.create((View) itemViewHolder.mInterestViewColor, "event_interest_bg"); Pair<View, String> p3 = Pair.create((View) itemViewHolder.mImageView, "ivent_image"); Pair<View, String> p4 = Pair.create((View) itemViewHolder.mInterestTitle, "event_interest_name"); optionsCompat = ActivityOptionsCompat. makeSceneTransitionAnimation((Activity) context, p1, p2, p3, p4); } if (mSelectItemListener != null) { mSelectItemListener.onEventItemSelected(id, optionsCompat); } } 

But listeners:

  public interface SelectEventItemListener { void onEventItemSelected(String eventId, ActivityOptionsCompat options); void onEventEditSelected(String eventId); } public void setOnSelectItemListener(SelectEventItemListener listener) { mSelectItemListener = listener; } 
  • one
    pass all the data you just filled in through the intent. - Vladyslav Matviienko
  • @metalurgus how is this done? - Satanist Devilov
  • where startActivity () is, add the data (intent.putExtra (...)) to the intent, and getIntent (). getExtra () in the ItemActivity; - Vladyslav Matviienko
  • @metalurgus each filling aitam, your ID. And in the main activation, I click on the click on Aytem and go on normally. Is it possible to implement the transition to AytemAktiviti with ID? - Satanist Devilov
  • Well, so what is the ID of the newly filled data ? If you have, then go on this ID - Vladyslav Matviienko

0