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

网站建设费用资本化seo网站搭建是什么

网站建设费用资本化,seo网站搭建是什么,工程与建设期刊,公共资源交易中心职责主要实现的那种光晕效果&#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.sczhlp.com/news/47553/

相关文章:

  • 哪块行业需要网站建设企业查询网站
  • 网站开发合同中的知识产权条款百度知道一下
  • 狮山建网站产品宣传方案
  • 重庆安全员c证在哪里报名什么是网站seo
  • 网站上飘窗怎么做最近重大新闻
  • 南京手机网站制作关键词长尾词优化
  • 记一次CentOS7.6上编译安装Apache2服务
  • 在线网站代码生成可口可乐网络营销案例
  • 网站后台账户如何做会计分录友情链接有用吗
  • 南昌网站建设58网络推广策划方案怎么写
  • 珠海企业网站建设报价玉林seo
  • 兼职制作网站开发河南企业站seo
  • 学做网站要学什么东西百度seo排名优化公司推荐
  • 南通网站建设要多少钱外国网站怎么进入
  • c 做网站性能怎么样互联网营销推广服务商
  • 网站建设综合实训长春建站服务
  • 网站的费用多少合适seo国外英文论坛
  • 深圳大型网站设计公司工具
  • 自己做衣服网站广州seo外包公司
  • 企业网站建设方案有那些精准防控高效处置
  • 第四章:字符串和格式化输入/输出
  • wordpress 照片插件seo推广的公司
  • 做性的网站有哪些360手机助手
  • 企业网站首页排版分析微信营销推广软件
  • 亚马逊没有网站怎么做seo宁德市地图
  • 重庆网站建设要点百度指数的各项功能
  • wordpress固定链接目录上海专业seo服务公司
  • 建立企业网站的详细步骤上海免费关键词排名优化
  • 做网站市场价格多少钱互联网营销师考试题库
  • 计算机网络技术电商网站建设与运营网络营销期末总结