Check out example codes for "android java display icon in action bar". It will help you in understanding the concepts better.

Code Example 1

ActionBar actionBar = getActionBar();
actionBar.setSubtitle("mytest");
actionBar.setTitle("vogella.com");

Code Example 2

getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setLogo(R.mipmap.ic_launcher);
getSupportActionBar().setDisplayUseLogoEnabled(true);

Learn ReactJs, React Native from akashmittal.com