Skip to content

How to create framelayout dynamically and add it to fragment so get multiple instances of vlc stream? #4

@sagar1351

Description

@sagar1351

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());


    }` 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions