【问题标题】:How to off wave animation at the end of listview and scrollview如何在列表视图和滚动视图的末尾关闭波浪动画
【发布时间】:2019-04-23 12:22:50
【问题描述】:

如何在 listview/scrollview 的结束/开始处关闭波浪动画

【问题讨论】:

    标签: android android-layout android-listview android-animation


    【解决方案1】:

    将此行添加到 RecyclerView 布局中

    android:overScrollMode="never"

    【讨论】:

      【解决方案2】:

      您可以定义样式:

      styles.xml

      <style name="Theme.MyTheme" parent="android:Theme.Holo">
          <item name="android:listViewStyle">@style/ListViewStyle</item>
          <item name="android:scrollViewStyle">@style/ScrollViewStyle</item>
      </style>
      
      <style name="ListViewStyle" parent="android:Widget.ListView">
          <item name="android:overScrollMode">never</item>
      </style>
      
      <style name="ScrollViewStyle" parent="android:Widget.ScrollView">
          <item name="android:overScrollMode">never</item>
      </style>
      

      AndroidManitest.xml

      <application
              android:theme="@style/Theme.MyTheme"
              ...
      >
      

      或者

      <ScrollView
          android:layout_width="match_parent"
          android:overScrollMode="never"
          android:layout_height="match_parent">
         ....
      </ScrollView>
      

      【讨论】:

        【解决方案3】:

        前 API 级别 14:

        android:fadingEdge="none"
        

        API 级别 14+:

        android:requiresFadingEdge="none"
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2017-01-28
          • 1970-01-01
          • 2018-04-02
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多