Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid work multitouch button
    primarykey
    data
    text
    <p>Hi i want to create 2 Button and i want to multitouch ??</p> <p>i tryed to do but no example in internet..</p> <p>So if you got one can you share or can you give me opinion ?? my code is this but not support multitouch</p> <pre><code> package multi.touch; import android.app.Activity; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.AbsoluteLayout.LayoutParams; import android.widget.Button; import android.widget.TextView; public class baslat extends Activity implements OnTouchListener { TextView yazi; TextView bir,iki; Button buton1,buton2; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); yazi=(TextView)findViewById(R.id.textView1); bir=(TextView)findViewById(R.id.textView2); iki=(TextView)findViewById(R.id.textView3); buton1=(Button)findViewById(R.id.button1); buton2=(Button)findViewById(R.id.button2); buton2.setOnTouchListener(this); buton1.setOnTouchListener(this); } @Override public boolean onTouchEvent(MotionEvent event) { yazi.setText(String.valueOf(event.getPointerCount()+"\n\n")); bir.setText(String.valueOf("Birinci " + (int)event.getX(0)+"\n\n"+(int)event.getY(0))); iki.setText(String.valueOf("Ikinci"+ (int)event.getX(1)+"\n\n"+(int)event.getY(1))); //buton2.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT, (int)event.getX(0), (int)event.getY(0))); return super.onTouchEvent(event); } @Override public boolean onTouch(View v, MotionEvent event) { Button fds=(Button)v; return false; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload