Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Added touchmove event for Titanium for Android. #1251

wants to merge 1 commit into from

3 participants



This commit has added the touchmove event for the ScrollableView for Android. More events to come.


Russ - Did you sign a CLA? If yes, please provide me the sign date and email address that you signed it with.


@peterwilli Just to echo @negupta, we will need you to sign our Contributor's License Agreement, file a JIRA issue to track the feature (or point to an existing one), and provide a simple test case so we can verify this works :)

@negupta negupta closed this

Closing this PR in the absence of a signed CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 25, 2012
  1. @peterwilli
This page is out of date. Refresh to see the latest.
11 android/modules/ui/src/java/ti/modules/titanium/ui/
@@ -214,6 +214,17 @@ public void fireScroll(int to)
fireEvent(TiC.EVENT_SCROLL, options);
+ public void fireTouchMove(float x, float y)
+ {
+ if (hasListeners(TiC.EVENT_TOUCH_MOVE)) {
+ KrollDict options = new KrollDict();
+ options.put("view", this);
+ options.put("x", x);
+ options.put("y", y);
+ fireEvent(TiC.EVENT_TOUCH_MOVE, options);
+ }
+ }
@Kroll.getProperty @Kroll.method
public int getCurrentPage()
13 android/modules/ui/src/java/ti/modules/titanium/ui/widget/
@@ -68,6 +68,19 @@ private ViewPager buildViewPager(Context context, ViewPagerAdapter adapter)
ViewPager pager = new ViewPager(context);
+ pager.setOnTouchListener(new View.OnTouchListener()
+ {
+ @Override
+ public boolean onTouch(View v, MotionEvent e)
+ {
+ switch (e.getAction()) {
+ case MotionEvent.ACTION_MOVE:
+ ((ScrollableViewProxy)proxy).fireTouchMove(e.getX(), e.getY());
+ break;
+ }
+ return true;
+ }
+ });
pager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener()
Something went wrong with that request. Please try again.