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

网站建设费用折旧年限店铺推广渠道有哪些方式

网站建设费用折旧年限,店铺推广渠道有哪些方式,重庆营销型网站建设价格,仓库管理系统数据库设计主要实现的那种光晕效果&#xff1a;中间亮&#xff0c;四周逐渐变淡的。 这边有三种发光效果&#xff0c;先上效果图。 第一种、圆形发光体 实现代码&#xff1a;新建shape_light.xml&#xff0c;导入以下代码。使用时&#xff0c;直接给view设置为background。 <?xml …

主要实现的那种光晕效果:中间亮,四周逐渐变淡的。

这边有三种发光效果,先上效果图。

第一种、圆形发光体

实现代码:新建shape_light.xml,导入以下代码。使用时,直接给view设置为background。

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"android:shape="oval"><gradientandroid:centerColor="@color/transparent"android:centerX="0.5"android:centerY="0.5"android:gradientRadius="180dp"android:startColor="@color/yellow"android:type="radial" />
</shape>

第二种、矩形发光体

代码实现:通过自定义view实现。

package com.fht.testprojectimport android.annotation.SuppressLint
import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.graphics.RectF
import android.util.AttributeSet
import android.view.View/*** @author fenghaitao* @time 2023/11/1 16:40*/
class RectLightView @JvmOverloads constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int = 0
) : View(context, attributeSet, defStyleAttr) {private val paint: Paint = Paint()private val corner = 50fprivate val count = 200init {paint.isAntiAlias = falsepaint.style = Paint.Style.FILLpaint.color = Color.YELLOW}@SuppressLint("DrawAllocation")override fun onDraw(canvas: Canvas?) {super.onDraw(canvas)val w = width / countval h = height / countfor (i in 0..count) {paint.alpha = (255 / count) * iif (((width - 2 * (w * i)) > 0) && ((height - 2 * (h * i)) > 0)) {val rectF = RectF().apply {left = (w * i).toFloat()top = (h * i).toFloat()right = (width - w * i).toFloat()bottom = (height - h * i).toFloat()}canvas?.drawRoundRect(rectF, corner, corner, paint)}}}
}

第三种、矩形发光体,比上一种更透明

这种有点瑕疵,中间有一点空白,不过稍微修改一下代码也可以去掉,这里就不做修改了。

代码实现:通过自定义view实现。

package com.fht.testprojectimport android.annotation.SuppressLint
import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.graphics.RectF
import android.util.AttributeSet
import android.view.View/*** @author fenghaitao* @time 2023/11/1 16:40*/
class LightView @JvmOverloads constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int = 0
) : View(context, attributeSet, defStyleAttr) {private val paint: Paint = Paint()private val corner = 1fprivate val count = 100init {paint.isAntiAlias = falsepaint.style = Paint.Style.STROKEpaint.color = Color.YELLOW}@SuppressLint("DrawAllocation")override fun onDraw(canvas: Canvas?) {super.onDraw(canvas)val w = width / countval h = height / countpaint.strokeWidth = w.toFloat()for (i in 0..count) {paint.alpha = (255 / count) * iif (((width - 2 * (w * i)) > 0) && ((height - 2 * (w * i)) > 0)) {val rectF = RectF().apply {left = (w * i).toFloat()top = (w * i).toFloat()right = (width - w * i).toFloat()bottom = (height - w * i).toFloat()}canvas?.drawRect(rectF, paint)}}}
}

http://www.shuangfujiaoyu.com/news/35707.html

相关文章:

  • 哪个网站可以做英文兼职成都网站排名 生客seo
  • 做视频网站需要长沙关键词排名首页
  • 微网站开发商简阳seo排名优化课程
  • 农村自建房设计图纸深圳百度网站排名优化
  • wordpress多站点 主题今日热点
  • 有名的网站制作电话找个免费网站这么难吗
  • 怎么做网站8uftp杭州优化seo
  • 云主机网站源码广告投放平台
  • 网站建设 镇江seo关键词选择及优化
  • 武汉高端婚纱摄影搜狗seo软件
  • 移动端网站开发哪家好app用户量排名
  • 河南国基建设集团有限公司网站网络推广公司有哪些
  • 企业排名优化公司王通seo赚钱培训
  • 网站内页设计无锡百度公司王东
  • 专业建设网站技术百度识图查另一半情头
  • 做免费网站安全吗百度收录提交入口地址
  • 手机微网站怎么做的武汉seo服务
  • dw怎么做网站推广软文是什么
  • 做网站的工作叫什么广州品牌营销服务
  • 瑞安做网站公司扶贫832网络销售平台
  • 中国网站建设公司百强百度网址大全下载
  • 创建了网站龙南黄页全部电话
  • 免费网站商城建设站长工具域名查询社区
  • 黄岛网站建设公司哪家好郑州seo技术顾问
  • 宜兴做网站的公司百度云资源搜索引擎
  • 河南省两学一做网站关键词排名点击
  • 阆中网站建设免费网站建设seo
  • 成都专业做网站公司有哪些2345网址导航设为主页
  • 购物网站cms推广有奖励的app平台
  • 常德政府网站市民留言济南seo网站关键词排名