In my tablayout example, i have created 3 tabs, as usually i set 3 activities for each tab. I can set image to title bar of activity, which adds the intent to each tab. Due
--------------------------- One more Action for the same --------------------
Step Declare instance of class:
Parent Tab Activity:
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.tab_layout_title);
TabLayoutActivity.tabLayout = this;
TextView titleText = (TextView) findViewById(R.id.myTitle);
titleText.setText("Care");
Child Activity
@Override
protected void onResume() {
super.onResume();
TabLayoutActivity.tabLayout.titleText.setText("Title name");
}