Commit 0254018236c701548f0649f6e60b48e6960f17dc
Exists in
yxb_dev
and in
2 other branches
Merge branch 'yxb_dev' of http://git.shunzhi.net/taohd/parentwork into developer
Showing
10 changed files
with
152 additions
and
9 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/adapter/ChildAdapter.java
0 → 100644
app/src/main/java/com/shunzhi/parent/bean/ChildBean.java
0 → 100644
app/src/main/java/com/shunzhi/parent/contract/mine/MyChildContract.java
0 → 100644
| @@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
| 1 | +package com.shunzhi.parent.contract.mine; | ||
| 2 | + | ||
| 3 | +import com.share.mvpsdk.base.BasePresenter; | ||
| 4 | +import com.share.mvpsdk.base.IBaseActivity; | ||
| 5 | +import com.share.mvpsdk.base.IBaseModel; | ||
| 6 | +import com.shunzhi.parent.bean.ChildBean; | ||
| 7 | + | ||
| 8 | +import java.util.List; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * Created by Administrator on 2018/3/9 0009. | ||
| 12 | + */ | ||
| 13 | + | ||
| 14 | +public interface MyChildContract { | ||
| 15 | + | ||
| 16 | + abstract class MyChildPresenter extends BasePresenter<IMyChildModel,IMyChildView> { | ||
| 17 | + | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + interface IMyChildModel extends IBaseModel{ | ||
| 21 | + | ||
| 22 | + } | ||
| 23 | + interface IMyChildView extends IBaseActivity{ | ||
| 24 | + void updateChilsList(List<ChildBean> list); | ||
| 25 | + | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | +} |
app/src/main/java/com/shunzhi/parent/model/mine/MyChildModel.java
0 → 100644
| @@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
| 1 | +package com.shunzhi.parent.model.mine; | ||
| 2 | + | ||
| 3 | +import com.share.mvpsdk.base.BaseModel; | ||
| 4 | +import com.shunzhi.parent.contract.mine.MyChildContract; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * Created by Administrator on 2018/3/8 0008. | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +public class MyChildModel extends BaseModel implements MyChildContract.IMyChildModel { | ||
| 11 | + public static MyChildModel newInstance() { | ||
| 12 | + return new MyChildModel(); | ||
| 13 | + } | ||
| 14 | +} |
app/src/main/java/com/shunzhi/parent/presenter/mine/MyChildPresenter.java
0 → 100644
| @@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
| 1 | +package com.shunzhi.parent.presenter.mine; | ||
| 2 | + | ||
| 3 | +import com.shunzhi.parent.contract.mine.MyChildContract; | ||
| 4 | +import com.shunzhi.parent.model.mine.MyChildModel; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * Created by Administrator on 2018/3/8 0008. | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +public class MyChildPresenter extends MyChildContract.MyChildPresenter { | ||
| 11 | + | ||
| 12 | + @Override | ||
| 13 | + public MyChildContract.IMyChildModel getModel() { | ||
| 14 | + return MyChildModel.newInstance(); | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public void onStart() { | ||
| 19 | + | ||
| 20 | + } | ||
| 21 | +} |
app/src/main/java/com/shunzhi/parent/ui/activity/MyChildActivity.java
| 1 | package com.shunzhi.parent.ui.activity; | 1 | package com.shunzhi.parent.ui.activity; |
| 2 | 2 | ||
| 3 | +import android.annotation.SuppressLint; | ||
| 3 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | +import android.support.annotation.NonNull; | ||
| 6 | +import android.support.v7.widget.LinearLayoutManager; | ||
| 7 | +import android.support.v7.widget.RecyclerView; | ||
| 8 | +import android.view.View; | ||
| 9 | +import android.widget.TextView; | ||
| 4 | 10 | ||
| 5 | -import com.share.mvpsdk.base.activity.BaseCompatActivity; | 11 | +import com.share.mvpsdk.base.BasePresenter; |
| 12 | +import com.share.mvpsdk.base.activity.BaseMVPCompatActivity; | ||
| 6 | import com.shunzhi.parent.R; | 13 | import com.shunzhi.parent.R; |
| 14 | +import com.shunzhi.parent.bean.ChildBean; | ||
| 15 | +import com.shunzhi.parent.contract.mine.MyChildContract; | ||
| 16 | +import com.shunzhi.parent.presenter.mine.MyChildPresenter; | ||
| 17 | + | ||
| 18 | +import java.util.List; | ||
| 7 | 19 | ||
| 8 | /** | 20 | /** |
| 9 | * Created by Administrator on 2018/3/8 0008. | 21 | * Created by Administrator on 2018/3/8 0008. |
| 10 | */ | 22 | */ |
| 11 | 23 | ||
| 12 | -public class MyChildActivity extends BaseCompatActivity { | 24 | +public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChildPresenter, MyChildContract.IMyChildModel> |
| 25 | + implements MyChildContract.IMyChildView, View.OnClickListener { | ||
| 26 | + RecyclerView child_recycle; | ||
| 27 | + TextView back; | ||
| 13 | 28 | ||
| 14 | 29 | ||
| 30 | + @NonNull | ||
| 31 | + @Override | ||
| 32 | + public BasePresenter initPresenter() { | ||
| 33 | + return new MyChildPresenter(); | ||
| 34 | + } | ||
| 15 | 35 | ||
| 36 | + @SuppressLint("WrongViewCast") | ||
| 16 | @Override | 37 | @Override |
| 17 | protected void initView(Bundle savedInstanceState) { | 38 | protected void initView(Bundle savedInstanceState) { |
| 39 | + child_recycle = findViewById(R.id.child_recycle); | ||
| 40 | + back = findViewById(R.id.back_top); | ||
| 41 | + back.setOnClickListener(this); | ||
| 42 | + initRecyclerView(); | ||
| 18 | 43 | ||
| 19 | } | 44 | } |
| 20 | 45 | ||
| 46 | + private void initRecyclerView() { | ||
| 47 | + child_recycle.setLayoutManager(new LinearLayoutManager(this)); | ||
| 48 | + } | ||
| 49 | + | ||
| 21 | @Override | 50 | @Override |
| 22 | protected int getLayoutId() { | 51 | protected int getLayoutId() { |
| 23 | return R.layout.activity_mychild; | 52 | return R.layout.activity_mychild; |
| 24 | } | 53 | } |
| 54 | + | ||
| 55 | + @Override | ||
| 56 | + public void onClick(View v) { | ||
| 57 | + finish(); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + @Override | ||
| 61 | + public void updateChilsList(List<ChildBean> list) { | ||
| 62 | + | ||
| 63 | + } | ||
| 25 | } | 64 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
| @@ -27,7 +27,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -27,7 +27,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
| 27 | 27 | ||
| 28 | @Override | 28 | @Override |
| 29 | public int getLayoutId() { | 29 | public int getLayoutId() { |
| 30 | - return R.layout.activity_mychild; | 30 | + return R.layout.fragment_mine; |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | @Override | 33 | @Override |
app/src/main/res/layout/activity_mychild.xml
| @@ -7,6 +7,27 @@ | @@ -7,6 +7,27 @@ | ||
| 7 | > | 7 | > |
| 8 | 8 | ||
| 9 | <include layout="@layout/top"/> | 9 | <include layout="@layout/top"/> |
| 10 | +<android.support.v7.widget.RecyclerView | ||
| 11 | + android:id="@+id/child_recycle" | ||
| 12 | + android:layout_width="match_parent" | ||
| 13 | + android:layout_height="wrap_content" | ||
| 14 | + android:layout_weight="1" | ||
| 15 | + > | ||
| 16 | + | ||
| 17 | +</android.support.v7.widget.RecyclerView> | ||
| 18 | + | ||
| 19 | + <TextView | ||
| 20 | + android:layout_width="match_parent" | ||
| 21 | + android:layout_height="40dp" | ||
| 22 | + android:layout_marginLeft="10dp" | ||
| 23 | + android:layout_marginRight="10dp" | ||
| 24 | + android:text="添加绑定账号" | ||
| 25 | + android:textColor="@color/white" | ||
| 26 | + android:textSize="@dimen/txtsize_title" | ||
| 27 | + android:gravity="center" | ||
| 28 | + android:background="@drawable/rudiobtn" | ||
| 29 | + /> | ||
| 30 | + | ||
| 10 | 31 | ||
| 11 | 32 | ||
| 12 | </LinearLayout> | 33 | </LinearLayout> |
| 13 | \ No newline at end of file | 34 | \ No newline at end of file |
app/src/main/res/layout/fragment_mine.xml
| @@ -68,8 +68,9 @@ | @@ -68,8 +68,9 @@ | ||
| 68 | 68 | ||
| 69 | <ImageView | 69 | <ImageView |
| 70 | android:layout_width="40dp" | 70 | android:layout_width="40dp" |
| 71 | - android:layout_height="match_parent" | 71 | + android:layout_height="40dp" |
| 72 | android:layout_marginRight="20dp" | 72 | android:layout_marginRight="20dp" |
| 73 | + android:layout_gravity="center_vertical" | ||
| 73 | android:src="@drawable/arrow_right" /> | 74 | android:src="@drawable/arrow_right" /> |
| 74 | </LinearLayout> | 75 | </LinearLayout> |
| 75 | </LinearLayout> | 76 | </LinearLayout> |
| @@ -121,7 +122,7 @@ | @@ -121,7 +122,7 @@ | ||
| 121 | 122 | ||
| 122 | <TextView | 123 | <TextView |
| 123 | android:layout_width="match_parent" | 124 | android:layout_width="match_parent" |
| 124 | - android:layout_height="1dp" | 125 | + android:layout_height="0.5dp" |
| 125 | android:layout_marginLeft="15dp" | 126 | android:layout_marginLeft="15dp" |
| 126 | android:layout_marginRight="15dp" | 127 | android:layout_marginRight="15dp" |
| 127 | android:background="@color/bottomline" /> | 128 | android:background="@color/bottomline" /> |
| @@ -152,7 +153,7 @@ | @@ -152,7 +153,7 @@ | ||
| 152 | 153 | ||
| 153 | <TextView | 154 | <TextView |
| 154 | android:layout_width="match_parent" | 155 | android:layout_width="match_parent" |
| 155 | - android:layout_height="1dp" | 156 | + android:layout_height="0.5dp" |
| 156 | android:layout_marginLeft="15dp" | 157 | android:layout_marginLeft="15dp" |
| 157 | android:layout_marginRight="15dp" | 158 | android:layout_marginRight="15dp" |
| 158 | android:background="@color/bottomline" /> | 159 | android:background="@color/bottomline" /> |
| @@ -181,7 +182,7 @@ | @@ -181,7 +182,7 @@ | ||
| 181 | 182 | ||
| 182 | <TextView | 183 | <TextView |
| 183 | android:layout_width="match_parent" | 184 | android:layout_width="match_parent" |
| 184 | - android:layout_height="1dp" | 185 | + android:layout_height="0.5dp" |
| 185 | android:layout_marginLeft="15dp" | 186 | android:layout_marginLeft="15dp" |
| 186 | android:layout_marginRight="15dp" | 187 | android:layout_marginRight="15dp" |
| 187 | android:background="@color/bottomline" /> | 188 | android:background="@color/bottomline" /> |
| @@ -252,7 +253,7 @@ | @@ -252,7 +253,7 @@ | ||
| 252 | 253 | ||
| 253 | <TextView | 254 | <TextView |
| 254 | android:layout_width="match_parent" | 255 | android:layout_width="match_parent" |
| 255 | - android:layout_height="1dp" | 256 | + android:layout_height="0.5dp" |
| 256 | android:layout_marginLeft="15dp" | 257 | android:layout_marginLeft="15dp" |
| 257 | android:layout_marginRight="15dp" | 258 | android:layout_marginRight="15dp" |
| 258 | android:background="@color/bottomline" /> | 259 | android:background="@color/bottomline" /> |
| @@ -283,7 +284,7 @@ | @@ -283,7 +284,7 @@ | ||
| 283 | 284 | ||
| 284 | <TextView | 285 | <TextView |
| 285 | android:layout_width="match_parent" | 286 | android:layout_width="match_parent" |
| 286 | - android:layout_height="1dp" | 287 | + android:layout_height="0.5dp" |
| 287 | android:layout_marginLeft="15dp" | 288 | android:layout_marginLeft="15dp" |
| 288 | android:layout_marginRight="15dp" | 289 | android:layout_marginRight="15dp" |
| 289 | android:background="@color/bottomline" /> | 290 | android:background="@color/bottomline" /> |
app/src/main/res/layout/top.xml
| @@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
| 11 | android:paddingBottom="10dp" | 11 | android:paddingBottom="10dp" |
| 12 | > | 12 | > |
| 13 | <TextView | 13 | <TextView |
| 14 | + android:id="@+id/back_top" | ||
| 14 | android:layout_width="40dp" | 15 | android:layout_width="40dp" |
| 15 | android:layout_height="40dp" | 16 | android:layout_height="40dp" |
| 16 | android:layout_alignParentBottom="true" | 17 | android:layout_alignParentBottom="true" |