best touchscreen resolution (pixels/mm)

by Ken Schultz » Wed, 11 Feb 2009 20:34:31 GMT


Sponsored Links
 Does anyone know the best touchscreen resolution for Android?  Most
likely there would be a sweet spot for this.  The higher the
resolution the more data which could cause a bottleneck for data flow
and the low the resolution the worse the accuracy is.  I would imagine
this to be in the units pixels per millimeter.
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



best touchscreen resolution (pixels/mm)

by Dianne Hackborn » Wed, 11 Feb 2009 21:29:33 GMT


 Some that is at least the same resolution as the screen should be
sufficient.  Very few things -- certainly nothing that is part of the
standard platform -- is going to do much useful with sub-pixel touch data
(though we do report it in the APIs).






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


Other Threads

1. ADT installation error !!

Hi All,

I have installed ADT earlier on  my windows xp with out any issues,
now trying on ubuntu I get this error
http://download.eclipse.org/releases/ganymede/features/org.eclipse.birt.report.data.oda.jdbc.dbprofile.sqlbuilder.feature_2.3.1v20080630-787A39xxELbRjZxlz-xBh6S1fcsX.jar'
has encountered a problem.

Transfer Exception.

when i check the details for this dialog

Transfer Exception
Read timed out

Any help regarding the same will be appreciated.

-Thanks & regards,
Manjunath S

--~--~---------~--~----~------------~-------~--~----~

2. java.lang.NullPointerException with getting ID of element

Hi,
Iam new to android and I really need help with accessing the xml
layout "objects" from .java. I have this code:

package cz.aurem.ot;

import android.app.Activity;
import android.os.Bundle;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.GestureDetector.OnGestureListener;
import android.widget.TextView;
import android.widget.ToggleButton;
import cz.aurem.ot.R;

public class ovladacOT extends Activity implements OnGestureListener {
    /** Called when the activity is first created. */
    private TextView viewA;
    public ToggleButton vypinac;

    private GestureDetector gestureScanner;

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);

        gestureScanner = new GestureDetector(this);
        this.vypinac = (ToggleButton)this.findViewById
(R.id.toggle_button);
        viewA = (TextView)this.findViewById(R.id.label);



        try {
                vypinac.setTextOn("LOL");
        } catch (Exception ex) {
           System.out.print("Exception" + ex.toString());
        }

        setContentView(R.layout.main);
    }

    @Override
    public boolean onTouchEvent(MotionEvent me)
    {
     return gestureScanner.onTouchEvent(me);
    }

    @Override
    public boolean onDown(MotionEvent e)
    {
     viewA.setText("-" + "DOWN" + "-");
     return true;
    }

    @Override
    public boolean onFling(MotionEvent e1, MotionEvent e2, float
velocityX, float velocityY)
    {
     viewA.setText("-" + "FLING" + "-");
     return true;
    }

    @Override
    public void onLongPress(MotionEvent e)
    {
     viewA.setText("-" + "LONG PRESS" + "-");
    }

    @Override
    public boolean onScroll(MotionEvent e1, MotionEvent e2, float
distanceX, float distanceY)
    {
     viewA.setText("-" + "SCROLL" + "-");
     return true;
    }

    @Override
    public void onShowPress(MotionEvent e)
    {
     viewA.setText("-" + "SHOW PRESS" + "-");
    }

    @Override
    public boolean onSingleTapUp(MotionEvent e)
    {
     viewA.setText("-" + "SINGLE TAP UP" + "-" + e.getX());
     return true;
    }
}


AND the main.xml:


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">


<ToggleButton android:id="@+id/toggle_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:textOn="Zastavit"
        android:textOff="Vped"/>
    <TextView
        android:id="@+id/label"
        android:layout_width="200sp"
        android:layout_height="200sp"
        android:background="#9CEB00"/>

</RelativeLayout>


Everytime I make action (touch the display or so (call the viewA.* or
vypinac.set*)) it crashes due to java.lang.NullPointerException. So it
looks like the
this.vypinac = (ToggleButton)this.findViewById(R.id.toggle_button);
is not works. I dont know what I do bad, please let me know the way or
so.
Thanks in advance :-)

--~--~---------~--~----~------------~-------~--~----~

3. Changed activity from a BroadcastReceiver.

4. App Idea for your consideration

5. Eclipse connecting to real atrget

6. reference modifiers

7. Newbie question about developing Android App