I want to set the Popup Menu inside the LinearLayout.
This is my code.
for(int i=0;i<ev.size();i++)
{
LinearLayout rl1 = new LinearLayout(getActivity());
rl1.setOrientation(LinearLayout.VERTICAL);
pum1 = new PopupMenu(getActivity(), view);
Event ebn=ev.get(i);
CalEvent cal = CalEvent.getCalEvent(ebn.getDescription());
pum.getMenu().add(Menu.NONE,ebn.getColor(),Menu.NONE,ebn.getTitle());
pum.getMenu().add(Menu.NONE,ebn.getColor(),Menu.NONE,cal.event_start);
rl1.addView(pum);
}
I'am facing this error- "The method addView(View) in the type ViewGroup is not applicable for the arguments (PopupMenu)". Please do help me