Post Reply

Test kernel: Zoom bar acting as multitouch pinch to zoom

OP manekineko

9th June 2011, 08:36 AM   |  #1  
manekineko's Avatar
OP Senior Member
Thanks Meter: 229
 
997 posts
Join Date:Joined: Jul 2009
Someone asked what the point of the new .39 kernel is, well here's a new feature I've coded up that was made possible due to the more modern kernel.

I have modified the touchscreen driver in the kernel so that the zoom bar is now working, and it sends signals to Android that make it think you're sending a multitouch pinch-to-zoom.

I've got it set so that it sends an input from the center of the screen. As you slide right, the driver tells Android two fingers are moving apart from the center. As you slide left, the driver tells Android two fingers are sliding from the sides towards the center. The net result is that the zoom bar works in any app that supports pinch to zoom.

I've uploaded a video showing it in action:
http://www.youtube.com/watch?v=GRWUzPveU14

I'm going to submit this patch soon, and I'd like it if some people would try it out and give any feedback before I do so. I suppose things to pay attention to would be any increased wonkiness in the touch response, as well as boundaries for the zoom bar. Also, if you have a better idea on how this should work, it's now or never.

Unfortunately, this is a modification of the new .39 kernel, which means that a lot of things are not working on it, and this test kernel will most likely not be suitable for daily use if you like wifi and the other things that don't work on .39 yet.

In order to install you must do the following:
1. Replace your zImage with the one attached.
2. Use the .39 haret (included in the zip for your convenience) with the .39 startup.txt line (set initrd_offset 0x00a00000)
3. Place the included android.hardware.touchscreen.multitouch.xml under /system/etc/permissions. I tried bind-mounting it from conf, but for some reason that did not work for me. If you don't do add this permission file, the multitouch points will still be sent to Android (and will show up in the app Multitouch Test), but Google's own apps like Browser will ignore them.
Attached Files
File Type: zip KernelAttachments.zip - [Click for QR Code] (2.08 MB, 267 views)
The Following 17 Users Say Thank You to manekineko For This Useful Post: [ View ]
9th June 2011, 11:35 AM   |  #2  
Tippfehler's Avatar
Senior Member
Bavaria/Germany
Thanks Meter: 18
 
259 posts
Join Date:Joined: Oct 2008
Amazing.
First time, I can use this since ages.
Unfortunately, my phone has become very sluggish with this test kernel.
9th June 2011, 12:05 PM   |  #3  
Member
Thanks Meter: 1
 
54 posts
Join Date:Joined: Sep 2010
Quote:
Originally Posted by Tippfehler

Amazing.
First time, I can use this since ages.
Unfortunately, my phone has become very sluggish with this test kernel.

I totally agree with that!

Rhod100_nl

Nice work!
9th June 2011, 02:39 PM   |  #4  
fortunz's Avatar
Senior Member
Flag inside
Thanks Meter: 104
 
814 posts
Join Date:Joined: Apr 2009
More
I assume pinch-to-zoom is pretty well supported in Android. Does this mean the zoom bar is now more supported (for zooming, button hacks aside) in XDAndroid than it ever was in officially baked HTC WinMo?

Impressive. Thanks for the vid.

I'm planning to give the .39 kernel a quick test run, hopefully this weekend. There's some software that crashes on me on open now and I'd like to see if its any different with .39. I'll try to give this a whirl then.

As for functionality, the p2z is cool, but not something I've been pining for. I don't know exactly what your plans are, but I'd love it if that function could be switched off easily (a line in startup.txt?), so future hacks creating, say, soft buttons on the bar instead could be more easily implemented.
The Following User Says Thank You to fortunz For This Useful Post: [ View ]
9th June 2011, 03:34 PM   |  #5  
Senior Member
Flag Roma
Thanks Meter: 84
 
337 posts
Join Date:Joined: May 2005
More
Quote:
Originally Posted by fortunz

I'd love it if that function could be switched off easily (a line in startup.txt?), so future hacks creating, say, soft buttons on the bar instead could be more easily implemented.

well that bar has been designed to be a zoom bar. you can do whatever you want with it but always a zoom bar remains using it as a "virtual button" is possible but on the phone you will always have the magnifying glasses printed
What you suggest is an hack to the original zoom bar design and it's not as useful as the zoom function (that on our resistive single touch screens is missing)
9th June 2011, 03:43 PM   |  #6  
fortunz's Avatar
Senior Member
Flag inside
Thanks Meter: 104
 
814 posts
Join Date:Joined: Apr 2009
More
Quote:
Originally Posted by LinoX

What you suggest is an hack to the original zoom bar design and it's not as useful as the zoom function (that on our resistive single touch screens is missing)

All I suggest is flexibility. I'm not trying to steal your zoom
9th June 2011, 04:17 PM   |  #7  
Senior Member
Flag Roma
Thanks Meter: 84
 
337 posts
Join Date:Joined: May 2005
More
Quote:
Originally Posted by fortunz

All I suggest is flexibility. I'm not trying to steal your zoom

All you are actually suggesting is complexity, indeed. A "soft" array button must be handled properly by the kernel / os / applications and it is a lot more than "one hack" for a function that will be probably not used because the zoom is a bit more important than a button
9th June 2011, 04:33 PM   |  #8  
fortunz's Avatar
Senior Member
Flag inside
Thanks Meter: 104
 
814 posts
Join Date:Joined: Apr 2009
More
I'm going to have to break out the bold, aren't I? I'm not asking for soft buttons. I'm asking that this implementation be flexible enough to allow for future hacks like soft buttons, whether they are your favorite or not. I don't even know if the request is necessary, but I never imagined it would be controversial. If that flexibility really is too complex, forgive the request and ignore it.
9th June 2011, 05:07 PM   |  #9  
Senior Member
Thanks Meter: 88
 
257 posts
Join Date:Joined: Jun 2007
Donate to Me
It's "controversial" because you are asking for a strip of capacitive touch to turn into buttons. As the OP indicated, implementing this requires not only a new kernel+touch, but files in system.ext2, so the system _thinks_ you have p2z when you still have a resistive screen. So what you are asking for is to make that "flexible" when the base feature has barely been coded+tested.

If you truly want capacitive soft buttons, look at the DIAM or RAPH. Back way then (2.0ish), the LED on the bottom button-panel/scroll would light up on finger contact (not pressed) when running xdandroid. It was more of a "wow it's cool" thing because it was a strip of capacitive touch with 5+ LEDs. I don't remember if the p2z worked with the center scrolly or not...

-- Starfox
9th June 2011, 05:14 PM   |  #10  
Retired Forum Moderator / Recognized Developer
Thanks Meter: 3,565
 
11,270 posts
Join Date:Joined: Feb 2007
Donate to Me
More
Quote:
Originally Posted by fortunz

I'm going to have to break out the bold, aren't I? I'm not asking for soft buttons. I'm asking that this implementation be flexible enough to allow for future hacks like soft buttons, whether they are your favorite or not. I don't even know if the request is necessary, but I never imagined it would be controversial. If that flexibility really is too complex, forgive the request and ignore it.

Alright, settle down children.

I think you're looking a little too far ahead fortunz, but that's just my opinion.

To manekineko - holy crap dude, that was fast! Nice work, definitely want to check it out.

But if you're on CDMA... then I'd imagine the experience is painful with data connected... still, great work. I'm sure the .39 kernel folk will gladly accept your patches, that's seriously cool!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes