i'm adding image view linear layout, linear layout added scroll view. i'm displaying scroll view window manager, because happening service. can see scroll bar, , when drag , down scroll bar moves image views don't.
here's code:
// define 2 views scroll = new scrollview(this); trayapplist = new linearlayout(this); //define basic layout properties trayapplist.setorientation(linearlayout.vertical); width = 50; height = display.getheight(); // shortcut list container lstparams = new windowmanager.layoutparams(windowmanager.layoutparams.wrap_content, windowmanager.layoutparams.fill_parent, windowmanager.layoutparams.type_system_alert, windowmanager.layoutparams.flag_not_focusable | windowmanager.layoutparams.flag_layout_in_screen, pixelformat.translucent); lstparams.gravity = docklocation; scroll.setlayoutparams(new android.view.viewgroup.layoutparams(windowmanager.layoutparams.wrap_content, height)); //define window manager windowmanager wm = (windowmanager) getsystemservice(window_service); //now display views scroll.setscrollcontainer(true); scroll.addview(trayapplist); wm.addview(scroll, lstparams);
you can try below:
scrollview scroll = new scrollview(context); scroll.setbackgroundcolor(android.r.color.transparent); scroll.setlayoutparams(new layoutparams(layoutparams.fill_parent,layoutparams.fill_parent)); scroll.addview(yourtableview);
Comments
Post a Comment