scrollable and touchable view

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

scrollable and touchable view

Postby aneuryzma » Mon Jan 18, 2010 7:17 pm

hi,

I want to display a photo and allow user to draw over it.

I don't want to resize the picture, I want to allow the user to scroll it by touching on the right , and at the same time to allow him to draw by touching on the center.

is that feasible ?

thanks
aneuryzma
Developer
Developer
 
Posts: 28
Joined: Wed Jan 06, 2010 10:46 am

Top

Postby appforce » Mon Jan 18, 2010 9:10 pm

Hi,

Can you further describe the drawing by touching in image's center? Anyway, it's probably solvable by writing a View.

Appforce Android developers
appforce
Experienced Developer
Experienced Developer
 
Posts: 60
Joined: Mon Nov 23, 2009 8:28 pm

Postby aneuryzma » Mon Jan 18, 2010 9:13 pm

draw lines with finger
aneuryzma
Developer
Developer
 
Posts: 28
Joined: Wed Jan 06, 2010 10:46 am

Postby appforce » Mon Jan 18, 2010 9:33 pm

I presume you have already implemented the draw code to listen for touching events. If you nest your ImageView in customized ScrollView which overrides dispatchTouchEvent(MotionEvent event) method, you can regulate what events will scroll and which will draw. If the touch is on the right, call super.dispatchTouchEvent, else call ImageView's dispatchTouchEvent.

Android developers
appforce
Experienced Developer
Experienced Developer
 
Posts: 60
Joined: Mon Nov 23, 2009 8:28 pm

Postby aneuryzma » Mon Jan 18, 2010 9:46 pm

ok got it, thanks
aneuryzma
Developer
Developer
 
Posts: 28
Joined: Wed Jan 06, 2010 10:46 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 5 guests