Touch screen phone programming.

How to code with screen control

Page 1 of 1

5 Replies - 12392 Views - Last Post: 27 October 2009 - 10:41 AM

#1 Da86ers  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 07-October 09

Touch screen phone programming.

Post icon  Posted 07 October 2009 - 04:57 AM

I am new to this type of programming and am trying to figure out how to move and expand pdf files on a touch screen phone. I believe that the libraries are in the JSR 184, but not sure. I am using the J2ME SDK and the help info isn't working. If someone can point me in the right direction it would be great.

JJ
Is This A Good Question/Topic? 0
  • +

Replies To: Touch screen phone programming.

#2 markhazlett9  Icon User is offline

  • Coding is a lifestyle
  • member icon

Reputation: 60
  • View blog
  • Posts: 1,666
  • Joined: 12-July 08

Re: Touch screen phone programming.

Posted 07 October 2009 - 11:40 AM

What platform are you using... usually the touch screen control is built into the API of the phone. Example Android uses touch screen but only with certain phones so the API will be built around the hardware. Look into the specific API of the platform that you're building for.

Cheers
Was This Post Helpful? 0
  • +
  • -

#3 gabehabe  Icon User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1382
  • View blog
  • Posts: 10,962
  • Joined: 06-February 08

Re: Touch screen phone programming.

Posted 08 October 2009 - 03:39 AM

Do you mean a multitouch to stretch it? Similar to the iPhone and a few android apps?

Generally, touch screen is the same as any other GUI design, it's pretty much all handled by the OS. You just use onclick / onTouch / onWhateverReallyItJustDependsOnThePlatform :)
Was This Post Helpful? 0
  • +
  • -

#4 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: Touch screen phone programming.

Posted 09 October 2009 - 12:08 AM

I haven't understood what you mean by "expanding" pdf files. Is that a zoom feature or something of that nature?

As far as the implementation is concerned, gabehabe is right. The OS takes care of all the lower level details. All we have to do is use a higher level API.

For J2ME, the touch handling events are present in the javax.microedition.lcdui.Canvas package. They are:
  • hasPointerEvents()
    Returns: boolean
    Description: Returns true if device supports touch-screen input.
  • hasPointerMotionEvents()
    Returns: boolean
    Description: Returns true if device supports detection of press, release and drag events.
  • pointerPressed(int x, int y)
    Returns: void
    Description: Invoked when a press event is triggered. The x and y variables will contain the coordinates of the location which was pressed.
  • pointerReleased(int x, int y)
    Returns: void
    Description: Similar to pointerPressed() except that it is invoked when the stylus/finger is released from the screen.
  • PointerDragged()
    Returns: void
    Description: Invoked in response to a drag event.
Hope this helps.
:)
Was This Post Helpful? 1

#5 Rizky_Syaiful  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-October 09

Re: Touch screen phone programming.

Posted 26 October 2009 - 07:49 PM

View Postborn2c0de, on 8 Oct, 2009 - 11:08 PM, said:

For J2ME, the touch handling events are present in the javax.microedition.lcdui.Canvas package. They are:[list]


Is it mean there is no multi-point support in javax.microedition.lcdui.Canvas package?

This post has been edited by Rizky_Syaiful: 26 October 2009 - 07:49 PM

Was This Post Helpful? 0
  • +
  • -

#6 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: Touch screen phone programming.

Posted 27 October 2009 - 10:41 AM

I don't think so but I believe an API supporting multi-touch will be available in the near future.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1