Skip to content

scroll_view滑动过程会自动回弹 #961

@Sokyx

Description

@Sokyx

1、自己项目中,遇到了这个问题,发现是scroll_view滑动列表里面有edit,在滑动过程中,触摸到了edit后,松手,就会100%回弹到原位
2、demouiold程序list_view - mobile style里面测试了一下,也是有这个情况的。不过还有别的奇怪地方,有时候没有碰到edit也会回弹,有时候碰到edit也不会回弹,轻轻滑动一下,也容易自动就到底了。由于demo界面显示很小,所以list_view_m.xml里面我修改了一下:


[视频.zip](https://github.com/user-attachments/files/22020107/default.zip)

diff --git a/design/default/ui/list_view_m.xml b/design/default/ui/list_view_m.xml
index 34f5d02..571f5d8 100644
--- a/design/default/ui/list_view_m.xml
+++ b/design/default/ui/list_view_m.xml
@@ -1,6 +1,6 @@
 <window anim_hint="htranslate">
-  <list_view x="0"  y="30" w="100%" h="-80" item_height="60">
-    <scroll_view name="view" x="0"  y="0" w="100%" h="100%" slide_limit_ratio="0.5">
+  <list_view x="0"  y="30" w="100%" h="-80" item_height="120">
+    <scroll_view name="view" x="0"  y="0" w="100%" h="100%" >
       <list_item style="odd" children_layout="default(rows=1,cols=0)">
         <image draw_type="icon" w="30" image="earth"/>
         <label w="-30" text="1.Hello AWTK !">
@@ -99,6 +99,19 @@
       <list_item style="even" children_layout="default(rows=1,cols=1,m=15)">
         <edit w="70%" tips="desc" action_text="next" text=""/>
       </list_item>
+         <list_item style="odd_clickable" name="remove_self1" text="Remove Self1" />
+         <list_item style="odd_clickable" name="remove_self2" text="Remove Self1" />
+         <list_item style="odd_clickable" name="remove_self3" text="Remove Self1" />
+         <list_item style="odd_clickable" name="remove_self4" text="Remove Self1" />
+         <list_item style="odd_clickable" name="remove_self5" text="Remove Self1" />
+         <list_item style="odd_clickable" name="remove_self6" text="Remove Self" />
+         <list_item style="odd_clickable" name="remove_self7" text="Remove Self" />
+         <list_item style="odd_clickable" name="remove_self8" text="Remove Self" />
+         <list_item style="odd_clickable" name="remove_self9" text="Remove Self" />
+         <list_item style="odd_clickable" name="remove_self11" text="Remove Self" />
+         <list_item style="odd_clickable" name="remove_self12" text="Remove Self" />
+         <list_item style="odd_clickable" name="remove_self13" text="Remove Self" />
+         <list_item style="odd_clickable" name="remove_self14" text="Remove Self" />
     </scroll_view>
     <scroll_bar_m name="bar" x="right" y="0" w="6" h="100%" value="0"/>
   </list_view>


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions