Commit 5d2e791de329408b558bb50fdb124612f2ab37f5
1 parent
de53e4b9
报名页面修改
Showing
7 changed files
with
22 additions
and
44 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RegistrationInfoView.java
| ... | ... | @@ -38,11 +38,11 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { |
| 38 | 38 | |
| 39 | 39 | public void initView() { |
| 40 | 40 | fragment.binding.topbar.addLeftImageButton(R.drawable.top_back_black, R.id.fragment_back).setOnClickListener(v -> { |
| 41 | - goLineDetail(); | |
| 41 | + fragment.getActivity().finish(); | |
| 42 | 42 | }); |
| 43 | 43 | fragment.binding.topbar.setTitle("填写报名信息"); |
| 44 | 44 | fragment.binding.commitInfo.setOnClickListener(v -> fragment.commitInfo()); |
| 45 | - fragment.binding.toLineDetail.setOnClickListener(v -> goLineDetail()); | |
| 45 | + fragment.binding.toLineDetail.setOnClickListener(v -> fragment.getActivity().finish()); | |
| 46 | 46 | sex = new BottomMenuDialog.Builder(fragment.getActivity()) |
| 47 | 47 | .addMenu("男", new View.OnClickListener() { |
| 48 | 48 | @Override |
| ... | ... | @@ -101,12 +101,6 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { |
| 101 | 101 | EventBus.getDefault().post(new MessageEvent(Constant.REGISTRATION_SUCCESS, "")); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - private void goLineDetail() { | |
| 105 | - Intent intent = new Intent(fragment.getActivity(), RunRaceDetailActivity.class); | |
| 106 | - intent.putExtra("isRegisterResult", true); | |
| 107 | - fragment.getActivity().setResult(1002, intent); | |
| 108 | - fragment.getActivity().finish(); | |
| 109 | - } | |
| 110 | 104 | |
| 111 | 105 | @Override |
| 112 | 106 | public void onDateSet(TimePickerDialog timePickerView, long millseconds) { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
| ... | ... | @@ -367,7 +367,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { |
| 367 | 367 | public void onClick(View view) { |
| 368 | 368 | //立即报名 |
| 369 | 369 | if ("0".equals(fragment.binding.rlScrollViewStartBtn.getTag())) { |
| 370 | - RegistrationInfoActivity.newInstance(fragment.getActivity(), 1001); | |
| 370 | + RegistrationInfoActivity.newInstance(fragment.getActivity()); | |
| 371 | 371 | } else { |
| 372 | 372 | startStepService(getContext()); |
| 373 | 373 | } | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoMaster.java
| ... | ... | @@ -21,14 +21,14 @@ public class DaoMaster extends AbstractDaoMaster { |
| 21 | 21 | |
| 22 | 22 | /** Creates underlying database table using DAOs. */ |
| 23 | 23 | public static void createAllTables(Database db, boolean ifNotExists) { |
| 24 | - CollUserStepEntityDao.createTable(db, ifNotExists); | |
| 25 | 24 | UserStepEntityDao.createTable(db, ifNotExists); |
| 25 | + CollUserStepEntityDao.createTable(db, ifNotExists); | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** Drops underlying database table using DAOs. */ |
| 29 | 29 | public static void dropAllTables(Database db, boolean ifExists) { |
| 30 | - CollUserStepEntityDao.dropTable(db, ifExists); | |
| 31 | 30 | UserStepEntityDao.dropTable(db, ifExists); |
| 31 | + CollUserStepEntityDao.dropTable(db, ifExists); | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| ... | ... | @@ -47,8 +47,8 @@ public class DaoMaster extends AbstractDaoMaster { |
| 47 | 47 | |
| 48 | 48 | public DaoMaster(Database db) { |
| 49 | 49 | super(db, SCHEMA_VERSION); |
| 50 | - registerDaoClass(CollUserStepEntityDao.class); | |
| 51 | 50 | registerDaoClass(UserStepEntityDao.class); |
| 51 | + registerDaoClass(CollUserStepEntityDao.class); | |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | public DaoSession newSession() { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoSession.java
| ... | ... | @@ -8,11 +8,11 @@ import org.greenrobot.greendao.database.Database; |
| 8 | 8 | import org.greenrobot.greendao.identityscope.IdentityScopeType; |
| 9 | 9 | import org.greenrobot.greendao.internal.DaoConfig; |
| 10 | 10 | |
| 11 | -import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity; | |
| 12 | 11 | import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; |
| 12 | +import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity; | |
| 13 | 13 | |
| 14 | -import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; | |
| 15 | 14 | import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; |
| 15 | +import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; | |
| 16 | 16 | |
| 17 | 17 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. |
| 18 | 18 | |
| ... | ... | @@ -23,40 +23,40 @@ import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; |
| 23 | 23 | */ |
| 24 | 24 | public class DaoSession extends AbstractDaoSession { |
| 25 | 25 | |
| 26 | - private final DaoConfig collUserStepEntityDaoConfig; | |
| 27 | 26 | private final DaoConfig userStepEntityDaoConfig; |
| 27 | + private final DaoConfig collUserStepEntityDaoConfig; | |
| 28 | 28 | |
| 29 | - private final CollUserStepEntityDao collUserStepEntityDao; | |
| 30 | 29 | private final UserStepEntityDao userStepEntityDao; |
| 30 | + private final CollUserStepEntityDao collUserStepEntityDao; | |
| 31 | 31 | |
| 32 | 32 | public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> |
| 33 | 33 | daoConfigMap) { |
| 34 | 34 | super(db); |
| 35 | 35 | |
| 36 | - collUserStepEntityDaoConfig = daoConfigMap.get(CollUserStepEntityDao.class).clone(); | |
| 37 | - collUserStepEntityDaoConfig.initIdentityScope(type); | |
| 38 | - | |
| 39 | 36 | userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone(); |
| 40 | 37 | userStepEntityDaoConfig.initIdentityScope(type); |
| 41 | 38 | |
| 42 | - collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this); | |
| 39 | + collUserStepEntityDaoConfig = daoConfigMap.get(CollUserStepEntityDao.class).clone(); | |
| 40 | + collUserStepEntityDaoConfig.initIdentityScope(type); | |
| 41 | + | |
| 43 | 42 | userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this); |
| 43 | + collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this); | |
| 44 | 44 | |
| 45 | - registerDao(CollUserStepEntity.class, collUserStepEntityDao); | |
| 46 | 45 | registerDao(UserStepEntity.class, userStepEntityDao); |
| 46 | + registerDao(CollUserStepEntity.class, collUserStepEntityDao); | |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | public void clear() { |
| 50 | - collUserStepEntityDaoConfig.clearIdentityScope(); | |
| 51 | 50 | userStepEntityDaoConfig.clearIdentityScope(); |
| 52 | - } | |
| 53 | - | |
| 54 | - public CollUserStepEntityDao getCollUserStepEntityDao() { | |
| 55 | - return collUserStepEntityDao; | |
| 51 | + collUserStepEntityDaoConfig.clearIdentityScope(); | |
| 56 | 52 | } |
| 57 | 53 | |
| 58 | 54 | public UserStepEntityDao getUserStepEntityDao() { |
| 59 | 55 | return userStepEntityDao; |
| 60 | 56 | } |
| 61 | 57 | |
| 58 | + public CollUserStepEntityDao getCollUserStepEntityDao() { | |
| 59 | + return collUserStepEntityDao; | |
| 60 | + } | |
| 61 | + | |
| 62 | 62 | } | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RegistrationInfoActivity.java
| ... | ... | @@ -16,9 +16,9 @@ import com.example.moudle_pedometer.R; |
| 16 | 16 | */ |
| 17 | 17 | public class RegistrationInfoActivity extends AppCompatActivity { |
| 18 | 18 | |
| 19 | - public static void newInstance(Activity context,int resultCode){ | |
| 19 | + public static void newInstance(Activity context){ | |
| 20 | 20 | Intent intent = new Intent(context,RegistrationInfoActivity.class); |
| 21 | - context.startActivityForResult(intent,resultCode); | |
| 21 | + context.startActivity(intent); | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | @Override | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunRaceDetailActivity.java
| ... | ... | @@ -76,14 +76,6 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | @Override |
| 79 | - protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { | |
| 80 | - super.onActivityResult(requestCode, resultCode, data); | |
| 81 | - if (resultCode == 1002) { | |
| 82 | - | |
| 83 | - } | |
| 84 | - } | |
| 85 | - | |
| 86 | - @Override | |
| 87 | 79 | public void onBackPressed() { |
| 88 | 80 | super.onBackPressed(); |
| 89 | 81 | if (getCurrentFragment()!=null) { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RegistrationInfoFragment.java
| ... | ... | @@ -38,8 +38,6 @@ import com.example.moudle_pedometer.R; |
| 38 | 38 | import com.example.moudle_pedometer.databinding.FragmentRegistrationInfoBinding; |
| 39 | 39 | import com.jzxiang.pickerview.TimePickerDialog; |
| 40 | 40 | |
| 41 | -import java.util.ArrayList; | |
| 42 | -import java.util.List; | |
| 43 | 41 | |
| 44 | 42 | /** |
| 45 | 43 | * Created by hanyayun 019/05/29. |
| ... | ... | @@ -48,7 +46,6 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf |
| 48 | 46 | |
| 49 | 47 | |
| 50 | 48 | public TimePickerDialog pickerDialog; |
| 51 | - private final String TAG = "RegistrationInfo"; | |
| 52 | 49 | |
| 53 | 50 | public static RegistrationInfoFragment newInstance() { |
| 54 | 51 | RegistrationInfoFragment fragment = new RegistrationInfoFragment(); |
| ... | ... | @@ -67,10 +64,6 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf |
| 67 | 64 | } |
| 68 | 65 | |
| 69 | 66 | public void commitInfo() { |
| 70 | - | |
| 71 | -// getPresenter().commitInfo(getActivity(), CommonInfo.getStreetId(getActivity()), "10514343", "15210479774", | |
| 72 | -// binding.sexText.getText().toString().trim().equals("未选择") ? "" : binding.sexText.getText().toString().trim(), | |
| 73 | -// binding.birthday.getText().toString().trim().equals("未选择") ? "" : binding.birthday.getText().toString().trim()); | |
| 74 | 67 | addMonitorToFence(1); |
| 75 | 68 | } |
| 76 | 69 | |
| ... | ... | @@ -143,7 +136,6 @@ public class RegistrationInfoFragment extends MvpBindingFragment<RegistrationInf |
| 143 | 136 | } else { |
| 144 | 137 | QMUITipDialogUtil.dismessDialog(); |
| 145 | 138 | } |
| 146 | - | |
| 147 | 139 | } |
| 148 | 140 | |
| 149 | 141 | @Override | ... | ... |