Code example for PagerTabStrip

0
import android.widget.Toast; 
 
public class MyPagerTabStrip extends PagerTabStrip { 
	private Context appContext = null;
	public MyPagerTabStrip(Context context) {
		super(context);
		this.appContext = context.getApplicationContext();
	} 
 
	public MyPagerTabStrip(Context context, AttributeSet attrs) {
		super(context, attrs);
		this.appContext = context.getApplicationContext();
	} 
 
	@Override 
	public boolean onTouchEvent(MotionEvent ev) {
		Toast.makeText(this.appContext, ev.toString(), Toast.LENGTH_SHORT).show();
		Log.i(this.toString(), "onTouchEvent: " + ev.getX() + ", " + ev.getY());
		return super.onTouchEvent(ev);
	} 
Experience pair programming with AI  Get Codota for Java