android.widget.HorizontalScrollView.setOnTouchListener()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中android.widget.HorizontalScrollView.setOnTouchListener()方法的一些代码示例,展示了HorizontalScrollView.setOnTouchListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HorizontalScrollView.setOnTouchListener()方法的具体详情如下:
包路径:android.widget.HorizontalScrollView
类名称:HorizontalScrollView
方法名:setOnTouchListener

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() {

相关文章

HorizontalScrollView类方法