onTouch event in android
i have a AnalogClock in layout. if i touch the AnalogClock the next activity will be come. how to 开发者_开发知识库write onTouch event for AnalogClock. i use this following code:
AnalogClock time;
time =(AnalogClock)findViewbyId(R.id.Widget44);
time.(i do not get any function list) please correct me.
Check the documentation here, AnalogClock
inherits from View
and therefore you can use the methods setOnClickListener(...)
or setOnTouchListener(...)
which should satisfy your needs.
精彩评论