• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Search results

  1. U

    Apps Detect Touch on Custom View in Activity

    Hi everyone. I have created a class called MainView that extends View. In the main activity, how would I fire an onTouch event when I tap on the View?
  2. U

    Apps Detect Movements on Android Device

    Is it possible to detect whether the android device has moved in a certain direction and how much it has moved? For example, if I move my device 100 pixels to the left, a number would be displayed saying x is -100 pixels. If this is possible, which sensor would I use?