本文整理了Java中android.widget.HorizontalScrollView.setOnTouchListener()
方法的一些代码示例,展示了HorizontalScrollView.setOnTouchListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HorizontalScrollView.setOnTouchListener()
方法的具体详情如下:
包路径:android.widget.HorizontalScrollView
类名称:HorizontalScrollView
方法名:setOnTouchListener
暂无
代码示例来源:origin: stackoverflow.com
horizontalScrollView.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
代码示例来源:origin: stackoverflow.com
hScroll.setOnTouchListener(new View.OnTouchListener() { //outer scroll listener
private float mx, my, curX, curY;
private boolean started = false;
代码示例来源:origin: stackoverflow.com
currentView.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
return gestureDetector.onTouchEvent(event);
代码示例来源:origin: jakebonk/BoardView
public void SetColumnSnap(boolean columnSnap){
this.columnSnap = columnSnap;
mRootLayout.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
代码示例来源:origin: stackoverflow.com
final HorizontalScrollView hs = (HorizontalScrollView)findViewById(R.id.scroll);
ViewTreeObserver vto = hs.getViewTreeObserver();
vto.addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
hs.getViewTreeObserver().removeGlobalOnLayoutListener(this);
maxScrollX = hs.getChildAt(0)
.getMeasuredWidth()-getWindowManager().getDefaultDisplay().getWidth();
}
});
hs.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
Log.e("ScrollValue", Integer.toString(hs.getScrollX()));
if(hs.getScrollX() == maxScrollX){
Log.e("MaxRight", "MaxRight");
}
return false;
}
});
代码示例来源:origin: stackoverflow.com
hScroll.setOnTouchListener(new View.OnTouchListener() { //outer scroll listener
private float mx, my, curX, curY;
private boolean started = false;
代码示例来源:origin: stackoverflow.com
hScroll.setOnTouchListener(new View.OnTouchListener() { //outer scroll listener
private float mx, my, curX, curY;
private boolean started = false;
代码示例来源:origin: stackoverflow.com
hScroll.setOnTouchListener(new View.OnTouchListener() { //outer scroll listener
private float mx, my, curX, curY;
private boolean started = false;
代码示例来源:origin: stackoverflow.com
hori2=(HorizontalScrollView)findViewById(R.id.hr_2);
hori2.setOnTouchListener(new OnTouchListener() {
hori2.setOnTouchListener(new OnTouchListener() {
内容来源于网络,如有侵权,请联系作者删除!