滑动起来,在Android中向下滑动动画在web视图 [英] Slide up and Slide down animation on Webview in Android

查看:168
本文介绍了滑动起来,在Android中向下滑动动画在web视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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

这篇关于滑动起来,在Android中向下滑动动画在web视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