Hey guys the main layout xml file for my activity is R.layout.date_list_layout as it is used as follows
public void onCreate(Bundle savedInstanceState) {
super
What you are doing should not be done unless you are embedding the layout in the current layout (layout 1) and in that case you need to use include layout.
In case you want to access data and set it from one activity to another. Use SharedPreference to store the text in this activity and when the other activity launches which used the second layout as its content view, you can use this SP to access the data and set the text view.