Comments (4)
你好,设置一条线的颜色的方法就是setDefaultOneLineColor(colors),若传入多个颜色,那么线的颜色是一个从上向下的线性渐变色,因为考虑到可以为一条线指定多个颜色,所以xml没有提供入口。
另外谢谢指出BUG,现已修复。
from suitlines.
还有个问题请教一下,
我用的是build.gradle集成的方式,xml中也是按demo中
<tech.linjiang.suitlines.SuitLines
xmlns:line="http://schemas.android.com/apk/res-auto"
的方式写的,编译的时候没问题,运行的时候报错:
Error:(31) No resource identifier found for attribute 'Style' in package 'com.qingchen.equipmentmanage'
后来我在网上找到一种解决办法是吧布局改为:
<tech.linjiang.suitlines.SuitLines
xmlns:line="http://schemas.android.com/apk/lib/tech.linjiang.suitlines"
这样就可以运行了,请问这是合理的解决办法吗?为什么我用过的别的自定义控件
不需要改动这块命名空间呢?
感谢
(另外,上面你修复的那个bug我在build.gradle中的引入需要改动吗)
from suitlines.
-
理论上两种方式都可以,而且官方很早以前就推荐用res-auto方式了,所以对于你的问题我没法解释...;
-
最近修复的两个BUG都暂未更新到bintray上,如果你急用可以直接使用源码,稍后我会同步上去并贴出更新日志,到时再使用compile方式依赖;
from suitlines.
你好,还是关于颜色的问题。
我记得在1.0.0版本的时候,如果不设置颜色,默认是由红到黄的渐变填充
我昨天升级了1.1.0版本,运行demo的时候也默认是红黄渐变 貌似是红黄白渐变
但是到了我项目里的时候 ,不设置颜色默认就成了全红色的填充
看了看源码里的属性 int[] defaultLineColor = {Color.RED, Color.YELLOW, Color.WHITE}; 分明是三种颜色。。
然后我又在自己的代码里设置了颜色:
`
private int[] lineColor = {Color.RED, Color.YELLOW, Color.WHITE};
private void setData(View rootView) {
List<Unit> lines = (List<Unit>) getArguments().getSerializable(LINES);
suitlines = (SuitLines) rootView.findViewById(R.id.suitlines);
suitlines.feedWithAnim(lines);//出现并动画
suitlines.setLineForm(true);//填充
suitlines.setDefaultOneLineColor(lineColor);//设置颜色
}
`
然后。。。还是红色的填充
我在想是不是由于数据还没加载完之前他会默认设置红色](url),然后直到加载完成也不会变颜色了。。
请问下这种情况怎么处理
感谢
from suitlines.
Related Issues (20)
- 为何没有Y轴自定义区间的方法? HOT 1
- 可以显示在一个屏幕吗?不用拖动才能看到的~ 谢谢~ HOT 1
- 为什么直接设置4条线就会报空指针~ HOT 1
- 不能自动加载多条线段?
- 很棒的view 真是小而美 . x轴坐标文字能否倾斜呢 HOT 1
- 体温
- 绘制多条曲线时 加入第一个曲线有10个点 第二个曲线有12个点 会造成指针下标越界异常 HOT 1
- 你好,请问可以增大点的大小吗? HOT 2
- 有两个问题
- 请问,偶尔会出现横坐标绘制不出来的情况,怎么解决啊?
- 偶尔会出现的闪退请款,是什么原因...求大神看看!! HOT 2
- 在recyclerview中被回收后就出不来了 HOT 1
- Y为负数的时候不会显示 HOT 2
- 在fragment中画多条线会出现控制针,排除生命周期问题,在onresume方法里使用也是空指针 HOT 1
- Implementation in viewPager HOT 1
- x轴第一条数据和第二条数据会贴合,中间的数据正常。y轴没法加单位,比如℃符号。 HOT 1
- 提示信息怎么一直停留在哪里?
- charline更新数据后怎么能清空上次记录后重新绘制
- 显示精度问题 百条数据以上 曲线图会变成阶梯状
- 只有两条数据时,X轴沾满了整个屏幕
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suitlines.