Skip to content
项目
Groups
代码片段
帮助
正在加载...
Sign in / Register
Toggle navigation
W
workoffice
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图表
统计图
Create a new issue
作业
提交
议题看板
Open sidebar
冷广德
workoffice
Commits
057096f2
提交
057096f2
authored
6月 18, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.去除无用引用
上级
2031ed19
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
0 行增加
和
112 行删除
+0
-112
AddCrucibleCarAdapter.java
...a/com/wd/workoffice/ui/adapter/AddCrucibleCarAdapter.java
+0
-1
JobTypeAdapter.java
...ain/java/com/wd/workoffice/ui/adapter/JobTypeAdapter.java
+0
-14
WorkSendApplyAddAdapter.java
...com/wd/workoffice/ui/adapter/WorkSendApplyAddAdapter.java
+0
-2
AddAndReduceDoubleView.java
...java/com/wd/workoffice/widget/AddAndReduceDoubleView.java
+0
-95
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/adapter/AddCrucibleCarAdapter.java
浏览文件 @
057096f2
...
...
@@ -14,7 +14,6 @@ import com.wd.workoffice.bean.ProductBean;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/JobTypeAdapter.java
浏览文件 @
057096f2
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.widget.EditText
;
import
com.alibaba.fastjson.JSON
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.bean.mesBean.JobTypeBean
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
org.greenrobot.eventbus.EventBus
;
import
java.util.List
;
import
flexible.xd.android_base.utils.ToastUtil
;
/**
* Created by flexible on 2018/8/13.
*/
...
...
app/src/main/java/com/wd/workoffice/ui/adapter/WorkSendApplyAddAdapter.java
浏览文件 @
057096f2
...
...
@@ -12,8 +12,6 @@ import com.wd.workoffice.bean.LogisticDetailBean;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.SendWeightEvent
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
com.wd.workoffice.widget.AddAndReduceView
;
import
org.greenrobot.eventbus.EventBus
;
...
...
app/src/main/java/com/wd/workoffice/widget/AddAndReduceDoubleView.java
deleted
100644 → 0
浏览文件 @
2031ed19
package
com
.
wd
.
workoffice
.
widget
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
com.wd.workoffice.R
;
import
flexible.xd.android_base.utils.ToastUtil
;
public
class
AddAndReduceDoubleView
extends
LinearLayout
implements
View
.
OnClickListener
{
private
final
Button
add
;
private
final
Button
remove
;
private
final
TextView
tvNum
;
private
double
num
=
0
;
private
double
maxNum
=
10000
;
public
AddAndReduceDoubleView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
view_add_remove
,
this
);
add
=
findViewById
(
R
.
id
.
btn_add
);
remove
=
findViewById
(
R
.
id
.
btn_reduce
);
tvNum
=
findViewById
(
R
.
id
.
tv_num
);
tvNum
.
setText
(
"0"
);
add
.
setOnClickListener
(
this
);
remove
.
setOnClickListener
(
this
);
}
public
void
setNumber
(
double
number
)
{
num
=
number
;
tvNum
.
setText
(
number
+
""
);
}
public
double
getNumber
()
{
return
num
;
}
@Override
public
void
onClick
(
View
v
)
{
String
s
=
tvNum
.
getText
().
toString
();
num
=
Double
.
parseDouble
(
s
);
switch
(
v
.
getId
())
{
case
R
.
id
.
btn_add
:
if
(
maxNum
-
num
<
1
)
{
num
=
maxNum
;
tvNum
.
setText
(
num
+
""
);
if
(
mOnNumberChangedListener
!=
null
)
mOnNumberChangedListener
.
OnNumberChanged
(
String
.
valueOf
(
num
));
ToastUtil
.
showShort
(
"目前已选择最大数量"
);
return
;
}
num
++;
tvNum
.
setText
(
num
+
""
);
if
(
mOnNumberChangedListener
!=
null
)
mOnNumberChangedListener
.
OnNumberChanged
(
String
.
valueOf
(
num
));
break
;
case
R
.
id
.
btn_reduce
:
if
(
num
<
1
)
{
Toast
.
makeText
(
getContext
(),
"不能小于0"
,
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
num
--;
tvNum
.
setText
(
num
+
""
);
if
(
mOnNumberChangedListener
!=
null
)
mOnNumberChangedListener
.
OnNumberChanged
(
String
.
valueOf
(
num
));
}
break
;
}
}
public
double
getMaxNum
()
{
return
maxNum
;
}
public
void
setMaxNum
(
double
maxNum
)
{
this
.
maxNum
=
maxNum
;
}
public
interface
OnNumberChangedListener
{
void
OnNumberChanged
(
String
vs
);
}
private
OnNumberChangedListener
mOnNumberChangedListener
;
public
void
setOnNumberChangedListener
(
OnNumberChangedListener
onNumberChangedListener
)
{
mOnNumberChangedListener
=
onNumberChangedListener
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论