It still can't work.
It says "Set whether this view can receive focus while in touch mode.
Setting this to true will also ensure that this view is focusable."
I think my view is not "in touch mode", so how to set my view with
touch mode? is it right?
2010/4/19 Robert Green :
> No,
>
> Don't ov
No,
Don't override it in your view. Call it from your view in the
constructor. setFocusableInTouchMode(true) is what you want to call.
On Apr 19, 1:40 am, a a wrote:
> I add
>
> android:focusableInTouchMode="true"
> in my xml
>
> and try to override the
>
> @Override
>
I add
android:focusableInTouchMode="true"
in my xml
and try to override the
@Override
public void setFocusableInTouchMode(boolean focusableInTouchMode) {
Log.d("harvey", "setFocusableInTouchMode");
}
But still can work when
Dear Robert,
How can i calls setFocusableOnTouchEvents(true)?
where can i wrote?
2010/4/17 Robert Green :
> Make sure your view calls setFocusableOnTouchEvents(true)
>
> On Apr 16, 4:44 am, a a wrote:
>> Dear all, i tested below, but it don't work
>>
>> 1. I wrote my GodsendView
>> public class
Make sure your view calls setFocusableOnTouchEvents(true)
On Apr 16, 4:44 am, a a wrote:
> Dear all, i tested below, but it don't work
>
> 1. I wrote my GodsendView
> public class GodsendView extends View implements OnTouchListener
> {
> @Override
> public boolean onTouch(View v,
Dear all, i tested below, but it don't work
1. I wrote my GodsendView
public class GodsendView extends View implements OnTouchListener
{
@Override
public boolean onTouch(View v, MotionEvent event) {
Log.d("harvey", "onTouch");
return false;
}
6 matches
Mail list logo