android - Not able to scroll Google map with API v2 Horizontally -


i developing application in have integrated google map api v2. there sliding menu have added @ runtime using horizontalscrollview. problem able scroll map vertically, try scroll horizontally horizontalscrollview gets touch event.

this how make layout.

layoutinflater inflater = layoutinflater.from(this);     view menu = inflater.inflate(r.layout.menu, null);      horizontalscrollview hsv = new horizontalscrollview(this) {         @override         public boolean ontouchevent(motionevent ev) {             if (menu_displayed) {                 return false;             } else {                 return true;             }         }     linearlayout li_body = new linearlayout(this);     li_body.setlayoutparams(new layoutparams(layoutparams.wrap_content,             layoutparams.match_parent));     li_body.setorientation(0);     li_body.setbackgroundcolor(color.transparent);      hsv.addview(li_body);      textview placeholder = new textview(this);     placeholder.settextcolor(color.transparent);     placeholder.setlayoutparams(new layoutparams(width - 130,             layoutparams.match_parent));     placeholder.setvisibility(view.invisible);      li_body.addview(placeholder);      layoutinflater inflatex = layoutinflater.from(this);     view mainscreen = inflatex.inflate(r.layout.main, null);     li_body.addview(mainscreen);       framelayout mainframe = new framelayout(this);     mainframe.setlayoutparams(new layoutparams(layoutparams.match_parent,             layoutparams.match_parent));     mainframe.addview(menu);     mainframe.addview(hsv);      hsv.post(new runnable() {          @override         public void run() {             hsv.scrollby(width - 130, 0);         }     });     setcontentview(mainframe); 

the view mainscreen has fragment map. solution can scroll map horizontally?

try combining these parameters:

getslidingmenu().settouchmodeabove(slidingmenu.touchmode_fullscreen); 

or

getslidingmenu().settouchmodeabove(slidingmenu.touchmode_none); 

and other parameter:

getslidingmenu().setmode(slidingmenu.left_right); 

or

getslidingmenu().setmode(slidingmenu.left); / getslidingmenu().setmode(slidingmenu.right); 

if recall right, combination be

getslidingmenu().settouchmodeabove(slidingmenu.touchmode_none); getslidingmenu().setmode(slidingmenu.left_right); 

hope helps!


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -