当前位置: 首页 > news >正文

网站后台管理增加功能南宁白帽seo技术

网站后台管理增加功能,南宁白帽seo技术,手机网站有什么不同,自己做的网站能放到阿里云上在Android开发中使用View制作一个引导动画发布时间#xff1a;2020-11-20 16:46:16来源#xff1a;亿速云阅读#xff1a;98作者#xff1a;Leah这篇文章将为大家详细讲解有关在Android开发中使用View制作一个引导动画#xff0c;文章内容质量较高#xff0c;因此小编分享…在Android开发中使用View制作一个引导动画发布时间2020-11-20 16:46:16来源亿速云阅读98作者Leah这篇文章将为大家详细讲解有关在Android开发中使用View制作一个引导动画文章内容质量较高因此小编分享给大家做个参考希望大家阅读完这篇文章后对相关知识有一定的了解。一、实现效果图关于贝塞尔曲线二、实现代码1.自定义viewpackage com.czhappy.showintroduce.view;import android.content.Context;import android.graphics.Bitmap;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;import android.graphics.Path;import android.util.AttributeSet;import android.view.View;import android.widget.RelativeLayout;/*** Description: 水波纹动画引导view* User: chenzheng* Date: 2017/1/14 0014* Time: 18:01*/public class RippleIntroView extends RelativeLayout implements Runnable {private int mMaxRadius 70;private int mInterval 20;private int count 0;private Bitmap mCacheBitmap;private Paint mRipplePaint;private Paint mCirclePaint;private Path mArcPath;public RippleIntroView(Context context) {this(context, null);}public RippleIntroView(Context context, AttributeSet attrs) {this(context, attrs, 0);}public RippleIntroView(Context context, AttributeSet attrs, int defStyleAttr) {super(context, attrs, defStyleAttr);init();}private void init() {mRipplePaint new Paint();mRipplePaint.setAntiAlias(true);mRipplePaint.setStyle(Paint.Style.STROKE);mRipplePaint.setColor(Color.WHITE);mRipplePaint.setStrokeWidth(2.f);mCirclePaint new Paint();mCirclePaint.setAntiAlias(true);mCirclePaint.setStyle(Paint.Style.FILL);mCirclePaint.setColor(Color.WHITE);mArcPath new Path();}/*** view大小变化时系统调用* param w* param h* param oldw* param oldh*/Overrideprotected void onSizeChanged(int w, int h, int oldw, int oldh) {super.onSizeChanged(w, h, oldw, oldh);if (mCacheBitmap ! null) {mCacheBitmap.recycle();mCacheBitmap null;}}Overrideprotected void onDraw(Canvas canvas) {//获取加号图片viewView mPlusChild getChildAt(0);//获取提示图片viewView mRefsChild getChildAt(1);if (mPlusChild null || mRefsChild null) return;//获取加号图片大小final int pw mPlusChild.getWidth();final int ph mPlusChild.getHeight();//获取提示图片大小final int fw mRefsChild.getWidth();final int fh mRefsChild.getHeight();if (pw 0 || ph 0) return;//加号图片中心点坐标final float px mPlusChild.getX() pw / 2;final float py mPlusChild.getY() ph / 2;//提示图片左上角坐标final float fx mRefsChild.getX();final float fy mRefsChild.getY();final int rw pw / 2;final int rh ph / 2;if (mCacheBitmap null) {mCacheBitmap Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);Canvas cv new Canvas(mCacheBitmap);super.onDraw(cv);//清空所有已经画过的path至原始状态mArcPath.reset();//起始轮廓点移至xy坐标点,即加号图片正下方再往下20位置mArcPath.moveTo(px, py rh mInterval);//设置二次贝塞尔实现平滑曲线前两个参数为操作点坐标后两个参数为结束点坐标mArcPath.quadTo(px, fy - mInterval, fx fw * 0.618f, fy - mInterval);//0~255数值越小越透明mRipplePaint.setAlpha(255);cv.drawPath(mArcPath, mRipplePaint);//绘制半径为6的实心圆点cv.drawCircle(px, py rh mInterval, 6, mCirclePaint);}//绘制背景图片canvas.drawBitmap(mCacheBitmap, 0, 0, mCirclePaint);//保存画布当前的状态int save canvas.save();for (int step count; step mMaxRadius; step mInterval) {//step越大越靠外就越透明mRipplePaint.setAlpha(255 * (mMaxRadius - step) / mMaxRadius);canvas.drawCircle(px, py, (float) (rw step), mRipplePaint);}//恢复Canvas的状态canvas.restoreToCount(save);//延迟80毫秒后开始运行postDelayed(this, 80);}Overridepublic void run() {//把run对象的引用从队列里拿出来这样他就不会执行了但 run 没有销毁removeCallbacks(this);count 2;count % mInterval;invalidate();//重绘}/*** 销毁view时调用收尾工作*/Overrideprotected void onDetachedFromWindow() {super.onDetachedFromWindow();if (mCacheBitmap ! null) {mCacheBitmap.recycle();mCacheBitmap null;}}}2.MainActivity.javapackage com.czhappy.showintroduce.activity;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;import android.view.View;import android.view.ViewGroup;import com.czhappy.showintroduce.R;public class MainActivity extends AppCompatActivity {Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);View view findViewById(R.id.layout_ripple);view.setOnClickListener(new View.OnClickListener() {Overridepublic void onClick(View v) {((ViewGroup) v.getParent()).removeView(v);}});}}3.activity_main.xmlandroid:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:layout_widthwrap_contentandroid:layout_heightwrap_contentandroid:textHello World! /android:idid/layout_rippleandroid:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:clickabletrueandroid:fitsSystemWindowstrueandroid:background#AA000000android:idid/iv_plusandroid:layout_marginTop36dpandroid:srcmipmap/ic_addandroid:layout_alignParentRighttrueandroid:layout_marginRight6dpandroid:layout_widthwrap_contentandroid:layout_heightwrap_content/android:srcmipmap/tips_subscribeandroid:idid/tv_titleandroid:layout_belowid/iv_plusandroid:layout_marginTop50dpandroid:layout_alignParentRighttrueandroid:layout_marginRight40dpandroid:layout_widthwrap_contentandroid:layout_heightwrap_content/关于在Android开发中使用View制作一个引导动画就分享到这里了希望以上内容可以对大家有一定的帮助可以学到更多知识。如果觉得文章不错可以把它分享出去让更多的人看到。
http://www.huolong8.cn/news/176127/

