I would like to access a textview called user_status that's inside a custom xml layout file in order to populate it with some data. I would like to access it from my main activity java class. How do I do this? I have tried some answers already on stack overflow but it's either not working or too outdated.
LayoutInflater inflater = MessageActivity.this.getLayoutInflater();
View inflatedView = inflater.inflate(R.layout.message_row, null);
TextView userMessage= (TextView) inflatedView.findViewById(R.id.user_status);
userMessage.setText("NEW MESSAGE DUMMMY!");