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
8fbaeeaa
authored
Jan 08, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将mvp替换成mvvm
parent
8f21c002
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
5 deletions
annotation_lib/build/libs/annotation_lib.jar
app/src/main/java/com/dayu/bigfish/base/BaseView.java
app/src/main/java/com/dayu/bigfish/bean/sqlbean/OrderInfo.java
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderAdapter.java
app/src/main/res/layout/fragment_orderdoing_item.xml
annotation_lib/build/libs/annotation_lib.jar
View file @
8fbaeeaa
No preview for this file type
app/src/main/java/com/dayu/bigfish/base/BaseView.java
View file @
8fbaeeaa
...
@@ -26,4 +26,5 @@ public interface BaseView {
...
@@ -26,4 +26,5 @@ public interface BaseView {
void
startActivityForReult
(
Class
<?>
clz
,
int
requestCode
);
void
startActivityForReult
(
Class
<?>
clz
,
int
requestCode
);
void
startActivityAndFinish
(
Class
<?>
clz
,
Bundle
bundle
);
void
startActivityAndFinish
(
Class
<?>
clz
,
Bundle
bundle
);
}
}
app/src/main/java/com/dayu/bigfish/bean/sqlbean/OrderInfo.java
View file @
8fbaeeaa
package
com
.
dayu
.
bigfish
.
bean
.
sqlbean
;
package
com
.
dayu
.
bigfish
.
bean
.
sqlbean
;
import
android.databinding.BaseObservable
;
import
android.databinding.Bindable
;
import
com.dayu.bigfish.BR
;
import
org.greenrobot.greendao.annotation.Convert
;
import
org.greenrobot.greendao.annotation.Convert
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Entity
;
import
org.greenrobot.greendao.annotation.Generated
;
import
org.greenrobot.greendao.annotation.Generated
;
...
@@ -13,7 +18,7 @@ import java.util.List;
...
@@ -13,7 +18,7 @@ import java.util.List;
*/
*/
@Entity
@Entity
public
class
OrderInfo
{
public
class
OrderInfo
extends
BaseObservable
{
@Id
@Id
private
long
id
;
private
long
id
;
@Property
(
nameInDb
=
"engineerId"
)
@Property
(
nameInDb
=
"engineerId"
)
...
@@ -70,53 +75,73 @@ public class OrderInfo {
...
@@ -70,53 +75,73 @@ public class OrderInfo {
this
.
engineerId
=
engineerId
;
this
.
engineerId
=
engineerId
;
}
}
@Bindable
public
String
getServerRecord
()
{
public
String
getServerRecord
()
{
return
this
.
serverRecord
;
return
this
.
serverRecord
;
}
}
public
void
setServerRecord
(
String
serverRecord
)
{
public
void
setServerRecord
(
String
serverRecord
)
{
this
.
serverRecord
=
serverRecord
;
this
.
serverRecord
=
serverRecord
;
notifyPropertyChanged
(
BR
.
serverRecord
);
}
}
@Bindable
public
String
getDoorPrice
()
{
public
String
getDoorPrice
()
{
return
this
.
doorPrice
;
return
this
.
doorPrice
;
}
}
public
void
setDoorPrice
(
String
doorPrice
)
{
public
void
setDoorPrice
(
String
doorPrice
)
{
this
.
doorPrice
=
doorPrice
;
this
.
doorPrice
=
doorPrice
;
notifyPropertyChanged
(
BR
.
doorPrice
);
}
}
@Bindable
public
String
getServerPrice
()
{
public
String
getServerPrice
()
{
return
this
.
serverPrice
;
return
this
.
serverPrice
;
}
}
public
void
setServerPrice
(
String
serverPrice
)
{
public
void
setServerPrice
(
String
serverPrice
)
{
this
.
serverPrice
=
serverPrice
;
this
.
serverPrice
=
serverPrice
;
notifyPropertyChanged
(
BR
.
serverPrice
);
}
}
@Bindable
public
String
getMaterialCost
()
{
public
String
getMaterialCost
()
{
return
this
.
materialCost
;
return
this
.
materialCost
;
}
}
public
void
setMaterialCost
(
String
materialCost
)
{
public
void
setMaterialCost
(
String
materialCost
)
{
this
.
materialCost
=
materialCost
;
this
.
materialCost
=
materialCost
;
notifyPropertyChanged
(
BR
.
materialCost
);
}
}
@Bindable
public
String
getOtherPrice
()
{
public
String
getOtherPrice
()
{
return
this
.
otherPrice
;
return
this
.
otherPrice
;
}
}
public
void
setOtherPrice
(
String
otherPrice
)
{
public
void
setOtherPrice
(
String
otherPrice
)
{
this
.
otherPrice
=
otherPrice
;
this
.
otherPrice
=
otherPrice
;
notifyPropertyChanged
(
BR
.
otherPrice
);
}
}
@Bindable
public
String
getOtherInfo
()
{
public
String
getOtherInfo
()
{
return
this
.
otherInfo
;
return
this
.
otherInfo
;
}
}
public
void
setOtherInfo
(
String
otherInfo
)
{
public
void
setOtherInfo
(
String
otherInfo
)
{
this
.
otherInfo
=
otherInfo
;
this
.
otherInfo
=
otherInfo
;
notifyPropertyChanged
(
BR
.
otherInfo
);
}
}
@Bindable
public
List
<
String
>
getImgPath
()
{
public
List
<
String
>
getImgPath
()
{
return
this
.
imgPath
;
return
this
.
imgPath
;
}
}
public
void
setImgPath
(
List
<
String
>
imgPath
)
{
public
void
setImgPath
(
List
<
String
>
imgPath
)
{
this
.
imgPath
=
imgPath
;
this
.
imgPath
=
imgPath
;
notifyPropertyChanged
(
BR
.
imgPath
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderAdapter.java
View file @
8fbaeeaa
...
@@ -64,7 +64,6 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
...
@@ -64,7 +64,6 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
itemUpdataTime
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemUpdataTime
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
holder
.
tvItemProcess
.
setVisibility
(
View
.
VISIBLE
);
holder
.
tvItemProcess
.
setVisibility
(
View
.
VISIBLE
);
final
int
id
=
item
.
getId
();
final
int
id
=
item
.
getId
();
if
(
item
.
getAnyContacts
()
==
0
)
{
if
(
item
.
getAnyContacts
()
==
0
)
{
...
@@ -203,8 +202,6 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
...
@@ -203,8 +202,6 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
}
else
if
(
errorState
==
4
)
{
}
else
if
(
errorState
==
4
)
{
holder
.
tvErrorState
.
setText
(
mContext
.
getString
(
R
.
string
.
delivery_time_out
));
holder
.
tvErrorState
.
setText
(
mContext
.
getString
(
R
.
string
.
delivery_time_out
));
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
holder
.
tvErrorState
.
setVisibility
(
View
.
GONE
);
}
}
holder
.
tvItemProcess
.
setOnClickListener
(
holder
.
tvItemProcess
.
setOnClickListener
(
...
...
app/src/main/res/layout/fragment_orderdoing_item.xml
View file @
8fbaeeaa
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
android:layout_marginTop=
"@dimen/dp_16.7"
android:layout_marginTop=
"@dimen/dp_16.7"
android:textColor=
"@color/cl_tab_read"
android:textColor=
"@color/cl_tab_read"
android:textSize=
"@dimen/size_login_hint_text"
android:textSize=
"@dimen/size_login_hint_text"
android:visibility=
"
visibl
e"
/>
android:visibility=
"
gon
e"
/>
</LinearLayout>
</LinearLayout>
...
...
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