相关文章:

  • 做神马网站优化快速怎样健建设一个有利于优化的网站
  • 给公司建立网站不可以做到的是东莞做网站一年费用
  • 大连网站建设企业泉州网站建设案例
  • 做网站谈单网站用免费空间好不好
  • 网站建设电话销售技巧如何建设wap网站
  • 微网站开发用什么软件大连工业大学
  • 临西县建设网站济南网站建设大标网络
  • 免费建站模板手机网站优化指南
  • 佛山外贸网站建设机构wordpress段落开头空两格
  • 建设企业网站心得体会怎样重新安装wordpress
  • 微商可以做网站推广吗福州建网站哪家好
  • 网站信息化建设什么意思辽宁省品牌建设的建议
  • 手机建网站步骤大庆网站设计费用
  • 赣州市做网站专门做儿童的店铺网站
  • php网站案例北京朝阳区邮政编码
  • 合作建站协议网站建设中期目标
  • 影楼微网站建设方案安徽省六安市城乡建设厅网站
  • 网站首页效果图怎么做甘肃网络推广技巧
  • 高仿做的最好的网站网站分页符素材
  • 做公众号的网站模板下载软件技术方案
  • 阿里云企业网站建设网页源代码能修改吗
  • 企业网站建设的平台公司虚拟地址多少钱一年
  • 什么网站做美食最好最专业重庆卓光科技有限公司
  • 音乐网站排名做网站外包工作怎么样
  • 专业设计网址青岛网站开发河南网络科技网站建设
  • 网站 活动页面会员卡管理系统自己做
  • 网站整站出售网站建设毕业设计评价
  • 手机网站建设推荐乐云seo南宁网站制作系统
  • 西安 网站建设 培训学校dw建网站怎么做
  • 怎么知道网站的空间服务商wordpress绑定手机验证