Tag: animation

backgroundPositionX不适用于Firefox

我有玩YouTube的精灵animation,但有一个问题。 它不会在Firefox下工作(但在Chrome和IE8上工作)…这是代码: http : //goo.gl/4IxkI 额外的信息:问题是,在Firefox下它不改变背景的位置(不会播放animation)…没有错误,只是不改变背景的位置。 会apreciate帮助 – 谢谢

可以使用ObjectAnimator进行animation的Android属性

我开始在视图animation中使用属性animation,因为我有一个视图,需要按比例缩小和推动其他视图animation。 我见过一些例子,但我只是想知道是否有任何地方提供了可以使用这些类改变的属性列表。 例如,我看到一个教程做了一个快速的旋转使用: ObjectAnimator.ofFloat(aniView, "rotation", 360) 这是相当酷,但我不会知道旋转属性,如果不是那个确切的教程,是否有任何可以完成的全面清单? 我想要animation的特定属性是LinearLayout中视图的权重,如果任何人有任何具体的意见。

你可以用Javascript来控制GIFanimation吗?

是否有可能使用JavaScript来控制哪个框架的GIF图像显示和/或停止animation。 我想能够加载一个GIF几个帧,只显示其中之一。 我知道我可以用很多不同的图片来做,但是如果我能用GIF做我想做的,那只会是一个文件。

什么原因导致这个错误 “CALayer的立场包含NaN:”

我见过这种情况,只要我旋转一个有UITableView的屏幕就可以了。 我发现它发生在UIViewController的willRotate和didRotate方法调用之间我的同事也在其他地方看到了它,通常是围绕旋转。 它直到最近才开始发生,我们很难理解我们应该如何处理它(谷歌search没有以确切的forms显示错误信息)。 有没有其他人遇到这个知道该怎么办呢?

停止在ng-show / ng-hide上发生的Angularanimation

在我的AngularJS应用程序中,我使用fontawesome作为我的加载debugging器: <i class="fa fa-spin fa-spinner" ng-show="loading"></i> 我还使用AngularToaster来处理对ngAnimate有依赖性的通知消息。 当我在AngularJS应用程序中joinngAnimate的时候,它会以怪异的方式animation我的加载旋钮。 我想阻止这种情况的发生,但无法find一种方法来禁用这些装载机上的animation(它也臭得更新我的应用程序中的每一个装载机)。 这里是一个显示我的确切问题的小人物。

在iOS中实现启animation面

在Cocoa,Objective-C和iOS开发中,我是一个新手。 我想实现一个视图,只是一个启animation面,并且只能在路由到主视图之前持续很短的时间。 你有什么想法,我应该如何执行? 任何教程或代码示例? 我有一些与多个意见,但没有一个计时器redirect到另一个几秒钟后,就像我想要做的。

片段标准转换不是animation

我正在使用v4 android兼容库来开发一个专门用于Android 2.2设备的片段。 一切工作都应该如此,除了我不能得到任何animation工作,甚至没有标准的animation。 码: FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); ABCFragment abcFragment = new ABCFragment(); ft.replace(R.id.main_frame_layout_fragment_holder,abcFragment); ft.addToBackStack(null); ft.commit(); 而不是使用过境animation,片段冻结了大约一秒,刚刚消失,新的出现。 使用: ft.setCustomAnimations(android.R.anim.slide_in_left,android.R.anim.slide_out_right); 也不起作用。 XML: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res/com.synergygb.mycustomapp" android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:gravity="bottom"> <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/main_frame_layout_fragment_holder"> </FrameLayout> <!– OTHER FIXED UI ELEMENTS–> </RelativeLayout> 我看到自定义animation在兼容性库中被打破了,但似乎没有人遇到与标准转换有关的问题。 我已经在3.2.1摩托罗拉Xoom,2.3 Galaxy Tab 7“,2.2模拟器,甚至在2.3.4的HTC G2上testing过。 这里有什么可能是错的?

如何在android中使用基于值的圆圈大小绘制一个带有animation的圆

我想开发一个自定义组件,它根据不同的值绘制一部分的圆。 例如绘制1/4圈,1/2圈等。组件需要animation来显示绘制过程。 部分圆是在静态图像视图的顶部绘制的,我打算使用两个视图,在静态视图之上animation一个视图。 任何build议如何开发这个? 我把截图作为参考。 请参考图片,并感受它的样子。 谢谢! 提前致谢。

UICollectionViewanimation单元大小更改会导致不希望的行为

我有一个UICollectionViewController使用标准的UICollectionViewFlowLayout来显示一个垂直的单元格列。 我试图在单元格点击时在单元格上创build展开/折叠animation。 我使用下面的代码来完成这个: – (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath (NSIndexPath *)indexPath { [self.feedManager setCurrentlySelectedCellIndex:indexPath.item]; [self.collectionView performBatchUpdates:nil completion:nil]; } – (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { //Return the size of each cell to draw CGSize cellSize = (CGSize) { .width = 320, .height = [self.feedManager heightForCellAtIndexPath:indexPath] }; return cellSize; } pipe理对象上的'selectedCellIndex'属性告诉数据模型在heightForCellAtIndexpath中返回展开或折叠的大小: [self.collectionView performBatchUpdates:nil completion:nil]; 然后performBatchUpdates:completiong:方法dynamic地改变这个尺寸的改变。 然而! 当animation发生时,展开的单元格可能会使屏幕底部的部分可见单元格离开屏幕。 如果是这种情况,我随后折叠这个单元格,现在的非屏幕单元格将会捕捉到它的旧位置,而没有animation,而所有其他可见单元格将根据需要animation。 […]

如何让文字在Android中淡入淡出?

我有一段文字,当一个button被点击时,我希望这个文字淡出,改为其他文字,然后淡入。我有一些代码,但它不会淡出淡出animation。 final TextView mSwitcher = (TextView) findViewById(R.id.bookContent); mSwitcher.setText("old text"); final Animation in = new AlphaAnimation(0.0f, 1.0f); in.setDuration(3000); final Animation out = new AlphaAnimation(1.0f, 0.0f); out.setDuration(3000); Button moveOn = (Button) findViewById(R.id.moveOn); moveOn.setOnClickListener( new OnClickListener() { public void onClick(View v) { mSwitcher.startAnimation(out); mSwitcher.setText("new text"); mSwitcher.startAnimation(in); } });