Commit d45ad6c3d6721a19f63cbd65a4f40a7949b4291a
Exists in
yxb_dev
and in
2 other branches
Merge branch 'wwx' into yxb_dev
# Conflicts: # app/libs/processor.jar # app/src/main/java/com/shunzhi/parent/AppConfig.java # app/src/main/java/com/shunzhi/parent/api/ApplyReplaceCardApi.java # app/src/main/java/com/shunzhi/parent/model/apply/ApplyReplaceCardModel.java # app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplyReplaceCardFragment.java
Showing
31 changed files
with
393 additions
and
142 deletions
Show diff stats
app/src/main/AndroidManifest.xml
... | ... | @@ -208,6 +208,14 @@ |
208 | 208 | android:launchMode="singleInstance" |
209 | 209 | android:windowSoftInputMode="adjustPan|stateAlwaysHidden"/> |
210 | 210 | |
211 | + <activity | |
212 | + android:name=".ui.activity.apply.ApplyReplaceCardActivity" | |
213 | + android:launchMode="singleInstance" /> | |
214 | + | |
215 | + <activity | |
216 | + android:name=".ui.activity.apply.ApplySigninActivity" | |
217 | + android:launchMode="singleInstance" /> | |
218 | + | |
211 | 219 | <service |
212 | 220 | android:name=".ui.service.BadgeIntentService" |
213 | 221 | android:exported="false"></service> | ... | ... |
app/src/main/java/com/shunzhi/parent/adapter/AttendanceAdapter.java
... | ... | @@ -3,10 +3,15 @@ package com.shunzhi.parent.adapter; |
3 | 3 | import android.content.Context; |
4 | 4 | import android.content.Intent; |
5 | 5 | import android.support.v4.app.FragmentActivity; |
6 | +import android.text.TextUtils; | |
7 | +import android.util.Log; | |
6 | 8 | import android.view.LayoutInflater; |
7 | 9 | import android.view.View; |
8 | 10 | import android.view.ViewGroup; |
11 | +import android.widget.ImageView; | |
12 | +import android.widget.TextView; | |
9 | 13 | |
14 | +import com.bumptech.glide.Glide; | |
10 | 15 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; |
11 | 16 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
12 | 17 | import com.shunzhi.parent.R; |
... | ... | @@ -21,8 +26,6 @@ import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; |
21 | 26 | */ |
22 | 27 | |
23 | 28 | public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { |
24 | - | |
25 | - | |
26 | 29 | private Context mContext = null; |
27 | 30 | |
28 | 31 | public AttendanceAdapter(Context context) { |
... | ... | @@ -36,18 +39,33 @@ public class AttendanceAdapter extends BaseRecyclerViewAdapter<AttendanceBean> { |
36 | 39 | } |
37 | 40 | |
38 | 41 | public class AttendanceViewHolder extends BaseRecyclerViewHolder<AttendanceBean> { |
42 | + TextView tv_parent_name,tv_attendance; | |
43 | + ImageView iv_photo; | |
44 | + | |
39 | 45 | public AttendanceViewHolder(View itemView) { |
40 | 46 | super(itemView); |
47 | + | |
48 | + tv_parent_name = itemView.findViewById(R.id.tv_parent_name); | |
49 | + tv_attendance = itemView.findViewById(R.id.tv_attendance); | |
50 | + iv_photo = itemView.findViewById(R.id.iv_photo); | |
41 | 51 | } |
42 | 52 | |
43 | 53 | @Override |
44 | 54 | public void onBindViewHolder(AttendanceBean object, int position) { |
55 | + Log.i("AttendanceAdapter:",object.getSituation()); | |
56 | + tv_attendance.setText(object.getSituation()); | |
57 | + if (TextUtils.isEmpty(object.getHead_image())){ | |
58 | + iv_photo.setImageResource(R.drawable.photo); | |
59 | + }else { | |
60 | + Glide.with(mContext).load(object.getHead_image()).asBitmap().centerCrop().into(iv_photo); | |
61 | + } | |
62 | + | |
45 | 63 | itemView.setOnClickListener(new View.OnClickListener() { |
46 | 64 | @Override |
47 | 65 | public void onClick(View view) { |
48 | - // mContext.startActivity(new Intent().setClass(mContext, ApplySigninActivity.class)); | |
49 | 66 | } |
50 | 67 | }); |
51 | 68 | } |
52 | 69 | } |
70 | + | |
53 | 71 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/adapter/ReportAdapter.java
... | ... | @@ -13,6 +13,7 @@ import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; |
13 | 13 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
14 | 14 | import com.shunzhi.parent.R; |
15 | 15 | import com.shunzhi.parent.bean.ReportBean; |
16 | +import com.shunzhi.parent.ui.activity.apply.ApplyReplaceCardActivity; | |
16 | 17 | import com.shunzhi.parent.ui.activity.report.ReportDetialActivity; |
17 | 18 | import com.shunzhi.parent.views.CustomLinearLayoutManager; |
18 | 19 | ... | ... |
app/src/main/java/com/shunzhi/parent/api/ApplySigninApi.java
0 → 100644
... | ... | @@ -0,0 +1,16 @@ |
1 | +package com.shunzhi.parent.api; | |
2 | + | |
3 | +import com.google.gson.JsonObject; | |
4 | + | |
5 | +import io.reactivex.Observable; | |
6 | +import retrofit2.http.GET; | |
7 | +import retrofit2.http.Query; | |
8 | + | |
9 | +/** | |
10 | + * Created by Administrator on 2018/4/19 0019. | |
11 | + */ | |
12 | + | |
13 | +public interface ApplySigninApi { | |
14 | + @GET("/api/ParentService/GetAttendanceList") | |
15 | + Observable<JsonObject> getApplySignin(@Query("studentid") int studentId, @Query("schoolid") int schoolId,@Query("starttime") String date); | |
16 | +} | ... | ... |
app/src/main/java/com/shunzhi/parent/bean/apply/AttendanceBean.java
... | ... | @@ -5,18 +5,130 @@ package com.shunzhi.parent.bean.apply; |
5 | 5 | */ |
6 | 6 | |
7 | 7 | public class AttendanceBean { |
8 | - String studentId; | |
9 | - String imgUrl; | |
10 | - String kaoQinNum; | |
11 | - String kaoQinDate; | |
8 | + String user_id; | |
9 | + int school_id; | |
10 | + int customerId; | |
11 | + int usertype; | |
12 | + String card_num; | |
13 | + int card_type; | |
14 | + int outof; | |
15 | + String intime; | |
16 | + String cid; | |
17 | + int func_no; | |
18 | + String head_image; | |
19 | + String situation; | |
20 | + | |
21 | + public String getUser_id() { | |
22 | + return user_id; | |
23 | + } | |
24 | + | |
25 | + public void setUser_id(String user_id) { | |
26 | + this.user_id = user_id; | |
27 | + } | |
28 | + | |
29 | + public int getSchool_id() { | |
30 | + return school_id; | |
31 | + } | |
32 | + | |
33 | + public void setSchool_id(int school_id) { | |
34 | + this.school_id = school_id; | |
35 | + } | |
36 | + | |
37 | + public int getCustomerId() { | |
38 | + return customerId; | |
39 | + } | |
40 | + | |
41 | + public void setCustomerId(int customerId) { | |
42 | + this.customerId = customerId; | |
43 | + } | |
44 | + | |
45 | + public int getUsertype() { | |
46 | + return usertype; | |
47 | + } | |
48 | + | |
49 | + public void setUsertype(int usertype) { | |
50 | + this.usertype = usertype; | |
51 | + } | |
52 | + | |
53 | + public String getCard_num() { | |
54 | + return card_num; | |
55 | + } | |
56 | + | |
57 | + public void setCard_num(String card_num) { | |
58 | + this.card_num = card_num; | |
59 | + } | |
60 | + | |
61 | + public int getCard_type() { | |
62 | + return card_type; | |
63 | + } | |
64 | + | |
65 | + public void setCard_type(int card_type) { | |
66 | + this.card_type = card_type; | |
67 | + } | |
68 | + | |
69 | + public int getOutof() { | |
70 | + return outof; | |
71 | + } | |
72 | + | |
73 | + public void setOutof(int outof) { | |
74 | + this.outof = outof; | |
75 | + } | |
76 | + | |
77 | + public String getIntime() { | |
78 | + return intime; | |
79 | + } | |
80 | + | |
81 | + public void setIntime(String intime) { | |
82 | + this.intime = intime; | |
83 | + } | |
84 | + | |
85 | + public String getCid() { | |
86 | + return cid; | |
87 | + } | |
88 | + | |
89 | + public void setCid(String cid) { | |
90 | + this.cid = cid; | |
91 | + } | |
92 | + | |
93 | + public int getFunc_no() { | |
94 | + return func_no; | |
95 | + } | |
96 | + | |
97 | + public void setFunc_no(int func_no) { | |
98 | + this.func_no = func_no; | |
99 | + } | |
100 | + | |
101 | + public String getHead_image() { | |
102 | + return head_image; | |
103 | + } | |
104 | + | |
105 | + public void setHead_image(String head_image) { | |
106 | + this.head_image = head_image; | |
107 | + } | |
108 | + | |
109 | + public String getSituation() { | |
110 | + return situation; | |
111 | + } | |
112 | + | |
113 | + public void setSituation(String situation) { | |
114 | + this.situation = situation; | |
115 | + } | |
12 | 116 | |
13 | 117 | @Override |
14 | 118 | public String toString() { |
15 | 119 | return "AttendanceBean{" + |
16 | - "studentId='" + studentId + '\'' + | |
17 | - ", imgUrl='" + imgUrl + '\'' + | |
18 | - ", kaoQinNum='" + kaoQinNum + '\'' + | |
19 | - ", kaoQinDate='" + kaoQinDate + '\'' + | |
120 | + "user_id='" + user_id + '\'' + | |
121 | + ", school_id=" + school_id + | |
122 | + ", customerId=" + customerId + | |
123 | + ", usertype=" + usertype + | |
124 | + ", card_num='" + card_num + '\'' + | |
125 | + ", card_type=" + card_type + | |
126 | + ", outof=" + outof + | |
127 | + ", intime='" + intime + '\'' + | |
128 | + ", cid='" + cid + '\'' + | |
129 | + ", func_no=" + func_no + | |
130 | + ", head_image='" + head_image + '\'' + | |
131 | + ", situation='" + situation + '\'' + | |
20 | 132 | '}'; |
21 | 133 | } |
22 | 134 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/contract/apply/ApplyReplaceCardContract.java
1 | 1 | package com.shunzhi.parent.contract.apply; |
2 | 2 | |
3 | + | |
4 | + | |
5 | +import android.util.Log; | |
6 | + | |
3 | 7 | import com.google.gson.JsonObject; |
4 | 8 | import com.share.mvpsdk.base.BasePresenter; |
5 | 9 | import com.share.mvpsdk.base.IBaseActivity; |
6 | 10 | import com.share.mvpsdk.base.IBaseModel; |
7 | -import com.shunzhi.parent.bean.apply.ApplyReplaceCardBean; | |
11 | +import com.share.mvpsdk.base.IBaseView; | |
12 | +import com.share.mvpsdk.utils.ToastUtils; | |
8 | 13 | |
9 | -import java.util.List; | |
10 | 14 | |
11 | 15 | /** |
12 | 16 | * Created by Administrator on 2018/4/18 0018. |
... | ... | @@ -14,15 +18,14 @@ import java.util.List; |
14 | 18 | |
15 | 19 | public interface ApplyReplaceCardContract { |
16 | 20 | |
17 | - //IOrderDetailModel,IOrderDetailView | |
18 | 21 | abstract class ApplyReplaceCardPreenter extends BasePresenter<IApplyReplaceCardModel,IApplyReplaceCardView>{ |
19 | - public abstract void showReplaceCardDetail(int studentId,String cardId); | |
22 | + public abstract void ReplaceCardDetail(int studentId,String cardId); | |
20 | 23 | } |
21 | 24 | interface IApplyReplaceCardModel extends IBaseModel { |
22 | 25 | io.reactivex.Observable<JsonObject> getReplaceCardDetailResult(int studentId, String cardId); |
23 | 26 | } |
24 | 27 | |
25 | - interface IApplyReplaceCardView extends IBaseActivity{ | |
26 | - void showReplaceCardDetail(List<ApplyReplaceCardBean> applyReplaceCardBean); | |
28 | + interface IApplyReplaceCardView extends IBaseView{ | |
29 | + void showTipsDialog(String string); | |
27 | 30 | } |
28 | 31 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/contract/apply/ApplySigninContract.java
... | ... | @@ -7,7 +7,9 @@ import com.share.mvpsdk.base.BasePresenter; |
7 | 7 | import com.share.mvpsdk.base.IBaseFragment; |
8 | 8 | import com.share.mvpsdk.base.IBaseModel; |
9 | 9 | import com.shunzhi.parent.bean.ToolBean; |
10 | +import com.shunzhi.parent.bean.apply.AttendanceBean; | |
10 | 11 | |
12 | +import java.util.Date; | |
11 | 13 | import java.util.List; |
12 | 14 | |
13 | 15 | import io.reactivex.Observable; |
... | ... | @@ -15,23 +17,22 @@ import io.reactivex.Observable; |
15 | 17 | /** |
16 | 18 | * Created by ToaHanDong on 2018/3/14. |
17 | 19 | */ |
18 | - | |
19 | 20 | public interface ApplySigninContract { |
20 | 21 | |
21 | 22 | abstract class ApplySigninPresenter extends BasePresenter<IApplySigninModel,IApplySigninView>{ |
22 | - public abstract void getTools(LinearLayout linearLayout,String areaName); | |
23 | + public abstract void SigninDetail(int studentId, int schoolId, String date); | |
23 | 24 | } |
24 | 25 | |
25 | 26 | |
26 | 27 | interface IApplySigninModel extends IBaseModel{ |
27 | - Observable<JsonObject> getTools(String areaName); | |
28 | + Observable<JsonObject> getSigninDetailResult(int studentId, int schoolId, String date); | |
28 | 29 | } |
29 | 30 | |
30 | 31 | |
31 | 32 | interface IApplySigninView extends IBaseFragment{ |
32 | 33 | |
33 | - void showTools(List<ToolBean> toolBeanList); | |
34 | - | |
34 | + void showDetialList(List<AttendanceBean> list); | |
35 | + void showDetialInfo(List<AttendanceBean> list); | |
35 | 36 | } |
36 | 37 | |
37 | 38 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/contract/report/ReportDetialContract.java
... | ... | @@ -25,7 +25,7 @@ public interface ReportDetialContract { |
25 | 25 | interface IReportDetialView extends IBaseView { |
26 | 26 | // pointNow,pointPast,sceneName |
27 | 27 | void showDetialList(List<DeyuDetialBean> list, JsonArray pointNow, JsonArray pointPast, JsonArray sceneName); |
28 | - void showDetialInfo(float rank, String scoree, String bijiao1,String bijiao2,String bijiao3,String bijiao4,String describe); | |
28 | + void showDetialInfo(float rank, String scoree, String bijiao1,String bijiao2,String bijiao3,String bijiao4,String describe); | |
29 | 29 | |
30 | 30 | } |
31 | 31 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/model/apply/ApplySigninModel.java
... | ... | @@ -2,9 +2,15 @@ package com.shunzhi.parent.model.apply; |
2 | 2 | |
3 | 3 | import com.google.gson.JsonObject; |
4 | 4 | import com.share.mvpsdk.base.BaseModel; |
5 | +import com.share.mvpsdk.helper.RetrofitCreateHelper; | |
6 | +import com.share.mvpsdk.helper.RxHelper; | |
7 | +import com.shunzhi.parent.AppConfig; | |
8 | +import com.shunzhi.parent.api.ApplySigninApi; | |
5 | 9 | import com.shunzhi.parent.contract.apply.ApplySigninContract; |
6 | 10 | import com.shunzhi.parent.contract.ceping.CepingContract; |
7 | 11 | |
12 | +import java.util.Date; | |
13 | + | |
8 | 14 | import io.reactivex.Observable; |
9 | 15 | |
10 | 16 | /** |
... | ... | @@ -12,12 +18,13 @@ import io.reactivex.Observable; |
12 | 18 | */ |
13 | 19 | |
14 | 20 | public class ApplySigninModel extends BaseModel implements ApplySigninContract.IApplySigninModel{ |
15 | - @Override | |
16 | - public Observable<JsonObject> getTools(String areaName) { | |
17 | - return null; | |
18 | - } | |
19 | 21 | |
20 | 22 | public static ApplySigninContract.IApplySigninModel newInstance() { |
21 | 23 | return new ApplySigninModel(); |
22 | 24 | } |
25 | + | |
26 | + @Override | |
27 | + public Observable<JsonObject> getSigninDetailResult(int studentId, int schoolId, String date) { | |
28 | + return RetrofitCreateHelper.getInstance().createApi(ApplySigninApi.class, AppConfig.BASE_URL).getApplySignin(studentId,schoolId,date).compose(RxHelper.<JsonObject>rxSchedulerHelper()); | |
29 | + } | |
23 | 30 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/presenter/apply/ApplyReplaceCardPresenter.java
1 | 1 | package com.shunzhi.parent.presenter.apply; |
2 | 2 | |
3 | +import android.annotation.SuppressLint; | |
4 | +import android.util.Log; | |
5 | + | |
3 | 6 | import com.google.gson.JsonObject; |
4 | -import com.share.mvpsdk.base.BasePresenter; | |
5 | 7 | import com.share.mvpsdk.utils.ToastUtils; |
6 | 8 | import com.shunzhi.parent.contract.apply.ApplyReplaceCardContract; |
7 | 9 | import com.shunzhi.parent.model.apply.ApplyReplaceCardModel; |
8 | 10 | |
11 | +import org.json.JSONObject; | |
12 | + | |
9 | 13 | import io.reactivex.functions.Consumer; |
10 | 14 | |
11 | 15 | /** |
12 | 16 | * Created by Administrator on 2018/4/18 0018. |
13 | 17 | */ |
14 | 18 | public class ApplyReplaceCardPresenter extends ApplyReplaceCardContract.ApplyReplaceCardPreenter { |
19 | + | |
20 | + | |
15 | 21 | @Override |
16 | 22 | public ApplyReplaceCardContract.IApplyReplaceCardModel getModel() { |
17 | 23 | return ApplyReplaceCardModel.newInstance(); |
... | ... | @@ -23,13 +29,14 @@ public class ApplyReplaceCardPresenter extends ApplyReplaceCardContract.ApplyRep |
23 | 29 | } |
24 | 30 | |
25 | 31 | @Override |
26 | - public void showReplaceCardDetail(int studentId, String cardId) { | |
27 | - mRxManager.register(mIModel.getReplaceCardDetailResult(studentId,cardId).subscribe(new Consumer<JsonObject>() { | |
32 | + public void ReplaceCardDetail(int studentId, String cardId) { | |
33 | + mRxManager.register(mIModel.getReplaceCardDetailResult(studentId, cardId).subscribe(new Consumer<JsonObject>() { | |
34 | + @SuppressLint("LongLogTag") | |
28 | 35 | @Override |
29 | 36 | public void accept(JsonObject jsonObject) throws Exception { |
30 | - ToastUtils.showToast(jsonObject.toString()); | |
31 | - //接收到的json | |
32 | - | |
37 | + ToastUtils.showToast("data:" + jsonObject.toString()); | |
38 | + String isShowTipsDialog = jsonObject.get("data").getAsString(); | |
39 | + mIView.showTipsDialog(isShowTipsDialog); | |
33 | 40 | } |
34 | 41 | }, new Consumer<Throwable>() { |
35 | 42 | @Override | ... | ... |
app/src/main/java/com/shunzhi/parent/presenter/apply/ApplySigninPresenter.java
1 | 1 | package com.shunzhi.parent.presenter.apply; |
2 | 2 | |
3 | -import android.widget.LinearLayout; | |
3 | +import android.annotation.SuppressLint; | |
4 | +import android.text.TextUtils; | |
5 | +import android.util.Log; | |
4 | 6 | |
7 | +import com.google.gson.Gson; | |
8 | +import com.google.gson.JsonArray; | |
9 | +import com.google.gson.JsonObject; | |
10 | +import com.share.mvpsdk.utils.ToastUtils; | |
11 | +import com.shunzhi.parent.bean.apply.AttendanceBean; | |
5 | 12 | import com.shunzhi.parent.contract.apply.ApplySigninContract; |
6 | 13 | import com.shunzhi.parent.model.apply.ApplySigninModel; |
7 | 14 | |
15 | +import org.json.JSONArray; | |
16 | +import org.json.JSONObject; | |
17 | + | |
18 | +import java.util.ArrayList; | |
19 | +import java.util.Iterator; | |
20 | +import java.util.List; | |
21 | + | |
22 | +import io.reactivex.functions.Consumer; | |
23 | + | |
8 | 24 | /** |
9 | 25 | * Created by Administrator on 2018/4/17 0017. |
10 | 26 | */ |
... | ... | @@ -21,7 +37,34 @@ public class ApplySigninPresenter extends ApplySigninContract.ApplySigninPresent |
21 | 37 | } |
22 | 38 | |
23 | 39 | @Override |
24 | - public void getTools(LinearLayout linearLayout, String areaName) { | |
40 | + public void SigninDetail(int studentId, int schoolId, String date) { | |
41 | + mRxManager.register(mIModel.getSigninDetailResult(studentId, schoolId,date).subscribe(new Consumer<JsonObject>() { | |
42 | + @SuppressLint("LongLogTag") | |
43 | + @Override | |
44 | + public void accept(JsonObject jsonObject) throws Exception { | |
45 | + //ToastUtils.showToast("data:" + jsonObject.toString()); | |
46 | + Log.i("ApplySignin:",jsonObject.toString()); | |
47 | + if (jsonObject.get("status").getAsString().equals("1")){ | |
48 | + JsonArray jsonArray = jsonObject.get("data").getAsJsonArray(); | |
49 | + List<AttendanceBean> attendanceBeanlist = new ArrayList<>(); | |
50 | + Log.i("ApplySignin:size", String.valueOf(jsonArray.size())); | |
51 | + for (int i = 0;i< jsonArray.size();i++){ | |
52 | + JsonObject attendanceDetailObj = jsonArray.get(i).getAsJsonObject(); | |
53 | + AttendanceBean attendanceBean = new Gson().fromJson(attendanceDetailObj,AttendanceBean.class); | |
54 | + attendanceBeanlist.add(attendanceBean); | |
55 | + } | |
56 | + mIView.showDetialList(attendanceBeanlist); | |
57 | + mIView.showDetialInfo(attendanceBeanlist); | |
58 | + }else { | |
59 | + ToastUtils.showToast(jsonObject.get("message").getAsString()); | |
60 | + } | |
61 | + | |
62 | + } | |
63 | + }, new Consumer<Throwable>() { | |
64 | + @Override | |
65 | + public void accept(Throwable throwable) throws Exception { | |
25 | 66 | |
67 | + } | |
68 | + })); | |
26 | 69 | } |
27 | 70 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/apply/ApplyReplaceCardActivity.java
... | ... | @@ -23,7 +23,6 @@ import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; |
23 | 23 | * 补卡界面 |
24 | 24 | */ |
25 | 25 | |
26 | -//OrderDetailContract.OrderDetailPreenter,OrderDetailContract.IOrderDetailModel | |
27 | 26 | public class ApplyReplaceCardActivity extends BaseMVPCompatActivity implements View.OnClickListener{ |
28 | 27 | ApplyReplaceCardFragment applyReplaceCardFragment = null; |
29 | 28 | ImageView ivBack; | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/activity/apply/ApplySigninActivity.java
... | ... | @@ -18,6 +18,7 @@ import com.bigkoo.pickerview.listener.OnTimeSelectListener; |
18 | 18 | import com.share.mvpsdk.base.BasePresenter; |
19 | 19 | import com.share.mvpsdk.base.activity.BaseMVPCompatActivity; |
20 | 20 | import com.shunzhi.parent.R; |
21 | +import com.shunzhi.parent.presenter.apply.ApplySigninPresenter; | |
21 | 22 | import com.shunzhi.parent.ui.fragment.apply.ApplySigninFragment; |
22 | 23 | |
23 | 24 | import java.util.Calendar; |
... | ... | @@ -74,7 +75,7 @@ public class ApplySigninActivity extends BaseMVPCompatActivity implements View.O |
74 | 75 | @NonNull |
75 | 76 | @Override |
76 | 77 | public BasePresenter initPresenter() { |
77 | - return null; | |
78 | + return new ApplySigninPresenter(); | |
78 | 79 | } |
79 | 80 | |
80 | 81 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplyReplaceCardFragment.java
1 | 1 | package com.shunzhi.parent.ui.fragment.apply; |
2 | 2 | |
3 | +import android.annotation.SuppressLint; | |
3 | 4 | import android.os.Bundle; |
4 | 5 | import android.support.annotation.NonNull; |
5 | 6 | import android.support.annotation.Nullable; |
6 | 7 | import android.text.TextUtils; |
8 | +import android.util.Log; | |
7 | 9 | import android.view.View; |
8 | 10 | import android.widget.Button; |
9 | 11 | import android.widget.EditText; |
... | ... | @@ -14,25 +16,25 @@ import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
14 | 16 | import com.share.mvpsdk.utils.ToastUtils; |
15 | 17 | import com.shunzhi.parent.R; |
16 | 18 | import com.shunzhi.parent.contract.apply.ApplyReplaceCardContract; |
19 | +import com.shunzhi.parent.presenter.apply.ApplyReplaceCardPresenter; | |
17 | 20 | import com.shunzhi.parent.views.ReplaceCardDialog; |
18 | 21 | |
19 | 22 | /** |
20 | 23 | * Created by Administrator on 2018/4/10 0010. |
21 | 24 | */ |
22 | 25 | |
23 | -public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplaceCardContract.ApplyReplaceCardPreenter,ApplyReplaceCardContract.IApplyReplaceCardModel> | |
24 | - implements View.OnClickListener{ | |
26 | +public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplaceCardContract.ApplyReplaceCardPreenter, ApplyReplaceCardContract.IApplyReplaceCardModel> implements View.OnClickListener, | |
27 | + ApplyReplaceCardContract.IApplyReplaceCardView { | |
25 | 28 | private Button bt_sure; |
26 | 29 | private Button bt_cancel; |
27 | - ReplaceCardDialog replaceCardDialog=null; | |
30 | + ReplaceCardDialog replaceCardDialog = null; | |
28 | 31 | private EditText et_cardnum; |
29 | - private String cardnum; | |
30 | - private String cardid; | |
32 | + private String cardnum = ""; | |
31 | 33 | |
32 | 34 | @NonNull |
33 | 35 | @Override |
34 | 36 | public BasePresenter initPresenter() { |
35 | - return null; | |
37 | + return new ApplyReplaceCardPresenter(); | |
36 | 38 | } |
37 | 39 | |
38 | 40 | @Override |
... | ... | @@ -42,36 +44,50 @@ public class ApplyReplaceCardFragment extends BaseMVPCompatFragment<ApplyReplace |
42 | 44 | |
43 | 45 | @Override |
44 | 46 | public void initUI(View view, @Nullable Bundle savedInstanceState) { |
45 | - replaceCardDialog = new ReplaceCardDialog(getActivity()); | |
46 | - bt_sure = view.findViewById(R.id.bt_sure); | |
47 | - bt_cancel = view.findViewById(R.id.bt_cancle); | |
48 | - et_cardnum = view.findViewById(R.id.et_cardnum); | |
47 | + replaceCardDialog = new ReplaceCardDialog(getActivity()); | |
48 | + bt_sure = view.findViewById(R.id.bt_sure); | |
49 | + bt_cancel = view.findViewById(R.id.bt_cancle); | |
50 | + et_cardnum = view.findViewById(R.id.et_cardnum); | |
49 | 51 | |
50 | - bt_sure.setOnClickListener(this); | |
52 | + bt_sure.setOnClickListener(this); | |
51 | 53 | |
52 | - cardid = et_cardnum.getText().toString().trim(); | |
53 | - if (TextUtils.isEmpty(cardid)) { | |
54 | - ToastUtils.showToast("请输入新卡卡号!"); | |
55 | - }else { | |
56 | - //studentid 从成长界面获取 此处设置为“123” | |
57 | - mPresenter.showReplaceCardDetail(123, cardid); | |
58 | - } | |
59 | 54 | } |
60 | 55 | |
56 | + @SuppressLint("LongLogTag") | |
61 | 57 | @Override |
62 | 58 | public void onClick(View view) { |
63 | - switch (view.getId()){ | |
59 | + switch (view.getId()) { | |
64 | 60 | case R.id.bt_sure: |
65 | 61 | cardnum = et_cardnum.getText().toString().trim(); |
66 | - if (TextUtils.isEmpty(cardnum)){ | |
67 | - Toast.makeText(getActivity(),"卡号不能为空,请重新输入",Toast.LENGTH_SHORT).show(); | |
68 | - } | |
69 | - else { | |
70 | - replaceCardDialog.setTitle("补卡提示"); | |
71 | - replaceCardDialog.setText("您已补卡成功!"); | |
72 | - replaceCardDialog.show(); | |
62 | + ToastUtils.showToast("cardnum:" + cardnum); | |
63 | + Log.i("ApplyReplaceCardFragment:data", cardnum); | |
64 | + if (TextUtils.isEmpty(cardnum)) { | |
65 | + ToastUtils.showToast("卡号不能为空,请重新输入!"); | |
66 | + } else { | |
67 | + //studentid 从成长界面获取 此处设置为“123” | |
68 | + mPresenter.ReplaceCardDetail(12, cardnum); | |
73 | 69 | } |
74 | 70 | break; |
71 | + default: | |
72 | + break; | |
73 | + } | |
74 | + } | |
75 | + | |
76 | + @Override | |
77 | + public void showTipsDialog(String msg) { | |
78 | + | |
79 | + if (msg.equals("true")) { | |
80 | + if (replaceCardDialog == null) { | |
81 | + replaceCardDialog = new ReplaceCardDialog(getActivity()); | |
82 | + } else { | |
83 | + replaceCardDialog.setTitle("补卡提示"); | |
84 | + replaceCardDialog.setText("您已补卡成功!"); | |
85 | + replaceCardDialog.show(); | |
86 | + } | |
87 | + } else { | |
88 | + ToastUtils.showToast("补卡失败!"); | |
75 | 89 | } |
90 | + | |
91 | + | |
76 | 92 | } |
77 | 93 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/apply/ApplySigninFragment.java
... | ... | @@ -7,6 +7,7 @@ import android.support.annotation.Nullable; |
7 | 7 | import android.support.annotation.RequiresApi; |
8 | 8 | import android.support.v7.widget.LinearLayoutManager; |
9 | 9 | import android.support.v7.widget.RecyclerView; |
10 | +import android.text.TextUtils; | |
10 | 11 | import android.util.Log; |
11 | 12 | import android.view.View; |
12 | 13 | import android.widget.CheckBox; |
... | ... | @@ -27,6 +28,7 @@ import com.share.mvpsdk.utils.ToastUtils; |
27 | 28 | import com.shunzhi.parent.AppContext; |
28 | 29 | import com.shunzhi.parent.R; |
29 | 30 | import com.shunzhi.parent.adapter.AttendanceAdapter; |
31 | +import com.shunzhi.parent.bean.ToolBean; | |
30 | 32 | import com.shunzhi.parent.bean.apply.AttendanceBean; |
31 | 33 | import com.shunzhi.parent.contract.apply.ApplySigninContract; |
32 | 34 | import com.shunzhi.parent.presenter.apply.ApplySigninPresenter; |
... | ... | @@ -42,7 +44,8 @@ import java.util.List; |
42 | 44 | * Created by Administrator on 2018/4/10 0010. |
43 | 45 | */ |
44 | 46 | |
45 | -public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContract.ApplySigninPresenter, ApplySigninContract.IApplySigninModel> implements View.OnClickListener{ | |
47 | +public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContract.ApplySigninPresenter, ApplySigninContract.IApplySigninModel> implements View.OnClickListener, | |
48 | + ApplySigninContract.IApplySigninView{ | |
46 | 49 | private RecyclerView recycle_attendance; |
47 | 50 | private AttendanceAdapter attendanceAdapter; |
48 | 51 | List<AttendanceBean> list=new ArrayList<>(); |
... | ... | @@ -50,6 +53,8 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
50 | 53 | private LinearLayout layout_tv; |
51 | 54 | private ImageView iv_calendar; |
52 | 55 | private TimePickerView pvCustomLunar; |
56 | + private String date=""; | |
57 | + List<AttendanceBean> signinlist = new ArrayList<>(); | |
53 | 58 | |
54 | 59 | |
55 | 60 | public BasePresenter initPresenter() { |
... | ... | @@ -70,24 +75,29 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
70 | 75 | tv_kaoqin_num = view.findViewById(R.id.tv_kaoqin_num); |
71 | 76 | iv_calendar = view.findViewById(R.id.iv_calendar); |
72 | 77 | |
78 | + initLunarPicker(); | |
73 | 79 | iv_calendar .setOnClickListener(this); |
74 | 80 | |
81 | + date = "2017-07-19";//date = getNowTime(); | |
82 | + tv_kaoqin_date.setText(getNowTime()); | |
75 | 83 | recycle_attendance = view.findViewById(R.id.recycle_attendance); |
84 | + | |
76 | 85 | recycle_attendance.setLayoutManager(new LinearLayoutManager(getActivity())); |
77 | 86 | attendanceAdapter = new AttendanceAdapter(getActivity()); |
78 | - AttendanceBean attendanceBean = new AttendanceBean(); | |
79 | - if (list.size()!=0){ | |
80 | - layout_tv.setVisibility(View.VISIBLE); | |
81 | - tv_tips.setVisibility(View.VISIBLE); | |
82 | - }else { | |
83 | - list.add(attendanceBean); | |
84 | - list.add(attendanceBean); | |
85 | - list.add(attendanceBean); | |
86 | - list.add(attendanceBean); | |
87 | - attendanceAdapter.addAll(list); | |
88 | - recycle_attendance.setAdapter(attendanceAdapter); | |
89 | - } | |
90 | - initLunarPicker(); | |
87 | + recycle_attendance.setAdapter(attendanceAdapter); | |
88 | + | |
89 | + mPresenter.SigninDetail(185,1,date); | |
90 | + | |
91 | + } | |
92 | + | |
93 | + /** | |
94 | + * 获取当前时间 | |
95 | + * @return | |
96 | + */ | |
97 | + public static String getNowTime(){ | |
98 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); | |
99 | + Date date = new Date(System.currentTimeMillis()); | |
100 | + return simpleDateFormat.format(date); | |
91 | 101 | } |
92 | 102 | |
93 | 103 | @RequiresApi(api = Build.VERSION_CODES.N) |
... | ... | @@ -112,6 +122,7 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
112 | 122 | @Override |
113 | 123 | public void onTimeSelect(Date date, View v) { |
114 | 124 | ToastUtils.showToast(getTime(date)); |
125 | + Log.i("getTime:",getTime(date)); | |
115 | 126 | tv_kaoqin_date.setText(getTime(date)); |
116 | 127 | } |
117 | 128 | }) |
... | ... | @@ -146,4 +157,23 @@ public class ApplySigninFragment extends BaseMVPCompatFragment<ApplySigninContra |
146 | 157 | return format.format(date); |
147 | 158 | } |
148 | 159 | |
160 | + @Override | |
161 | + public void showDetialList(List<AttendanceBean> list) { | |
162 | + | |
163 | + if (list.size() == 0){ | |
164 | + layout_tv.setVisibility(View.VISIBLE); | |
165 | + }else { | |
166 | + recycle_attendance.setVisibility(View.VISIBLE); | |
167 | + signinlist.clear(); | |
168 | + signinlist.addAll(list); | |
169 | + attendanceAdapter.addAll(signinlist); | |
170 | + attendanceAdapter.notifyDataSetChanged(); | |
171 | + } | |
172 | + } | |
173 | + | |
174 | + @Override | |
175 | + public void showDetialInfo(List<AttendanceBean> list) { | |
176 | + String num = String.valueOf(list.size()); | |
177 | + tv_kaoqin_num.setText(num); | |
178 | + } | |
149 | 179 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ChengZhangFragment.java
1 | 1 | package com.shunzhi.parent.ui.fragment.report; |
2 | 2 | |
3 | +import android.content.Intent; | |
3 | 4 | import android.os.Bundle; |
4 | 5 | import android.os.Handler; |
5 | 6 | import android.os.Message; |
... | ... | @@ -19,6 +20,11 @@ import com.shunzhi.parent.adapter.ReportAdapter; |
19 | 20 | import com.shunzhi.parent.bean.ReportBean; |
20 | 21 | import com.shunzhi.parent.contract.report.ReportContract; |
21 | 22 | import com.shunzhi.parent.presenter.report.ReportPresenter; |
23 | +import com.shunzhi.parent.ui.activity.apply.ApplyReplaceCardActivity; | |
24 | +import com.shunzhi.parent.ui.activity.apply.ApplySigninActivity; | |
25 | +import com.shunzhi.parent.ui.activity.report.ReportDetialActivity; | |
26 | +import com.shunzhi.parent.ui.activity.report.ReportSceneActivity; | |
27 | +import com.shunzhi.parent.ui.fragment.apply.ApplyReplaceCardFragment; | |
22 | 28 | |
23 | 29 | import java.util.List; |
24 | 30 | |
... | ... | @@ -144,13 +150,12 @@ public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.Rep |
144 | 150 | public void onClick(View view) { |
145 | 151 | switch (view.getId()) { |
146 | 152 | case R.id.layout_kaoqin: |
147 | - | |
153 | + ApplySigninActivity.getInstance(getActivity()); | |
148 | 154 | break; |
149 | 155 | case R.id.layout_buka: |
150 | - | |
156 | + ApplyReplaceCardActivity.getInstance(getActivity()); | |
151 | 157 | break; |
152 | 158 | case R.id.layout_qingjia: |
153 | - | |
154 | 159 | break; |
155 | 160 | } |
156 | 161 | } | ... | ... |
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ReportDetialFragment.java
4.28 KB
4.37 KB
4.28 KB
4.37 KB
4.28 KB
app/src/main/res/drawable-xhdpi/photo.jpg
6.03 KB
4.37 KB
4.28 KB
4.37 KB
4.37 KB
app/src/main/res/layout/fragment_apply_replacecard.xml
... | ... | @@ -25,11 +25,13 @@ |
25 | 25 | |
26 | 26 | |
27 | 27 | <LinearLayout |
28 | + android:layout_marginTop="@dimen/margin_tiny" | |
29 | + android:layout_marginLeft="@dimen/margin_24" | |
30 | + android:layout_marginRight="@dimen/margin_24" | |
28 | 31 | android:layout_width="match_parent" |
29 | 32 | android:layout_height="170dp" |
30 | 33 | android:background="@drawable/report_white" |
31 | - android:orientation="vertical" | |
32 | - android:layout_margin="@dimen/margin_medium"> | |
34 | + android:orientation="vertical"> | |
33 | 35 | |
34 | 36 | <LinearLayout |
35 | 37 | android:layout_width="match_parent" |
... | ... | @@ -39,9 +41,9 @@ |
39 | 41 | android:orientation="horizontal"> |
40 | 42 | |
41 | 43 | <TextView |
42 | - android:layout_weight="1" | |
44 | + android:layout_weight="1.2" | |
43 | 45 | android:id="@+id/tv_carduser" |
44 | - android:paddingLeft="@dimen/margin_small" | |
46 | + android:layout_margin="@dimen/dp_8" | |
45 | 47 | android:layout_width="0dp" |
46 | 48 | android:layout_height="wrap_content" |
47 | 49 | android:text="补卡人:" |
... | ... | @@ -50,9 +52,10 @@ |
50 | 52 | |
51 | 53 | <TextView |
52 | 54 | android:id="@+id/et_carduser" |
53 | - android:layout_weight="3" | |
55 | + android:layout_weight="2.8" | |
54 | 56 | android:layout_width="0dp" |
55 | 57 | android:layout_height="wrap_content" |
58 | + android:layout_margin="@dimen/dp_8" | |
56 | 59 | android:gravity="center" |
57 | 60 | android:text="张三" |
58 | 61 | android:textColor="@color/hintTextColor" |
... | ... | @@ -67,19 +70,20 @@ |
67 | 70 | |
68 | 71 | <TextView |
69 | 72 | android:id="@+id/tv_cardnum" |
70 | - android:layout_weight="1" | |
73 | + android:layout_weight="1.2" | |
71 | 74 | android:layout_width="0dp" |
72 | 75 | android:layout_height="wrap_content" |
73 | - android:paddingLeft="@dimen/margin_small" | |
76 | + android:layout_margin="@dimen/dp_8" | |
74 | 77 | android:text="卡号:" |
75 | 78 | android:textColor="@color/hintTextColor" |
76 | 79 | android:textSize="@dimen/textSize16" /> |
77 | 80 | |
78 | 81 | <EditText |
79 | 82 | android:id="@+id/et_cardnum" |
80 | - android:layout_weight="3" | |
83 | + android:layout_weight="2.8" | |
81 | 84 | android:layout_width="0dp" |
82 | 85 | android:layout_height="wrap_content" |
86 | + android:layout_margin="@dimen/dp_8" | |
83 | 87 | android:gravity="center" |
84 | 88 | android:background="@null" |
85 | 89 | android:inputType="number" |
... | ... | @@ -100,19 +104,20 @@ |
100 | 104 | android:id="@+id/tv_cardnumber" |
101 | 105 | android:layout_width="0dp" |
102 | 106 | android:layout_height="wrap_content" |
103 | - android:paddingLeft="@dimen/margin_small" | |
104 | - android:layout_weight="1" | |
107 | + android:layout_margin="@dimen/dp_8" | |
108 | + android:layout_weight="1.2" | |
105 | 109 | android:text="考勤次数:" |
106 | 110 | android:textColor="@color/hintTextColor" |
107 | 111 | android:textSize="@dimen/textSize16" /> |
108 | 112 | |
109 | 113 | <TextView |
110 | 114 | android:id="@+id/et_cardnumber" |
111 | - android:layout_weight="3" | |
115 | + android:layout_weight="2.8" | |
112 | 116 | android:layout_width="0dp" |
117 | + android:layout_margin="@dimen/dp_8" | |
113 | 118 | android:layout_height="wrap_content" |
114 | 119 | android:gravity="center" |
115 | - android:text="5次" | |
120 | + android:text="0次" | |
116 | 121 | android:textColor="@color/hintTextColor" |
117 | 122 | android:textSize="@dimen/textSize16" /> |
118 | 123 | </LinearLayout> |
... | ... | @@ -132,7 +137,7 @@ |
132 | 137 | android:id="@+id/bt_sure" |
133 | 138 | android:layout_width="80dp" |
134 | 139 | android:layout_height="wrap_content" |
135 | - android:layout_marginLeft="@dimen/dp_60" | |
140 | + android:layout_marginLeft="@dimen/dp_40" | |
136 | 141 | android:layout_alignParentLeft="true" |
137 | 142 | android:text="确定" |
138 | 143 | android:textColor="@color/white" |
... | ... | @@ -143,7 +148,7 @@ |
143 | 148 | android:id="@+id/bt_cancle" |
144 | 149 | android:layout_width="80dp" |
145 | 150 | android:layout_height="wrap_content" |
146 | - android:layout_marginRight="@dimen/dp_60" | |
151 | + android:layout_marginRight="@dimen/dp_40" | |
147 | 152 | android:layout_alignParentRight="true" |
148 | 153 | android:text="取消" |
149 | 154 | android:textColor="@color/white" | ... | ... |
app/src/main/res/layout/fragment_apply_signin.xml
... | ... | @@ -28,7 +28,9 @@ |
28 | 28 | <LinearLayout |
29 | 29 | android:layout_width="match_parent" |
30 | 30 | android:layout_height="170dp" |
31 | - android:layout_margin="@dimen/margin_medium" | |
31 | + android:layout_marginTop="@dimen/margin_tiny" | |
32 | + android:layout_marginLeft="@dimen/margin_24" | |
33 | + android:layout_marginRight="@dimen/margin_24" | |
32 | 34 | android:background="@drawable/report_white" |
33 | 35 | android:orientation="vertical"> |
34 | 36 | |
... | ... | @@ -43,7 +45,7 @@ |
43 | 45 | android:id="@+id/tv_attendancer" |
44 | 46 | android:layout_width="0dp" |
45 | 47 | android:layout_height="wrap_content" |
46 | - android:layout_weight="1" | |
48 | + android:layout_weight="1.2" | |
47 | 49 | android:paddingLeft="@dimen/margin_small" |
48 | 50 | android:text="考核对象:" |
49 | 51 | android:textColor="@color/hintTextColor" |
... | ... | @@ -53,7 +55,7 @@ |
53 | 55 | android:id="@+id/tv_kaoqin_user" |
54 | 56 | android:layout_width="0dp" |
55 | 57 | android:layout_height="wrap_content" |
56 | - android:layout_weight="3" | |
58 | + android:layout_weight="2.8" | |
57 | 59 | android:gravity="center" |
58 | 60 | android:text="张三" |
59 | 61 | android:textColor="@color/hintTextColor" |
... | ... | @@ -71,7 +73,7 @@ |
71 | 73 | android:id="@+id/tv_date" |
72 | 74 | android:layout_width="0dp" |
73 | 75 | android:layout_height="wrap_content" |
74 | - android:layout_weight="1" | |
76 | + android:layout_weight="1.2" | |
75 | 77 | android:paddingLeft="@dimen/margin_small" |
76 | 78 | android:text="考勤日期:" |
77 | 79 | android:textColor="@color/hintTextColor" |
... | ... | @@ -79,7 +81,7 @@ |
79 | 81 | <LinearLayout |
80 | 82 | android:layout_width="0dp" |
81 | 83 | android:layout_height="wrap_content" |
82 | - android:layout_weight="3" | |
84 | + android:layout_weight="2.8" | |
83 | 85 | android:gravity="center" |
84 | 86 | android:orientation="horizontal"> |
85 | 87 | <TextView |
... | ... | @@ -88,16 +90,15 @@ |
88 | 90 | android:layout_height="wrap_content" |
89 | 91 | android:layout_weight="2" |
90 | 92 | android:gravity="right" |
91 | - android:text="2018-04-10" | |
92 | 93 | android:textColor="@color/hintTextColor" |
93 | 94 | android:textSize="@dimen/textSize16" /> |
94 | 95 | <ImageView |
95 | 96 | android:id="@+id/iv_calendar" |
96 | 97 | android:layout_width="0dp" |
97 | - android:layout_height="wrap_content" | |
98 | + android:layout_height="20dp" | |
98 | 99 | android:layout_weight="1" |
99 | 100 | android:gravity="left" |
100 | - android:src="@drawable/kaoqin" /> | |
101 | + android:src="@drawable/date" /> | |
101 | 102 | </LinearLayout> |
102 | 103 | </LinearLayout> |
103 | 104 | |
... | ... | @@ -111,7 +112,7 @@ |
111 | 112 | android:id="@+id/tv_number" |
112 | 113 | android:layout_width="0dp" |
113 | 114 | android:layout_height="wrap_content" |
114 | - android:layout_weight="1" | |
115 | + android:layout_weight="1.2" | |
115 | 116 | android:paddingLeft="@dimen/margin_small" |
116 | 117 | android:text="考勤次数:" |
117 | 118 | android:textColor="@color/hintTextColor" |
... | ... | @@ -120,19 +121,13 @@ |
120 | 121 | android:id="@+id/tv_kaoqin_num" |
121 | 122 | android:layout_width="0dp" |
122 | 123 | android:layout_height="wrap_content" |
123 | - android:layout_weight="3" | |
124 | + android:layout_weight="2.8" | |
124 | 125 | android:gravity="center" |
125 | 126 | android:text="5" |
126 | 127 | android:textColor="@color/hintTextColor" |
127 | 128 | android:textSize="@dimen/textSize16" /> |
128 | 129 | </LinearLayout> |
129 | 130 | |
130 | - <TextView | |
131 | - android:id="@+id/tv2" | |
132 | - android:layout_width="fill_parent" | |
133 | - android:layout_height="1dp" | |
134 | - android:background="@color/line_color" /> | |
135 | - | |
136 | 131 | <LinearLayout |
137 | 132 | android:id="@+id/layout_tv" |
138 | 133 | android:layout_width="match_parent" |
... | ... | @@ -140,7 +135,7 @@ |
140 | 135 | android:layout_weight="2" |
141 | 136 | android:gravity="center" |
142 | 137 | android:orientation="horizontal" |
143 | - android:visibility="visible"> | |
138 | + android:visibility="gone"> | |
144 | 139 | |
145 | 140 | <TextView |
146 | 141 | android:id="@+id/tv_tips" |
... | ... | @@ -157,9 +152,8 @@ |
157 | 152 | android:id="@+id/recycle_attendance" |
158 | 153 | android:layout_width="match_parent" |
159 | 154 | android:layout_height="wrap_content" |
160 | - android:layout_marginTop="@dimen/size_dp_10" | |
161 | 155 | android:background="@color/bgColor" |
162 | - android:visibility="gone"> | |
156 | + android:visibility="visible"> | |
163 | 157 | |
164 | 158 | </android.support.v7.widget.RecyclerView> |
165 | 159 | </LinearLayout> |
166 | 160 | \ No newline at end of file | ... | ... |
app/src/main/res/layout/item_apply_signin.xml
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | android:textSize="@dimen/size_dp_18" /> |
54 | 54 | |
55 | 55 | <TextView |
56 | - android:id="@+id/tv_call" | |
56 | + android:id="@+id/tv_parent_name" | |
57 | 57 | android:layout_width="wrap_content" |
58 | 58 | android:layout_height="wrap_content" |
59 | 59 | android:text="张三" |
... | ... | @@ -68,39 +68,22 @@ |
68 | 68 | android:textSize="@dimen/size_dp_18" /> |
69 | 69 | </LinearLayout> |
70 | 70 | |
71 | - <LinearLayout | |
72 | - android:layout_width="match_parent" | |
71 | + <TextView | |
72 | + android:id="@+id/tv_attendance" | |
73 | + android:layout_width="wrap_content" | |
73 | 74 | android:layout_height="0dp" |
74 | - android:layout_weight="1"> | |
75 | - | |
76 | - <TextView | |
77 | - android:layout_width="wrap_content" | |
78 | - android:layout_height="wrap_content" | |
79 | - android:text="您的孩子已与 " | |
80 | - android:textColor="@color/hintTextColor" | |
81 | - android:textSize="@dimen/size_dp_16" /> | |
82 | - <TextView | |
83 | - android:id="@+id/tv_attendance_date" | |
84 | - android:layout_width="wrap_content" | |
85 | - android:layout_height="wrap_content" | |
86 | - android:textColor="@color/hintTextColor" | |
87 | - android:textSize="@dimen/size_dp_16" | |
88 | - android:text="10:00:15"/> | |
89 | - <TextView | |
90 | - android:layout_width="wrap_content" | |
91 | - android:layout_height="wrap_content" | |
92 | - android:textSize="@dimen/size_dp_16" | |
93 | - android:textColor="@color/hintTextColor" | |
94 | - android:text=" 进校!"/> | |
95 | - </LinearLayout> | |
75 | + android:layout_weight="1" | |
76 | + android:text="您的孩子已与10:00:15进校!" | |
77 | + android:textColor="@color/hintTextColor" | |
78 | + android:textSize="@dimen/size_dp_16" /> | |
96 | 79 | |
97 | 80 | <ImageView |
98 | 81 | android:id="@+id/iv_photo" |
99 | - android:layout_weight="2" | |
100 | - android:scaleType="fitCenter" | |
101 | 82 | android:layout_width="wrap_content" |
102 | 83 | android:layout_height="0dp" |
103 | - android:background="@drawable/photo" /> | |
84 | + android:layout_weight="2" | |
85 | + android:background="@drawable/photo" | |
86 | + android:scaleType="fitCenter" /> | |
104 | 87 | </LinearLayout> |
105 | 88 | </LinearLayout> |
106 | 89 | ... | ... |
mvpsdk/src/main/res/values/dimens.xml
... | ... | @@ -8,6 +8,8 @@ |
8 | 8 | <dimen name="margin_tiny">4dp</dimen> |
9 | 9 | <dimen name="margin_small">8dp</dimen> |
10 | 10 | <dimen name="margin_medium">16dp</dimen> |
11 | + <dimen name="margin_20">20dp</dimen> | |
12 | + <dimen name="margin_24">24dp</dimen> | |
11 | 13 | <dimen name="margin_large">32dp</dimen> |
12 | 14 | <dimen name="margin_huge">64dp</dimen> |
13 | 15 | <dimen name="margin_only_txt">48dp</dimen> |
... | ... | @@ -31,6 +33,7 @@ |
31 | 33 | <dimen name="dp_066">0.66dp</dimen> |
32 | 34 | <dimen name="dp_4">4dp</dimen> |
33 | 35 | <dimen name="dp_5">5dp</dimen> |
36 | + <dimen name="dp_8">8dp</dimen> | |
34 | 37 | <dimen name="dp_10">10dp</dimen> |
35 | 38 | <dimen name="dp_14">14dp</dimen> |
36 | 39 | <dimen name="dp_22">22dp</dimen> | ... | ... |