I want disable the multi-touch action and the pulling action from my screen and from my activity. I want only use the impact action for my activity. How can I do it?
I
If I'm to understand your question correctly, I think you want to use an OnClickListener
instead of an OnTouchListener
.
Try this:
a.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View arg0)
{
B b = new B(getApplicationContext());
relativeLayout.addView(b);
}
});
This is assuming you want to tap anywhere within a
to add b
to your relativeLayout
. If you want to tap a specific area within a
you should add a new view to a
that covers that area and then add the click listener to that new view.