From d9928564c51748cf8db3b3b228cc342c584f296a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=94=E7=A2=97=E9=A5=AD=EA=A7=94?= Date: Thu, 4 Jun 2020 23:18:10 +0800 Subject: [PATCH] Create ProfitLossView.md --- readmes/ProfitLossView.md | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 readmes/ProfitLossView.md diff --git a/readmes/ProfitLossView.md b/readmes/ProfitLossView.md new file mode 100644 index 0000000..5ecb94e --- /dev/null +++ b/readmes/ProfitLossView.md @@ -0,0 +1,50 @@ +## ProfitLossView + +## 效果预览 + +| [ProfitLossView] | +| ------------------------------- | +| | + + +## 主要文件 +| 名字 | 摘要 | +| ---------------- | -------------- | +| [ProfitLossView] | 盈亏额/盈亏率 | + + +### 1. 基本用法 + +#### 1.1 布局中添加 +```android + +``` + +#### 1.2 设置数据 +```android; + profitLossView.setUnitInterceptor(new ProfitLossInterceptor()) + .setData(data.getAmount(), data.getDate()); +``` + + +### 2. 配置属性([Attributes]) + +#### ProfitLossView +|name|format|description| +|:---:|:---:|:---:| +| plv_line_color | color | 线颜色 | +| plv_text_color | color | 文本颜色 | +| plv_value_line_color | color | 值曲线的颜色 | +| plv_slide_text_color | color | 滑动区域文字颜色 | +| plv_slide_bg_color | dimension | 滑动区域背景颜色 | + + +[ProfitLossView]:https://github.com/yangsanning/StockView/blob/master/stock/src/main/java/ysn/com/stock/view/ProfitLossView.java +[Attributes]:https://github.com/yangsanning/StockView/blob/master/stock/src/main/res/values/attrs_profit_loss.xml +