forward touch events to pager in import activity

This commit is contained in:
Vincent Breitmoser 2014-06-18 22:52:36 +02:00 committed by Dominik Schürmann
parent a246dc9675
commit 5c6139f57a

View File

@ -37,6 +37,7 @@ import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarActivity;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -182,6 +183,18 @@ public class ImportKeysActivity extends ActionBarActivity {
// update layout after operations // update layout after operations
mSlidingTabLayout.setViewPager(mViewPager); mSlidingTabLayout.setViewPager(mViewPager);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
boolean result = super.onTouchEvent(event);
if (!result) {
mViewPager.onTouchEvent(event);
}
return result;
} }
protected void handleActions(Bundle savedInstanceState, Intent intent) { protected void handleActions(Bundle savedInstanceState, Intent intent) {