I have created two demo Fragment classes and corresponding fragment layout using Right Click on Java project folder -> New -> Fragment and kept everything generated by