技术标签: 自己 GradientDrawable的坑
GradientDrawable的坑
fun View.setDrawableTintGradient(colors: IntArray) {
val drawable = GradientDrawable()
drawable.gradientType = GradientDrawable.RECTANGLE
drawable.colors = colors
drawable.cornerRadius = 10f
drawable.orientation = GradientDrawable.Orientation.LEFT_RIGHT
this.background = drawable
}
这样设置View的背景会导致有圆角外有黑背景因为设置colors顺序的问题
fun View.setDrawableTintGradient(colors: IntArray) {
val drawable = GradientDrawable()
drawable.gradientType = GradientDrawable.RECTANGLE
drawable.cornerRadius = 10f
drawable.orientation = GradientDrawable.Orientation.LEFT_RIGHT
drawable.colors = colors
this.background = drawable
}
应该将颜色设置放在下面
北京科技大学是一所211大学,计算机学科评估B+,软件工程学科评估没有,在211大学中排名中上游左右。北京科技大学的计算机考研招生主要在计算机与通信工程学院,其它的学院招生人数很少。数理...
顶刊TPAMI: IEEE Transactions on Pattern Analysis and Machine Intelligence;TNNL: IEEE Trans. Neural Netw.Learn. Syst;IEEE Trans. Cybern顶会CVPRICCV: EEE Int. Conf. Comput. Vis.AAAIIJCAI: Inter...
在excel的打印中,由于内容太多了,导致太宽了,打印不全,这时候我们该怎么办呢,下面让学习啦小编为你带来excel 宽页面打印页面设置的方法。excel 宽页面打印页面设置步骤:1)使用页面设置—页面—页边距,将页边距放宽,以适应稍微比一页A4纸大一些的EXCEL的表格2)选定整个表格,缩小所有选用的字体,从而小心整个表格,看看能否缩小到一页的A4纸上(同时可以调节页边距)3)使用页面设置—页面...
分享一款实用的绘图软件,GraphPad Prism。汇集生物统计、化学统计、以及科技绘图于一身,有超过110个国家的超过20万名科学家用这个软件来分析、绘制和展示他们的科学数据。不需要学习复杂的编程,无需代码,用起来像EXCEL一样点点点就生成了精致的结果图,界面友好,不用挠头。笔者第一次使用是在大四本科毕业论文写作期间,当时对数据作图很发愁,所以接触了这款软件,半天时间就能从零学会基础操作。接下来,进行简答的介绍,软件的下载方式见文末。绘制图像打开软件后,根据左侧的提示选择合适的模板,
C语言强弱符号规则C语言中,函数和初始化的全局变量(包括显式初始化为0的)都是强符号,未初始化的全局变量是弱符号同名的强符号只能有一个,如果定义多个强符号则编译器会报错int a = 1;char a = 2;允许有一个强符号和多个弱符号,编译器不报错int a = 2;int a;char a ;当有多个弱符号,而无强符号的时候,编译器会自动选择占用内...
from pymongo import MongoClientclass Save(object): def __init__(self, host): self.client = MongoClient(host=host, port=27017) # 使用的mongo的数据表 self.db = self.c...
标签:urlController.pyimport bsControllerfrom urllib import requestclass SpiderMain(object):def __init__(self):self.header = {‘User-Agent‘: ‘Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, lik...
效果图:做法:xml: android:id="@+id/plan_open_html" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@+id/mail_open_body
using System;using System.Collections.Generic;using System.Text;using System.Text.RegularExpressions;namespace PYCode{ public class AutoPYCode { private static string[] lc_FirstLe
这台计算机上缺少此项目引用的 NuGet 程序包
var view = grid.getView();view.getRow(index).style.backgroundColor = "red"; //选中行背景色view.getCell(rowIndex,colIndex).style.backgroundColor = "red"; //选中单元格背景色
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <script src='https://cdn.bootcdn.net.