android动画
移动爱好者
这个作者很懒,什么都没留下…
展开
-
android一个弹出菜单的动画(二)
如果做一个弹出的控件,我们可以进行添加view:写class SatelliteMenu extends FrameLayoutprivate void init(Context context, AttributeSet attrs, int defStyle) { inflate(context, R.layout.sat_main, this); imgMain = (Ima原创 2014-08-08 16:34:43 · 1715 阅读 · 0 评论 -
如何采用绝对坐标的方式动画方式移动view和如何点击view的时候获取它的cachebitmap并移动
Layout:<com.example.android_test.MyDragLayer xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rootView" android:layout_width="fill_parent" android:layout_heig原创 2014-08-15 07:19:20 · 1484 阅读 · 0 评论 -
如果模拟一种图标被删除时一种颜色渐变的效果,采用TransitionDrawable实现
效果图:TransitionDrawable 可以用来实现两个Drawable直接的交错渐变的过渡效果接着上篇,我们这样来实现:public class MyDragLayer extends FrameLayout { /** * The bitmap that is currently being dragged */ private Bitmap m原创 2014-08-15 12:27:35 · 1217 阅读 · 0 评论 -
一个带动画的页面底部的TabBar的实现
有时有这样一个需求,页面底部有几个图标可以点击,如果一个screenWidth显示不下这些图标,则这一列图标最后一个是more,点击more,可以通过动画展示两列图标这样来加入layout中:<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="ma原创 2014-08-13 22:01:29 · 1884 阅读 · 1 评论 -
如果写一个点击view带动画的下滑展开显示隐藏内容的控件
原理是在onMeasure中得到隐藏内容的高度,点击这个view的时候对隐藏的view startAnimation,让它的高度从0增长到onMeasure得到的这个View的measureHeight具体这样写:public class ExpandableLayout extends LinearLayout { private Context mContext; pri原创 2014-08-25 06:45:10 · 5998 阅读 · 2 评论 -
android一个弹出菜单的动画(一)
先上效果图:先写Layout文件:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_paren原创 2014-08-06 17:53:18 · 2762 阅读 · 1 评论 -
android的ViewPager和Animation的一些使用(一)
android的ViewPager是一个可以支持手势来切换View的控件,很适合来做用户引导的页面:如果有4张图,那么我们这样来写Layout:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/whats_new_main_view" andr原创 2014-07-15 10:54:21 · 1941 阅读 · 0 评论 -
android Title滑块动画实现(适合新闻客户端多种栏目的展示)
先上效果图,选择不同的模块,滑动会通过动画形式滑过去,这种适合新闻客户端多种栏目的展示:这么写Layout:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="原创 2014-07-01 13:20:43 · 2976 阅读 · 15 评论 -
android的ViewPager和Animation的一些使用(二)
Animation的部分android的animation分为scale,rotate,tranlateAnimation,alpha这几种start animation的方式以下几种: t1_icon1.setImageResource(R.drawable.t1_frame_animation); //t1_frame_animation这个动画是放在drawab原创 2014-07-15 11:20:20 · 1571 阅读 · 2 评论 -
android旋转动画和平移动画详解,补充说一下如果制作gif动画放到csdn博客上
先上效果图:这里做一个左右旋转,上下旋转,和左右移动的动画,先自己建立一个View的类,作为操作的对象:public class MyView extends View { private Paint mPaint; int width = 0; int height = 0; public MyView(Context context, AttributeSet a原创 2014-07-13 12:38:49 · 2626 阅读 · 2 评论 -
写一个android带动画效果的TabHost(类似微博客户端的切换效果)
先上图:原创 2014-07-10 08:18:49 · 2320 阅读 · 0 评论 -
android如何做iphone那种图片抖动动画的效果(包括button和EditText)
给按钮做抖动效果,可以这样做,建立anim文件夹在res下面,创建一个button_shake.xml<rotate xmlns:android="http://schemas.android.com/apk/res/android" android:duration="120" android:fromDegrees="-3" android:pivotX="100原创 2014-07-10 14:01:17 · 4723 阅读 · 1 评论 -
Dialog在android中的应用(二)
如果实现一个带动画的下拉的Dialog沿用上篇的基类,实现实际上的子类:public class DropDownFilterDialogForPhone extends DropDownFilterDialog { private boolean mShowAnimation = true; private boolean mIsInAnimation;原创 2015-05-11 14:02:01 · 731 阅读 · 0 评论