Last time we discuss i am unable to get multiple instances on android-m.now that issue is solved.now i want to know how did i create framelayout dynamically and its added to fragment.
Below code shown creating framelayout dynamically but still it gives only one stream.one surface to be shown.
` for (int i = 1; i <= 3; i++) {
fl1 = new FrameLayout(MainActivity.this);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, 1);
fl1.setLayoutParams(params);
fl1.setBackgroundColor(Color.parseColor("#000000"));
fl1.setId(i+1);
linear1.addView(fl1);
this.showFragment(
VideoFragment.newInstance(urlilist.get(0)),
fl1.getId());
}`