-4

Is there any way to make this possible? I'm using Inflate but its not working. So did anyone have any other way?

patthoyts
  • 32,320
  • 3
  • 62
  • 93
User
  • 453
  • 1
  • 8
  • 15
  • possible duplicate of [two different layouts for one activity](http://stackoverflow.com/questions/13063902/two-different-layouts-for-one-activity) – Fragment Aug 27 '15 at 11:07

3 Answers3

2

Try

1. merging layouts, as describrd in Android Developers Resources.

2. Using two layout xml file for one Activity

ρяσѕρєя K
  • 132,198
  • 53
  • 198
  • 213
1

If you want to show like two different layout in screen, just use fragments. That is the proper way to solve your problem.

Akilan
  • 1,707
  • 1
  • 16
  • 30
0

use LayoutInflater

LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                row = vi.inflate(R.layout.Second,null);
Kanaiya Katarmal
  • 5,974
  • 4
  • 30
  • 56