Git Product home page Git Product logo

Comments (4)

whataa avatar whataa commented on June 9, 2024

你好,设置一条线的颜色的方法就是setDefaultOneLineColor(colors),若传入多个颜色,那么线的颜色是一个从上向下的线性渐变色,因为考虑到可以为一条线指定多个颜色,所以xml没有提供入口。

另外谢谢指出BUG,现已修复。

from suitlines.

qingchen1016 avatar qingchen1016 commented on June 9, 2024

还有个问题请教一下,
我用的是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.

whataa avatar whataa commented on June 9, 2024
  1. 理论上两种方式都可以,而且官方很早以前就推荐用res-auto方式了,所以对于你的问题我没法解释...;

  2. 最近修复的两个BUG都暂未更新到bintray上,如果你急用可以直接使用源码,稍后我会同步上去并贴出更新日志,到时再使用compile方式依赖;

from suitlines.

qingchen1016 avatar qingchen1016 commented on June 9, 2024

你好,还是关于颜色的问题。
我记得在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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.