Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
99077b03
authored
7 years ago
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将mvp替换成mvvm
parent
6b938fb3
master
…
dev
dev_xx
dev_xx_241116
dev_xx_250108_toast
dev_xx_250224_report
dev_xx_web
test
v2.7.2
v2.7.1
v2.7.0
v2.6.9
v2.6.7
v2.6.6
v2.6.5
v2.6.4
v2.6.3
v2.6.2
v2.6.1
v2.6.0
v2.5.9
v2.5.7
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.0
v2.4.6
v2.4.5
v2.4.0
v_2.4.0
v2.3.2
v2.3.1
dev20230405
android_v1.6.0
android_v1.3.0
android_v1.2.0
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
40 additions
and
34 deletions
annotation_lib/build/libs/annotation_lib.jar
app/build.gradle
app/src/main/java/com/dayu/bigfish/MyApplication.java
app/src/main/java/com/dayu/bigfish/presenter/receivingorder/ReceivingPresenter.java
app/src/main/java/com/dayu/bigfish/ui/fragment/HomeOrderFragment.java
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderDatailsServeFragment.java
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderDateilsFragment.java
app/src/main/java/com/dayu/bigfish/ui/views/LRecyclerView.java
app/src/main/res/layout/fragment_commom_recycle.xml
app/src/main/res/layout/fragment_order_datails.xml
app/src/main/res/layout/fragment_order_home.xml
app/src/main/res/layout/lrecycle_layout.xml
annotation_lib/build/libs/annotation_lib.jar
View file @
99077b03
No preview for this file type
This diff is collapsed.
Click to expand it.
app/build.gradle
View file @
99077b03
...
...
@@ -53,13 +53,15 @@ android {
assets
.
srcDirs
=
[
'src/main/assets'
,
'src/main/assets/'
]
}
}
compileOptions
{
sourceCompatibility
1.8
targetCompatibility
1.8
}
dataBinding
{
enabled
=
true
}
lintOptions
{
checkReleaseBuilds
false
}
lintOptions
{
abortOnError
false
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/MyApplication.java
View file @
99077b03
...
...
@@ -69,7 +69,7 @@ public class MyApplication extends MultiDexApplication {
}
/**
*
使手机设置的字体大小无效
.
*
初始化友盟
.
*/
private
void
initUM
()
{
MobclickAgent
.
setDebugMode
(
Constants
.
UM_DEBUG
);
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/presenter/receivingorder/ReceivingPresenter.java
View file @
99077b03
...
...
@@ -80,7 +80,7 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
int
num
=
mTotalRows
-
1
;
mView
.
showToast
(
R
.
string
.
receive_order_success
);
EventBus
.
getDefault
().
post
(
new
SwtichFragment
(
1
));
mDisPosable
=
Observable
.
timer
(
20
00
,
TimeUnit
.
MILLISECONDS
).
subscribe
(
aLong
->
{
mDisPosable
=
Observable
.
timer
(
5
00
,
TimeUnit
.
MILLISECONDS
).
subscribe
(
aLong
->
{
EventBus
.
getDefault
().
post
(
new
RefreshReceivingNum
(
num
<
0
?
0
:
num
));
EventBus
.
getDefault
().
post
(
new
RefreshApoiment
(-
1
));
mDisPosable
.
dispose
();
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/ui/fragment/HomeOrderFragment.java
View file @
99077b03
...
...
@@ -83,7 +83,6 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
mBind
.
tbHome
.
setupWithViewPager
(
mBind
.
vpHome
);
mBind
.
tbHome
.
setTabMode
(
TabLayout
.
MODE_FIXED
);
mBind
.
vpHome
.
setOffscreenPageLimit
(
4
);
mBind
.
vpHome
.
setCurrentItem
(
0
);
mBind
.
tbHome
.
post
(()
->
TabLayoutUtils
.
setIndicator
(
mBind
.
tbHome
,
15
,
15
,
R
.
color
.
cl_order_item_line_bg
,
mActivity
));
mBind
.
tbHome
.
addOnTabSelectedListener
(
new
TabLayout
.
OnTabSelectedListener
()
{
...
...
@@ -145,6 +144,7 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
}
});
setTabNum
(
null
,
0
);
}
...
...
@@ -152,16 +152,16 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
* 将网络请求到的数据展示到tab上
*/
public
void
setTabNum
(
Tab
tab
,
int
myTabIndex
)
{
String
[]
tabNum
=
new
String
[]{
tab
.
getReservation
()
+
""
,
tab
.
getPendingservice
()
+
""
,
tab
.
getError
()
+
""
,
tab
.
getCanceled
()
+
""
};
if
(
isFirstAddTab
)
{
mBind
.
tbHome
.
removeAllTabs
();
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
tabNum
[
0
]
,
tabDesc
[
0
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
tabNum
[
1
]
,
tabDesc
[
1
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
tabNum
[
2
]
,
tabDesc
[
2
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
tabNum
[
3
]
,
tabDesc
[
3
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
"0"
,
tabDesc
[
0
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
"0"
,
tabDesc
[
1
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
"0"
,
tabDesc
[
2
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
"0"
,
tabDesc
[
3
])));
isFirstAddTab
=
false
;
}
else
{
String
[]
tabNum
=
new
String
[]{
tab
.
getReservation
()
+
""
,
tab
.
getPendingservice
()
+
""
,
tab
.
getError
()
+
""
,
tab
.
getCanceled
()
+
""
};
for
(
int
i
=
0
;
i
<
mBind
.
tbHome
.
getTabCount
();
i
++)
{
TextView
tv
=
(
TextView
)
mBind
.
tbHome
.
getTabAt
(
i
).
getCustomView
().
findViewById
(
R
.
id
.
tabtext
);
TextView
tvIcon
=
(
TextView
)
mBind
.
tbHome
.
getTabAt
(
i
).
getCustomView
().
findViewById
(
R
.
id
.
tabicon
);
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderDatailsServeFragment.java
View file @
99077b03
...
...
@@ -24,6 +24,9 @@ public class OrderDatailsServeFragment extends DataBindingFragment<FragmentOrder
@Override
public
void
initView
()
{
OrderDetail
details
=
(
OrderDetail
)
getArguments
().
getSerializable
(
Constants
.
ORDER_DETAIL
);
if
(
details
==
null
)
{
return
;
}
for
(
OrderDetail
.
RecordBean
item
:
details
.
getRecord
())
{
try
{
item
.
setCreateTime
(
UtilsDate
.
changeFormat
(
item
.
getCreateTime
(),
UtilsDate
.
FORMAT_ONE
,
UtilsDate
.
FORMAT_FOURTH
));
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/ui/fragment/OrderDateilsFragment.java
View file @
99077b03
...
...
@@ -45,6 +45,13 @@ public class OrderDateilsFragment extends DataBindingFragment<FragmentOrderDatai
}
else
{
mBind
.
tvLookMore
.
setVisibility
(
View
.
GONE
);
}
if
(
dataBean
.
getIsPay
()
==
null
||
dataBean
.
getIsPay
()
==
1
)
{
mBind
.
rlNoCharge
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
rlHaveCharge
.
setVisibility
(
View
.
GONE
);
}
else
{
mBind
.
rlNoCharge
.
setVisibility
(
View
.
GONE
);
mBind
.
rlHaveCharge
.
setVisibility
(
View
.
VISIBLE
);
}
if
(
dataBean
.
getAccessories
()
!=
null
&&
dataBean
.
getAccessories
().
size
()
!=
0
)
{
mAdapter
=
new
CoreAdapter
<
String
,
FragmentOrderDatailsBinding
>(
false
);
mBind
.
rlAccessories
.
setLayoutManager
(
new
LinearLayoutManager
(
mActivity
));
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/ui/views/LRecyclerView.java
View file @
99077b03
...
...
@@ -94,6 +94,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
needCoreAdapter
=
ta
.
getBoolean
(
R
.
styleable
.
LRecyclerView_needCoreAdapter
,
false
);
isRefreshable
=
ta
.
getBoolean
(
R
.
styleable
.
LRecyclerView_isRefreshable
,
true
);
ta
.
recycle
();
//初始化recycleview
View
layout
=
inflate
(
context
,
R
.
layout
.
lrecycle_layout
,
this
);
swipeRefresh
=
(
SwipeRefreshLayout
)
layout
.
findViewById
(
R
.
id
.
swiperefresh
);
...
...
@@ -101,6 +102,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
ll_emptyView
=
(
LinearLayout
)
layout
.
findViewById
(
R
.
id
.
ll_emptyview
);
ll_faileView
=
(
LinearLayout
)
layout
.
findViewById
(
R
.
id
.
ll_faileview
);
swipeRefresh
.
setColorSchemeResources
(
R
.
color
.
cl_receiving_order_item_data
);
mLayoutManager
=
new
LinearLayoutManager
(
context
);
mLayoutManager
.
setAutoMeasureEnabled
(
true
);
recyclerview
.
setLayoutManager
(
mLayoutManager
);
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/fragment_commom_recycle.xml
View file @
99077b03
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
...
...
@@ -11,8 +10,8 @@
<com.dayu.bigfish.ui.views.LRecyclerView
android:id=
"@+id/recyclerView"
setPresenter=
"@{presenter}"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
setPresenter=
"@{presenter}"
android:background=
"#f5f5f5"
/>
</layout>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/fragment_order_datails.xml
View file @
99077b03
...
...
@@ -510,8 +510,7 @@
android:id=
"@+id/rl_have_charge"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/line_three"
android:visibility=
"@{item.isPay ==1?View.GONE:View.VISIBLE}"
>
android:layout_below=
"@id/line_three"
>
<TextView
android:id=
"@+id/four_text_one"
...
...
@@ -669,8 +668,7 @@
android:id=
"@+id/rl_no_charge"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/line_three"
android:visibility=
"@{item.isPay ==1?View.VISIBLE:View.GONE}"
>
android:layout_below=
"@id/line_three"
>
<TextView
android:layout_width=
"wrap_content"
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/fragment_order_home.xml
View file @
99077b03
...
...
@@ -30,10 +30,6 @@
android:textSize=
"@dimen/dp_13.3"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
>
<android.support.design.widget.TabLayout
android:id=
"@+id/tb_home"
...
...
@@ -42,7 +38,6 @@
app:tabIndicatorColor=
"@color/cl_tab_line"
app:tabMaxWidth=
"0dp"
app:tabMode=
"fixed"
/>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
...
...
@@ -50,6 +45,6 @@
android:id=
"@+id/vp_home"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"
5
"
/>
android:layout_weight=
"
1
"
/>
</LinearLayout>
</layout>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/lrecycle_layout.xml
View file @
99077b03
...
...
@@ -14,9 +14,10 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:cacheColorHint=
"@null"
android:scrollbars=
"none"
/>
android:scrollbars=
"none"
/>
</android.support.v4.widget.SwipeRefreshLayout>
<LinearLayout
android:id=
"@+id/ll_emptyview"
android:layout_width=
"match_parent"
...
...
@@ -31,8 +32,7 @@
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:src=
"@mipmap/yu"
/>
android:src=
"@mipmap/yu"
/>
<TextView
android:id=
"@+id/tv_empty"
...
...
@@ -43,8 +43,7 @@
android:layout_marginTop=
"@dimen/dp_13"
android:text=
"暂无数据(点击刷新)"
android:textColor=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
android:textSize=
"@dimen/sp_13.3"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -52,8 +51,8 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:visibility=
"gone
"
android:orientation=
"vertical
"
>
android:orientation=
"vertical
"
android:visibility=
"gone
"
>
<ImageView
android:id=
"@+id/icon"
...
...
@@ -70,6 +69,7 @@
android:text=
"加载出错啦"
android:textColor=
"#c9c9c9"
android:textSize=
"17.3sp"
/>
<TextView
android:id=
"@+id/retry_btn"
android:layout_width=
"115dp"
...
...
@@ -84,4 +84,4 @@
android:textSize=
"15.4sp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment