Android开源:TimeLineView - 一款仿外卖订单进度的开源控件

EarVanatta 7年前
   <h2>TimeLineView</h2>    <p>一款仿外卖订单状态的开源控件,支持自定义文字,颜色,字体大小等功能</p>    <h2>显示效果</h2>    <p style="text-align:center"><img src="https://simg.open-open.com/show/45301ab981f4cbbdbe4c32ccf44f8d79.png"> <img src="https://simg.open-open.com/show/8e467ea773e94890b6cff6269da2dc89.gif"></p>    <h2>USAGE</h2>    <h3>Gradle</h3>    <pre>  compile 'com.wrbug:timelineview:1.0.0'</pre>    <h3>Maven</h3>    <pre>  <dependency>    <groupId>com.wrbug</groupId>    <artifactId>timelineview</artifactId>    <version>1.0.0</version>    <type>pom</type>  </dependency></pre>    <h3>布局中添加</h3>    <pre>  <com.wrbug.opensources.TimeLineView          android:id="@+id/timeLineView3"          android:layout_width="match_parent"          android:layout_height="50dp"          android:layout_margin="20dp"          app:preCircleColor="#0044ff"          app:preLineColor="#333333"          app:startedCircleColor="#880000"          app:startedLineColor="#ff0000"          app:textSize="12sp"/></pre>    <h3>Activity添加</h3>    <pre>  TimeLineView mView=(TimeLineView) findViewById(R.id.timeLineView3);  List<String> data = new ArrayList<>();  data.add("等候支付");  data.add("等候商家接单");  data.add("等候配送");  data.add("等候送达");  mView.setPointStrings(data, 2);</pre>    <h3>添加更多设置</h3>    <pre>  TimeLineView mView=(TimeLineView) findViewById(R.id.timeLineView3);  mView.builder()      .pointStrings(txts, 1)      .startedCircleColor(Color.BLUE)      .underwayCircleColor(Color.BLUE)      .preCircleColor(Color.GRAY)      .startedLineColor(Color.BLUE)      .preLineColor(Color.GRAY)      .startedStringColor(Color.BLUE)      .underwayStringColor(Color.BLUE)      .preStringColor(Color.GRAY)      .load();   //开始绘制</pre>    <h2>方法/字段说明</h2>    <table>     <thead>      <tr>       <th>方法/字段</th>       <th>类型</th>       <th>说明</th>      </tr>     </thead>     <tbody>      <tr>       <td>pointStrings</td>       <td>List/String[]</td>       <td>状态文本</td>      </tr>      <tr>       <td>textSize</td>       <td>float</td>       <td>文本大小</td>      </tr>      <tr>       <td>preLineColor</td>       <td>int</td>       <td>未开始状态线条颜色</td>      </tr>      <tr>       <td>startedLineColor</td>       <td>int</td>       <td>已进行状态线条颜色</td>      </tr>      <tr>       <td>preCircleColor</td>       <td>int</td>       <td>未开始状态圆颜色</td>      </tr>      <tr>       <td>underwayCircleColor</td>       <td>int</td>       <td>进行中状态圆颜色</td>      </tr>      <tr>       <td>startedCircleColor</td>       <td>int</td>       <td>已进行状态圆颜色</td>      </tr>      <tr>       <td>preStringColor</td>       <td>int</td>       <td>未开始状态文本颜色</td>      </tr>      <tr>       <td>underwayStringColor</td>       <td>int</td>       <td>进行中状态文本颜色</td>      </tr>      <tr>       <td>startedStringColor</td>       <td>int</td>       <td>已进行状态文本颜色</td>      </tr>      <tr>       <td>radius</td>       <td>int</td>       <td>圆半径</td>      </tr>      <tr>       <td>lineWidth</td>       <td>float</td>       <td>线条宽度</td>      </tr>     </tbody>    </table>    <h2>License</h2>    <pre>  Copyright 2017, Yalantis    Licensed under the Apache License, Version 2.0 (the "License");  you may not use this file except in compliance with the License.  You may obtain a copy of the License at       http://www.apache.org/licenses/LICENSE-2.0    Unless required by applicable law or agreed to in writing, software  distributed under the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and  limitations under the License.</pre>    <p> </p>    <p> </p>    <p> </p>