滑动起来,在Android中向下滑动动画在web视图视图、动画、Android、web

2023-09-06 02:54:20 作者:手插口袋 、耍酷耍帅

我有一个list.when用户章节列表中选择一个章节就得到扩展和子课题的一章列出。当用户选择特定的子课题其内容的WebView新的屏幕被装入。它的所有做的罚款。但我想上的WebView一些功能。当用户滑动起来web视图,web视图应侧面和一个新的WebView移动从底部上攻应该出现在屏幕上(向上滑动动画上的WebView)与下一子主题内容。如果向下滑动的同时,如果用户向下滑动以previous子主题内容的Web视图。

i have a list of chapters in a list.when user selects a chapter it get expanded and sub topics in that chapter lists. when user select the particular sub topic its contents get loaded in webview on new screen. its all done fine. But i want some functionality on webview. When user slide up the webview, webview should move up side and a new webview from bottom to upside should appear on screen (slide up animation on webview) with next subtopics contents. same in case of slide down when user slides down web view with previous subtopics contents.

请帮忙  如何提供向上滑动和向下滑动动画上的WebView。 谢谢

Please help how to provide slide up and slide down animation on webview. Thanks

推荐答案

应用动画的WebView ..

Apply animation to webview..

幻灯片down.xml

<?xml version="1.0" encoding="utf-8"?>

<set xmlns:android="http://schemas.android.com/apk/res/android">

<translate android:fromYDelta="0%p"   
          android:interpolator="@android:anim/accelerate_interpolator"      
    android:toYDelta="100%p" android:duration="2000" />  
</set>

滑动Up.xml

<?xml version="1.0" encoding="utf-8"?>

<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator">

<translate android:fromYDelta="100%" 
                   android:toXDelta="0" 
                   android:duration="1000" />
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="500" />
</set>

使用Wbeview startAnimation 方式

Use Wbeview startAnimation method