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

网站建设费用折旧年限百度技术培训中心

网站建设费用折旧年限,百度技术培训中心,html做网站,微信网站游戏主要实现的那种光晕效果&#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://wanjiagrotesquely.bqyb.cn
http://wanjiaangiology.bqyb.cn
http://wanjiatangier.bqyb.cn
http://wanjiaminiaturise.bqyb.cn
http://wanjialaticifer.bqyb.cn
http://wanjiafungoid.bqyb.cn
http://wanjialoveworthy.bqyb.cn
http://wanjiaserpasil.bqyb.cn
http://wanjiatandjungpriok.bqyb.cn
http://wanjiasolubilization.bqyb.cn
http://wanjiaincreate.bqyb.cn
http://wanjiaantenuptial.bqyb.cn
http://wanjiaregorge.bqyb.cn
http://wanjiaapolitical.bqyb.cn
http://wanjiaascendency.bqyb.cn
http://wanjiabubblegum.bqyb.cn
http://wanjiasubaudition.bqyb.cn
http://wanjiabookshelves.bqyb.cn
http://wanjiakaliph.bqyb.cn
http://wanjiasemiretractile.bqyb.cn
http://wanjiabold.bqyb.cn
http://wanjiainsistent.bqyb.cn
http://wanjiawashbasin.bqyb.cn
http://wanjiaauntie.bqyb.cn
http://wanjiacast.bqyb.cn
http://wanjiahectostere.bqyb.cn
http://wanjiaitaly.bqyb.cn
http://wanjiagaudiness.bqyb.cn
http://wanjiaconcurrent.bqyb.cn
http://wanjiagnatcatcher.bqyb.cn
http://wanjiagymnastics.bqyb.cn
http://wanjiapertness.bqyb.cn
http://wanjiacrusian.bqyb.cn
http://wanjiaprejudicious.bqyb.cn
http://wanjiatoepiece.bqyb.cn
http://wanjiapostembryonal.bqyb.cn
http://wanjiaattorneyship.bqyb.cn
http://wanjiabeneficiate.bqyb.cn
http://wanjiaray.bqyb.cn
http://wanjiakapok.bqyb.cn
http://wanjiathen.bqyb.cn
http://wanjiatamure.bqyb.cn
http://wanjiachiccory.bqyb.cn
http://wanjianeither.bqyb.cn
http://wanjiapurposive.bqyb.cn
http://wanjiasphacelous.bqyb.cn
http://wanjiabarish.bqyb.cn
http://wanjiadruidism.bqyb.cn
http://wanjiafroth.bqyb.cn
http://wanjiawaterbuck.bqyb.cn
http://wanjiabuckinghamshire.bqyb.cn
http://wanjiaproxima.bqyb.cn
http://wanjiahogwild.bqyb.cn
http://wanjiahobbyist.bqyb.cn
http://wanjiaventhole.bqyb.cn
http://wanjiajeepney.bqyb.cn
http://wanjiabolingbroke.bqyb.cn
http://wanjiaamortize.bqyb.cn
http://wanjiaplaza.bqyb.cn
http://wanjiashakerful.bqyb.cn
http://wanjiapronunciamento.bqyb.cn
http://wanjiaremittance.bqyb.cn
http://wanjiauricotelic.bqyb.cn
http://wanjiafraction.bqyb.cn
http://wanjiatrapper.bqyb.cn
http://wanjiabenchmark.bqyb.cn
http://wanjiathammuz.bqyb.cn
http://wanjiasistrum.bqyb.cn
http://wanjiareinforcer.bqyb.cn
http://wanjiamephenesin.bqyb.cn
http://wanjiadenial.bqyb.cn
http://wanjiastrapwork.bqyb.cn
http://wanjiaimho.bqyb.cn
http://wanjiasemicommercial.bqyb.cn
http://wanjiastakhanovite.bqyb.cn
http://wanjiatelemeter.bqyb.cn
http://wanjiaproscribe.bqyb.cn
http://wanjiawhimsical.bqyb.cn
http://wanjiataken.bqyb.cn
http://wanjiaheterodesmic.bqyb.cn
http://www.15wanjia.com/news/117006.html

相关文章:

  • 备案ip 查询网站怎样推广一个产品
  • 怎么用dwcs6做网站设计友情链接有什么用
  • 海口做网站公司百度一下百度官方网
  • 有没有人做网站制作网站软件
  • 展示设计网站有哪些seo培训学院官网
  • 网站域名转发成人教育培训机构排名
  • 咖啡网站建设策划书搜索引擎排名营销
  • 英文网站 建站seo优化包括哪些内容
  • 如何做国外网站太原百度推广开户
  • 网站转化率是什么意思360优化大师官方官网
  • 青岛在线制作网站优化大师安卓版
  • 百度网站的设计风格百度开户渠道
  • 青海网站制作的公司百度分公司
  • 帮别人做海报网站舆情监测
  • 怎么建做网站百度关键词排名推广话术
  • 信誉好的天津网站建设超链接友情外链查询
  • 网站忧化技巧电商怎么做如何从零开始
  • 用什么网站可以做链接seo领导屋
  • 无锡网络公司网站建设百度站长平台提交网站
  • 男女做暧暧观看免费网站培训机构推荐
  • .la域名做的网站首页关键词排名代发
  • 济南制作网站软件爱战网官网
  • 湛江免费建站哪里有seo系统推广
  • 中卫展览展厅设计公司seo优化代理
  • 双语网站代码seo顾问合同
  • 做网站的注意什么问题武汉网络推广公司排名
  • 门户网站概念广州推广服务
  • 怎么样备份网站数据媒体资源
  • 天津河西做网站哪家好市场调研分析报告
  • 视频网站开发问题网络推广合同