久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='YGbXw'><tr id='YGbXw'><dt id='YGbXw'><q id='YGbXw'><span id='YGbXw'><b id='YGbXw'><form id='YGbXw'><ins id='YGbXw'></ins><ul id='YGbXw'></ul><sub id='YGbXw'></sub></form><legend id='YGbXw'></legend><bdo id='YGbXw'><pre id='YGbXw'><center id='YGbXw'></center></pre></bdo></b><th id='YGbXw'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YGbXw'><tfoot id='YGbXw'></tfoot><dl id='YGbXw'><fieldset id='YGbXw'></fieldset></dl></div>

    • <bdo id='YGbXw'></bdo><ul id='YGbXw'></ul>
  • <legend id='YGbXw'><style id='YGbXw'><dir id='YGbXw'><q id='YGbXw'></q></dir></style></legend>

    1. <small id='YGbXw'></small><noframes id='YGbXw'>

      1. <tfoot id='YGbXw'></tfoot>

        onTouch,onLongClick一起在android中

        onTouch, onLongClick together in android(onTouch,onLongClick一起在android中)

        <legend id='KKaz8'><style id='KKaz8'><dir id='KKaz8'><q id='KKaz8'></q></dir></style></legend>
        <i id='KKaz8'><tr id='KKaz8'><dt id='KKaz8'><q id='KKaz8'><span id='KKaz8'><b id='KKaz8'><form id='KKaz8'><ins id='KKaz8'></ins><ul id='KKaz8'></ul><sub id='KKaz8'></sub></form><legend id='KKaz8'></legend><bdo id='KKaz8'><pre id='KKaz8'><center id='KKaz8'></center></pre></bdo></b><th id='KKaz8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KKaz8'><tfoot id='KKaz8'></tfoot><dl id='KKaz8'><fieldset id='KKaz8'></fieldset></dl></div>

                <tbody id='KKaz8'></tbody>
            • <small id='KKaz8'></small><noframes id='KKaz8'>

              <tfoot id='KKaz8'></tfoot>
                • <bdo id='KKaz8'></bdo><ul id='KKaz8'></ul>
                  本文介紹了onTouch,onLongClick一起在android中的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在動態地將圖像視圖添加到父布局.我正在對添加的圖像執行放大/縮小操作.我想刪除它的添加視圖 onLongPress.

                  I'am adding imageviews to parent layout dynamically. And i'am performing zoom in/out operations onTouch of added image. I want to remove the added view onLongPress of it.

                  img.setOnLongClickListener(longClickAction);
                  img.setOnTouchListener(touchAction); 
                  

                  長按:

                  OnLongClickListener longClickAction = new OnLongClickListener() {
                  
                      @Override
                      public boolean onLongClick(View v) {
                  
                          parentLayout.removeView((ImageView)v);
                          return false;
                      }
                  };
                  

                  觸摸:

                  OnTouchListener touchAction = new OnTouchListener() {
                  
                      @Override
                      public boolean onTouch(View v, MotionEvent event) {
                          ImageView i = (ImageView)v;
                  
                          //perfrom zoom operation on touch of imageview
                          zoom(i, event);
                          return true; 
                  
                      }
                  };
                  

                  只有 Touch 事件有效.為什么?我怎么能兩者兼得?我哪里出錯了?我應該怎么做才能刪除添加的視圖?請幫我.提前致謝.

                  Only Touch events are working. Why? How can i have both? Where iam going wrong? What should i do to remove added view? Please help me. Thanks in advance.

                  推薦答案

                  onTouch 總是為您的視圖調用,因為這是將事件分派到視圖的初始狀態.當你長按你的視圖時,它仍然首先調用 onTouch 并且因為你在 onTouch 中返回 true (這意味著你已經消費了這個事件并且它不應該被進一步發送)你不會得到 onLongPress 調用.訣竅是在 onTouch

                  onTouch is always called for your view since this is the initial state of dispatching the events to the view. When you long press your view this still calls onTouch first and since you return true in onTouch(which means that you've consumed this event and it should not be further dispatched) you won't get onLongPress called. What will do the trick is returning false in onTouch

                  這篇關于onTouch,onLongClick一起在android中的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)
                  Get current location during app launch(在應用啟動期間獲取當前位置)
                  locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)
                • <i id='NuE8C'><tr id='NuE8C'><dt id='NuE8C'><q id='NuE8C'><span id='NuE8C'><b id='NuE8C'><form id='NuE8C'><ins id='NuE8C'></ins><ul id='NuE8C'></ul><sub id='NuE8C'></sub></form><legend id='NuE8C'></legend><bdo id='NuE8C'><pre id='NuE8C'><center id='NuE8C'></center></pre></bdo></b><th id='NuE8C'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='NuE8C'><tfoot id='NuE8C'></tfoot><dl id='NuE8C'><fieldset id='NuE8C'></fieldset></dl></div>
                    <tbody id='NuE8C'></tbody>
                    • <legend id='NuE8C'><style id='NuE8C'><dir id='NuE8C'><q id='NuE8C'></q></dir></style></legend>

                      • <bdo id='NuE8C'></bdo><ul id='NuE8C'></ul>
                          <tfoot id='NuE8C'></tfoot>

                            <small id='NuE8C'></small><noframes id='NuE8C'>

                          1. 主站蜘蛛池模板: 国产一级电影在线观看 | 亚洲视频免费播放 | 色就干 | 性精品| 精品视频免费 | 一区二区三区小视频 | 久久乐国产精品 | 中文字幕免费观看 | 黄色av网站在线观看 | av网站免费 | 91免费看片 | 日韩av一区二区在线观看 | 成人片免费看 | 国产精品久久久久久久久久免费看 | 日韩日韩日韩日韩日韩日韩日韩 | 精品在线一区 | 一区二区久久精品 | 日韩一二三区视频 | 亚洲人在线 | 一区二区三区免费观看 | 欧美一级二级三级视频 | a视频在线| 国产精品99久久久久久久久久久久 | 成人福利网 | 精品伊人 | 国产欧美日韩一区二区三区在线 | 国产精品久久久久久吹潮日韩动画 | 人人叉 | 一区二区三区国产 | 国产精品久久久久久久久免费高清 | 久久男人 | 亚洲欧美日韩精品久久亚洲区 | av黄色片| 男女免费观看在线爽爽爽视频 | 99精品观看| 国产成人免费视频网站视频社区 | 欧美日韩高清一区 | 中文字幕一区在线观看视频 | 午夜影视在线观看 | 免费在线精品视频 | 一级在线视频 |