Commit c754427ccb5d2257755fad54536df1125b0a4f1d
1.更改计步相关逻辑
Showing
22 changed files
with
144 additions
and
97 deletions
.idea/gradle.xml
| @@ -3,9 +3,6 @@ | @@ -3,9 +3,6 @@ | ||
| 3 | <component name="GradleSettings"> | 3 | <component name="GradleSettings"> |
| 4 | <option name="linkedExternalProjectsSettings"> | 4 | <option name="linkedExternalProjectsSettings"> |
| 5 | <GradleProjectSettings> | 5 | <GradleProjectSettings> |
| 6 | - <compositeConfiguration> | ||
| 7 | - <compositeBuild compositeDefinitionSource="SCRIPT" /> | ||
| 8 | - </compositeConfiguration> | ||
| 9 | <option name="distributionType" value="DEFAULT_WRAPPED" /> | 6 | <option name="distributionType" value="DEFAULT_WRAPPED" /> |
| 10 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | 7 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> |
| 11 | <option name="modules"> | 8 | <option name="modules"> |
app/src/main/java/com/example/modulepedometer/MainActivity.java
| @@ -14,7 +14,7 @@ public class MainActivity extends AppCompatActivity { | @@ -14,7 +14,7 @@ public class MainActivity extends AppCompatActivity { | ||
| 14 | protected void onCreate(Bundle savedInstanceState) { | 14 | protected void onCreate(Bundle savedInstanceState) { |
| 15 | super.onCreate(savedInstanceState); | 15 | super.onCreate(savedInstanceState); |
| 16 | setContentView(R.layout.activity_main); | 16 | setContentView(R.layout.activity_main); |
| 17 | -// Intent intent = new Intent(this, RunLineActivity.class); | 17 | +// RunLineActivity.newInstance(this,null,null,null); |
| 18 | Intent intent = new Intent(this, CollRunRaceDetailActivity.class); | 18 | Intent intent = new Intent(this, CollRunRaceDetailActivity.class); |
| 19 | startActivity(intent); | 19 | startActivity(intent); |
| 20 | // ARouter.getInstance() | 20 | // ARouter.getInstance() |
config.gradle
moudle_pedometer/src/main/AndroidManifest.xml
| @@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
| 52 | android:required="true" /> | 52 | android:required="true" /> |
| 53 | 53 | ||
| 54 | <application android:persistent="true"> | 54 | <application android:persistent="true"> |
| 55 | - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.LineUpAgainActivity"></activity> | 55 | + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.LineUpAgainActivity" /> |
| 56 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity" /> | 56 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity" /> |
| 57 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.TakePartActivity" /> | 57 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.TakePartActivity" /> |
| 58 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RunLineActivity" /> | 58 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RunLineActivity" /> |
| @@ -96,7 +96,6 @@ | @@ -96,7 +96,6 @@ | ||
| 96 | <action android:name="android.service.notification.NotificationListenerService" /> | 96 | <action android:name="android.service.notification.NotificationListenerService" /> |
| 97 | </intent-filter> | 97 | </intent-filter> |
| 98 | </service> | 98 | </service> |
| 99 | - | ||
| 100 | <service | 99 | <service |
| 101 | android:name="com.cnlive.moudle.pedometer.service.KeepLiveService" | 100 | android:name="com.cnlive.moudle.pedometer.service.KeepLiveService" |
| 102 | android:enabled="true" | 101 | android:enabled="true" |
| @@ -128,9 +127,7 @@ | @@ -128,9 +127,7 @@ | ||
| 128 | android:process=":step" /> | 127 | android:process=":step" /> |
| 129 | <activity | 128 | <activity |
| 130 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunningFinishActivity" | 129 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunningFinishActivity" |
| 131 | - android:process=":step" /> | ||
| 132 | - | ||
| 133 | - <!--路径工具--> | 130 | + android:process=":step" /> <!-- 路径工具 --> |
| 134 | <service | 131 | <service |
| 135 | android:name="com.cnlive.moudle.collectionTrace.service.CollKeepLiveService" | 132 | android:name="com.cnlive.moudle.collectionTrace.service.CollKeepLiveService" |
| 136 | android:enabled="true" | 133 | android:enabled="true" |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/fragment/CollRunRaceDetailFragment.java
| @@ -61,7 +61,7 @@ public class CollRunRaceDetailFragment extends QMUIFragment<CollRunRaceDetailFra | @@ -61,7 +61,7 @@ public class CollRunRaceDetailFragment extends QMUIFragment<CollRunRaceDetailFra | ||
| 61 | public void onClick(View view) { | 61 | public void onClick(View view) { |
| 62 | //todo 自己测试用 | 62 | //todo 自己测试用 |
| 63 | getActivity().finish(); | 63 | getActivity().finish(); |
| 64 | - getActivity().startActivity(new Intent(getActivity(), RunLineActivity.class)); | 64 | + RunLineActivity.newInstance(getActivity(),null,null,null); |
| 65 | } | 65 | } |
| 66 | }); | 66 | }); |
| 67 | } | 67 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/commonInfo/CommonInfo.java
| @@ -218,6 +218,29 @@ public class CommonInfo { | @@ -218,6 +218,29 @@ public class CommonInfo { | ||
| 218 | * 设置用户头像 | 218 | * 设置用户头像 |
| 219 | * | 219 | * |
| 220 | * @param context | 220 | * @param context |
| 221 | + * @param userIcon | ||
| 222 | + */ | ||
| 223 | + public static void setUserIcon(Context context, String userIcon) { | ||
| 224 | + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("RunUserNickIcon", userIcon); | ||
| 225 | + | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + /** | ||
| 229 | + * 获取用户昵称 | ||
| 230 | + * | ||
| 231 | + * @param context | ||
| 232 | + */ | ||
| 233 | + public static String getUserIcon(Context context) { | ||
| 234 | + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("RunUserNickIcon", ""); | ||
| 235 | + public static String getUserNickName(Context context) { | ||
| 236 | + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("RunUserNickName", ""); | ||
| 237 | + | ||
| 238 | + } | ||
| 239 | + | ||
| 240 | + /** | ||
| 241 | + * 设置用户头像 | ||
| 242 | + * | ||
| 243 | + * @param context | ||
| 221 | */ | 244 | */ |
| 222 | public static void setUserFaceUrl(Context context, String faceUrl) { | 245 | public static void setUserFaceUrl(Context context, String faceUrl) { |
| 223 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("RunUserFaceUrl", faceUrl); | 246 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("RunUserFaceUrl", faceUrl); |
| @@ -251,5 +274,4 @@ public class CommonInfo { | @@ -251,5 +274,4 @@ public class CommonInfo { | ||
| 251 | } | 274 | } |
| 252 | 275 | ||
| 253 | 276 | ||
| 254 | - | ||
| 255 | } | 277 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/MyRecordView.java
| @@ -48,7 +48,7 @@ public class MyRecordView implements MvpView { | @@ -48,7 +48,7 @@ public class MyRecordView implements MvpView { | ||
| 48 | adapter.setClickListener(new MyRecordAdapter.OnClickListener() { | 48 | adapter.setClickListener(new MyRecordAdapter.OnClickListener() { |
| 49 | @Override | 49 | @Override |
| 50 | public void onClickListener(MyRecordInfo.ListBean bean, int position) { | 50 | public void onClickListener(MyRecordInfo.ListBean bean, int position) { |
| 51 | - RunRaceDetailActivity.startActivity(fragment.getActivity(),bean.getId()+""); | 51 | + RunRaceDetailActivity.startActivity(fragment.getActivity(),bean.getId()+"",null,null,null); |
| 52 | } | 52 | } |
| 53 | }); | 53 | }); |
| 54 | }else { | 54 | }else { |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RegistrationInfoView.java
| @@ -2,6 +2,11 @@ package com.cnlive.moudle.pedometer.frame.view; | @@ -2,6 +2,11 @@ package com.cnlive.moudle.pedometer.frame.view; | ||
| 2 | 2 | ||
| 3 | import android.view.View; | 3 | import android.view.View; |
| 4 | 4 | ||
| 5 | +import com.bumptech.glide.Glide; | ||
| 6 | +import com.bumptech.glide.load.resource.bitmap.CircleCrop; | ||
| 7 | +import com.bumptech.glide.request.RequestOptions; | ||
| 8 | +import com.cnlive.libs.base.util.AlertUtil; | ||
| 9 | +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | ||
| 5 | import com.cnlive.moudle.pedometer.model.Constant; | 10 | import com.cnlive.moudle.pedometer.model.Constant; |
| 6 | import com.cnlive.moudle.pedometer.model.MessageEvent; | 11 | import com.cnlive.moudle.pedometer.model.MessageEvent; |
| 7 | import com.cnlive.moudle.pedometer.ui.fragment.RegistrationInfoFragment; | 12 | import com.cnlive.moudle.pedometer.ui.fragment.RegistrationInfoFragment; |
| @@ -39,8 +44,16 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | @@ -39,8 +44,16 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | ||
| 39 | fragment.getActivity().finish(); | 44 | fragment.getActivity().finish(); |
| 40 | }); | 45 | }); |
| 41 | fragment.binding.topbar.setTitle("填写报名信息"); | 46 | fragment.binding.topbar.setTitle("填写报名信息"); |
| 47 | + if(CommonInfo.getUserNickName(fragment.getActivity()) != null && CommonInfo.getUserNickName(fragment.getActivity()).trim().length() > 0){ | ||
| 48 | + fragment.binding.userName.setText(CommonInfo.getUserNickName(fragment.getActivity())); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + if(CommonInfo.getUserIcon(fragment.getActivity()) != null && CommonInfo.getUserIcon(fragment.getActivity()).trim().length() > 0){ | ||
| 52 | + Glide.with(fragment.getActivity()).load(CommonInfo.getUserIcon(fragment.getActivity())) | ||
| 53 | + .apply(RequestOptions.bitmapTransform(new CircleCrop()).placeholder(R.drawable.ic_icon)).into( fragment.binding.userIcon); | ||
| 54 | + } | ||
| 55 | + | ||
| 42 | fragment.binding.commitInfo.setOnClickListener(v -> fragment.commitInfo()); | 56 | fragment.binding.commitInfo.setOnClickListener(v -> fragment.commitInfo()); |
| 43 | - fragment.binding.toLineDetail.setOnClickListener(v -> fragment.getActivity().finish()); | ||
| 44 | sex = new BottomMenuDialog.Builder(fragment.getActivity()) | 57 | sex = new BottomMenuDialog.Builder(fragment.getActivity()) |
| 45 | .addMenu("男", new View.OnClickListener() { | 58 | .addMenu("男", new View.OnClickListener() { |
| 46 | @Override | 59 | @Override |
| @@ -93,10 +106,9 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | @@ -93,10 +106,9 @@ public class RegistrationInfoView implements MvpView, OnDateSetListener { | ||
| 93 | } | 106 | } |
| 94 | 107 | ||
| 95 | public void toResult() { | 108 | public void toResult() { |
| 96 | - fragment.binding.registerLy.setVisibility(View.GONE); | ||
| 97 | - fragment.binding.commitInfo.setVisibility(View.GONE); | ||
| 98 | - fragment.binding.resultLy.setVisibility(View.VISIBLE); | ||
| 99 | EventBus.getDefault().post(new MessageEvent(Constant.REGISTRATION_SUCCESS, "")); | 109 | EventBus.getDefault().post(new MessageEvent(Constant.REGISTRATION_SUCCESS, "")); |
| 110 | + AlertUtil.showLongToast(fragment.getActivity(),"恭喜你报名成功",3000); | ||
| 111 | + fragment.getActivity().finish(); | ||
| 100 | } | 112 | } |
| 101 | 113 | ||
| 102 | 114 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunLineView.java
| @@ -42,7 +42,7 @@ public class RunLineView implements MvpView { | @@ -42,7 +42,7 @@ public class RunLineView implements MvpView { | ||
| 42 | fragment.binding.refreshLayout.setRefreshHeader(new ClassicsHeader(fragment.getActivity())); | 42 | fragment.binding.refreshLayout.setRefreshHeader(new ClassicsHeader(fragment.getActivity())); |
| 43 | fragment.binding.refreshLayout.setRefreshFooter(new ClassicsFooter(fragment.getActivity())); | 43 | fragment.binding.refreshLayout.setRefreshFooter(new ClassicsFooter(fragment.getActivity())); |
| 44 | fragment.binding.backBtn.setOnClickListener(v -> fragment.getActivity().finish()); | 44 | fragment.binding.backBtn.setOnClickListener(v -> fragment.getActivity().finish()); |
| 45 | - fragment.binding.myActivity.setOnClickListener(v -> MyRecordActivity.newInstance(fragment.getActivity())); | 45 | + fragment.binding.myActivity.setOnClickListener(v -> MyRecordActivity.newInstance(fragment.getActivity(),null,null,null)); |
| 46 | 46 | ||
| 47 | fragment.binding.runLineRecy.setLayoutManager(new LinearLayoutManager(fragment.getActivity())); | 47 | fragment.binding.runLineRecy.setLayoutManager(new LinearLayoutManager(fragment.getActivity())); |
| 48 | } | 48 | } |
| @@ -58,7 +58,7 @@ public class RunLineView implements MvpView { | @@ -58,7 +58,7 @@ public class RunLineView implements MvpView { | ||
| 58 | adapter.setClickListener(new RunLineAdapter.OnClickListener() { | 58 | adapter.setClickListener(new RunLineAdapter.OnClickListener() { |
| 59 | @Override | 59 | @Override |
| 60 | public void onClickListener(RunLineInfo.ListBean bean, int position) { | 60 | public void onClickListener(RunLineInfo.ListBean bean, int position) { |
| 61 | - RunRaceDetailActivity.startActivity(fragment.getActivity(),bean.getId()+""); | 61 | + RunRaceDetailActivity.startActivity(fragment.getActivity(),bean.getId()+"",null,null,null); |
| 62 | } | 62 | } |
| 63 | }); | 63 | }); |
| 64 | }else { | 64 | }else { |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
| @@ -15,6 +15,7 @@ import android.view.View; | @@ -15,6 +15,7 @@ import android.view.View; | ||
| 15 | import android.widget.LinearLayout; | 15 | import android.widget.LinearLayout; |
| 16 | import android.widget.Toast; | 16 | import android.widget.Toast; |
| 17 | 17 | ||
| 18 | +import com.alibaba.android.arouter.launcher.ARouter; | ||
| 18 | import com.baidu.location.BDAbstractLocationListener; | 19 | import com.baidu.location.BDAbstractLocationListener; |
| 19 | import com.baidu.location.BDLocation; | 20 | import com.baidu.location.BDLocation; |
| 20 | import com.baidu.location.LocationClient; | 21 | import com.baidu.location.LocationClient; |
| @@ -443,7 +444,10 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -443,7 +444,10 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 443 | fragment.binding.includeRank.tvCatAllRank.setOnClickListener(new View.OnClickListener() { | 444 | fragment.binding.includeRank.tvCatAllRank.setOnClickListener(new View.OnClickListener() { |
| 444 | @Override | 445 | @Override |
| 445 | public void onClick(View view) { | 446 | public void onClick(View view) { |
| 446 | - | 447 | + ARouter.getInstance().build("/web/WebViewColorActivity") |
| 448 | + .withString("url", "http://wjjh5test.cnlive.com/cnSportList.html") | ||
| 449 | + .withString("title",runRaceDetailInfo.getTitle()+"排行榜") | ||
| 450 | + .navigation(fragment.getActivity()); | ||
| 447 | } | 451 | } |
| 448 | }); | 452 | }); |
| 449 | } | 453 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/SelfRecordView.java
| @@ -120,8 +120,7 @@ public class SelfRecordView implements MvpView { | @@ -120,8 +120,7 @@ public class SelfRecordView implements MvpView { | ||
| 120 | fragment.binding.finishNum.setText("0"); | 120 | fragment.binding.finishNum.setText("0"); |
| 121 | fragment.binding.allTime.setText("00:00:00"); | 121 | fragment.binding.allTime.setText("00:00:00"); |
| 122 | fragment.binding.checkAllLine.setOnClickListener(v -> { | 122 | fragment.binding.checkAllLine.setOnClickListener(v -> { |
| 123 | - Intent intent = new Intent(fragment.getActivity(), RunLineActivity.class); | ||
| 124 | - fragment.getActivity().startActivity(intent); | 123 | + RunLineActivity.newInstance(fragment.getActivity(),null,null,null); |
| 125 | }); | 124 | }); |
| 126 | } | 125 | } |
| 127 | 126 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoMaster.java
| @@ -21,14 +21,14 @@ public class DaoMaster extends AbstractDaoMaster { | @@ -21,14 +21,14 @@ public class DaoMaster extends AbstractDaoMaster { | ||
| 21 | 21 | ||
| 22 | /** Creates underlying database table using DAOs. */ | 22 | /** Creates underlying database table using DAOs. */ |
| 23 | public static void createAllTables(Database db, boolean ifNotExists) { | 23 | public static void createAllTables(Database db, boolean ifNotExists) { |
| 24 | - CollUserStepEntityDao.createTable(db, ifNotExists); | ||
| 25 | UserStepEntityDao.createTable(db, ifNotExists); | 24 | UserStepEntityDao.createTable(db, ifNotExists); |
| 25 | + CollUserStepEntityDao.createTable(db, ifNotExists); | ||
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | /** Drops underlying database table using DAOs. */ | 28 | /** Drops underlying database table using DAOs. */ |
| 29 | public static void dropAllTables(Database db, boolean ifExists) { | 29 | public static void dropAllTables(Database db, boolean ifExists) { |
| 30 | - CollUserStepEntityDao.dropTable(db, ifExists); | ||
| 31 | UserStepEntityDao.dropTable(db, ifExists); | 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,8 +47,8 @@ public class DaoMaster extends AbstractDaoMaster { | ||
| 47 | 47 | ||
| 48 | public DaoMaster(Database db) { | 48 | public DaoMaster(Database db) { |
| 49 | super(db, SCHEMA_VERSION); | 49 | super(db, SCHEMA_VERSION); |
| 50 | - registerDaoClass(CollUserStepEntityDao.class); | ||
| 51 | registerDaoClass(UserStepEntityDao.class); | 50 | registerDaoClass(UserStepEntityDao.class); |
| 51 | + registerDaoClass(CollUserStepEntityDao.class); | ||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | public DaoSession newSession() { | 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,11 +8,11 @@ import org.greenrobot.greendao.database.Database; | ||
| 8 | import org.greenrobot.greendao.identityscope.IdentityScopeType; | 8 | import org.greenrobot.greendao.identityscope.IdentityScopeType; |
| 9 | import org.greenrobot.greendao.internal.DaoConfig; | 9 | import org.greenrobot.greendao.internal.DaoConfig; |
| 10 | 10 | ||
| 11 | -import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity; | ||
| 12 | import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; | 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 | import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; | 14 | import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; |
| 15 | +import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; | ||
| 16 | 16 | ||
| 17 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. | 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,40 +23,40 @@ import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; | ||
| 23 | */ | 23 | */ |
| 24 | public class DaoSession extends AbstractDaoSession { | 24 | public class DaoSession extends AbstractDaoSession { |
| 25 | 25 | ||
| 26 | - private final DaoConfig collUserStepEntityDaoConfig; | ||
| 27 | private final DaoConfig userStepEntityDaoConfig; | 26 | private final DaoConfig userStepEntityDaoConfig; |
| 27 | + private final DaoConfig collUserStepEntityDaoConfig; | ||
| 28 | 28 | ||
| 29 | - private final CollUserStepEntityDao collUserStepEntityDao; | ||
| 30 | private final UserStepEntityDao userStepEntityDao; | 29 | private final UserStepEntityDao userStepEntityDao; |
| 30 | + private final CollUserStepEntityDao collUserStepEntityDao; | ||
| 31 | 31 | ||
| 32 | public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> | 32 | public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> |
| 33 | daoConfigMap) { | 33 | daoConfigMap) { |
| 34 | super(db); | 34 | super(db); |
| 35 | 35 | ||
| 36 | - collUserStepEntityDaoConfig = daoConfigMap.get(CollUserStepEntityDao.class).clone(); | ||
| 37 | - collUserStepEntityDaoConfig.initIdentityScope(type); | ||
| 38 | - | ||
| 39 | userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone(); | 36 | userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone(); |
| 40 | userStepEntityDaoConfig.initIdentityScope(type); | 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 | userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this); | 42 | userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this); |
| 43 | + collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this); | ||
| 44 | 44 | ||
| 45 | - registerDao(CollUserStepEntity.class, collUserStepEntityDao); | ||
| 46 | registerDao(UserStepEntity.class, userStepEntityDao); | 45 | registerDao(UserStepEntity.class, userStepEntityDao); |
| 46 | + registerDao(CollUserStepEntity.class, collUserStepEntityDao); | ||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | public void clear() { | 49 | public void clear() { |
| 50 | - collUserStepEntityDaoConfig.clearIdentityScope(); | ||
| 51 | userStepEntityDaoConfig.clearIdentityScope(); | 50 | userStepEntityDaoConfig.clearIdentityScope(); |
| 52 | - } | ||
| 53 | - | ||
| 54 | - public CollUserStepEntityDao getCollUserStepEntityDao() { | ||
| 55 | - return collUserStepEntityDao; | 51 | + collUserStepEntityDaoConfig.clearIdentityScope(); |
| 56 | } | 52 | } |
| 57 | 53 | ||
| 58 | public UserStepEntityDao getUserStepEntityDao() { | 54 | public UserStepEntityDao getUserStepEntityDao() { |
| 59 | return userStepEntityDao; | 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/MyRecordActivity.java
| @@ -12,6 +12,7 @@ import android.os.Bundle; | @@ -12,6 +12,7 @@ import android.os.Bundle; | ||
| 12 | 12 | ||
| 13 | import com.cnlive.libs.base.util.StatusBarUtil; | 13 | import com.cnlive.libs.base.util.StatusBarUtil; |
| 14 | import com.cnlive.libs.base.util.StatusBarUtil2; | 14 | import com.cnlive.libs.base.util.StatusBarUtil2; |
| 15 | +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | ||
| 15 | import com.cnlive.moudle.pedometer.ui.fragment.MyRecordFragment; | 16 | import com.cnlive.moudle.pedometer.ui.fragment.MyRecordFragment; |
| 16 | import com.example.moudle_pedometer.R; | 17 | import com.example.moudle_pedometer.R; |
| 17 | import com.qmuiteam.qmui.widget.QMUITopBar; | 18 | import com.qmuiteam.qmui.widget.QMUITopBar; |
| @@ -31,8 +32,11 @@ public class MyRecordActivity extends AppCompatActivity { | @@ -31,8 +32,11 @@ public class MyRecordActivity extends AppCompatActivity { | ||
| 31 | private TabLayout tabs; | 32 | private TabLayout tabs; |
| 32 | private ViewPager viewPager; | 33 | private ViewPager viewPager; |
| 33 | 34 | ||
| 34 | - public static void newInstance(Activity context){ | 35 | + public static void newInstance(Activity context,String userId,String userIcon,String userName){ |
| 35 | Intent intent = new Intent(context,MyRecordActivity.class); | 36 | Intent intent = new Intent(context,MyRecordActivity.class); |
| 37 | + intent.putExtra("userId",userId); | ||
| 38 | + intent.putExtra("userIcon",userIcon); | ||
| 39 | + intent.putExtra("userName",userName); | ||
| 36 | context.startActivity(intent); | 40 | context.startActivity(intent); |
| 37 | } | 41 | } |
| 38 | 42 | ||
| @@ -43,6 +47,12 @@ public class MyRecordActivity extends AppCompatActivity { | @@ -43,6 +47,12 @@ public class MyRecordActivity extends AppCompatActivity { | ||
| 43 | StatusBarUtil2.setColor(this, getResources().getColor(R.color.color_fff), 0); | 47 | StatusBarUtil2.setColor(this, getResources().getColor(R.color.color_fff), 0); |
| 44 | setContentView(R.layout.activity_my_record); | 48 | setContentView(R.layout.activity_my_record); |
| 45 | 49 | ||
| 50 | + if(getIntent().getStringExtra("userId") != null){ | ||
| 51 | + CommonInfo.setUserId(this,getIntent().getStringExtra("userId")); | ||
| 52 | + CommonInfo.setUserNickName(this,getIntent().getStringExtra("userName")); | ||
| 53 | + CommonInfo.setUserIcon(this,getIntent().getStringExtra("userIcon")); | ||
| 54 | + } | ||
| 55 | + | ||
| 46 | topBar = findViewById(R.id.topbar); | 56 | topBar = findViewById(R.id.topbar); |
| 47 | tabs = findViewById(R.id.tabs); | 57 | tabs = findViewById(R.id.tabs); |
| 48 | viewPager = findViewById(R.id.viewpager); | 58 | viewPager = findViewById(R.id.viewpager); |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunLineActivity.java
| @@ -16,6 +16,14 @@ import com.example.moudle_pedometer.R; | @@ -16,6 +16,14 @@ import com.example.moudle_pedometer.R; | ||
| 16 | */ | 16 | */ |
| 17 | public class RunLineActivity extends AppCompatActivity { | 17 | public class RunLineActivity extends AppCompatActivity { |
| 18 | 18 | ||
| 19 | + public static void newInstance(Activity context, String userId, String userIcon, String userName){ | ||
| 20 | + Intent intent = new Intent(context,RunLineActivity.class); | ||
| 21 | + intent.putExtra("userId",userId); | ||
| 22 | + intent.putExtra("userIcon",userIcon); | ||
| 23 | + intent.putExtra("userName",userName); | ||
| 24 | + context.startActivity(intent); | ||
| 25 | + } | ||
| 26 | + | ||
| 19 | @Override | 27 | @Override |
| 20 | protected void onCreate(Bundle savedInstanceState) { | 28 | protected void onCreate(Bundle savedInstanceState) { |
| 21 | super.onCreate(savedInstanceState); | 29 | super.onCreate(savedInstanceState); |
| @@ -23,12 +31,13 @@ public class RunLineActivity extends AppCompatActivity { | @@ -23,12 +31,13 @@ public class RunLineActivity extends AppCompatActivity { | ||
| 23 | StatusBarUtil2.setColor(this, getResources().getColor(R.color.color_fff), 0); | 31 | StatusBarUtil2.setColor(this, getResources().getColor(R.color.color_fff), 0); |
| 24 | setContentView(R.layout.activity_run_line); | 32 | setContentView(R.layout.activity_run_line); |
| 25 | 33 | ||
| 26 | - CommonInfo.setUserId(this, "10513196"); | ||
| 27 | - //设置用户昵称 | ||
| 28 | - CommonInfo.setUserNickName(this, "测试账号"); | ||
| 29 | - //设置用户头像 | ||
| 30 | - | ||
| 31 | - CommonInfo.setUserFaceUrl(this, "http://yweb0.cnliveimg.com/images/headImg/2019/0505/1557039035723_small.jpg"); | 34 | + if(getIntent().getStringExtra("userId") != null){ |
| 35 | + CommonInfo.setUserId(this,getIntent().getStringExtra("userId")); | ||
| 36 | + CommonInfo.setUserNickName(this,getIntent().getStringExtra("userName")); | ||
| 37 | + CommonInfo.setUserIcon(this,getIntent().getStringExtra("userIcon")); | ||
| 38 | + }else { | ||
| 39 | + CommonInfo.setUserId(this, "10513196"); | ||
| 40 | + } | ||
| 32 | getSupportFragmentManager().beginTransaction().replace(R.id.run_line_container, new RunLineFragment()).commit(); | 41 | getSupportFragmentManager().beginTransaction().replace(R.id.run_line_container, new RunLineFragment()).commit(); |
| 33 | } | 42 | } |
| 34 | } | 43 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunRaceDetailActivity.java
| @@ -38,9 +38,12 @@ import java.util.List; | @@ -38,9 +38,12 @@ import java.util.List; | ||
| 38 | public class RunRaceDetailActivity extends QMUIFragmentActivity { | 38 | public class RunRaceDetailActivity extends QMUIFragmentActivity { |
| 39 | private QMUIFragment fragment; | 39 | private QMUIFragment fragment; |
| 40 | 40 | ||
| 41 | - public static void startActivity(Activity activity, String eventId) { | 41 | + public static void startActivity(Activity activity, String eventId,String userId,String userIcon,String userName) { |
| 42 | Intent intent = new Intent(activity, RunRaceDetailActivity.class); | 42 | Intent intent = new Intent(activity, RunRaceDetailActivity.class); |
| 43 | intent.putExtra("eventId", eventId); | 43 | intent.putExtra("eventId", eventId); |
| 44 | + intent.putExtra("userId",userId); | ||
| 45 | + intent.putExtra("userIcon",userIcon); | ||
| 46 | + intent.putExtra("userName",userName); | ||
| 44 | CommonInfo.setStreetId(activity, eventId); | 47 | CommonInfo.setStreetId(activity, eventId); |
| 45 | activity.startActivity(intent); | 48 | activity.startActivity(intent); |
| 46 | } | 49 | } |
| @@ -53,6 +56,12 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { | @@ -53,6 +56,12 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { | ||
| 53 | @Override | 56 | @Override |
| 54 | protected void onCreate(Bundle savedInstanceState) { | 57 | protected void onCreate(Bundle savedInstanceState) { |
| 55 | super.onCreate(savedInstanceState); | 58 | super.onCreate(savedInstanceState); |
| 59 | + | ||
| 60 | + if(getIntent().getStringExtra("userId") != null){ | ||
| 61 | + CommonInfo.setUserId(this,getIntent().getStringExtra("userId")); | ||
| 62 | + CommonInfo.setUserNickName(this,getIntent().getStringExtra("userName")); | ||
| 63 | + CommonInfo.setUserIcon(this,getIntent().getStringExtra("userIcon")); | ||
| 64 | + } | ||
| 56 | //判断用户是否结束运动 | 65 | //判断用户是否结束运动 |
| 57 | // boolean isRunStep = CommonInfo.getIsRunStepService(this); | 66 | // boolean isRunStep = CommonInfo.getIsRunStepService(this); |
| 58 | // //没有找到相关记录 | 67 | // //没有找到相关记录 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/SelfRecordActivity.java
| @@ -7,6 +7,7 @@ import android.os.Bundle; | @@ -7,6 +7,7 @@ import android.os.Bundle; | ||
| 7 | 7 | ||
| 8 | import com.cnlive.libs.base.util.StatusBarUtil; | 8 | import com.cnlive.libs.base.util.StatusBarUtil; |
| 9 | import com.cnlive.libs.base.util.StatusBarUtil2; | 9 | import com.cnlive.libs.base.util.StatusBarUtil2; |
| 10 | +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | ||
| 10 | import com.cnlive.moudle.pedometer.ui.fragment.SelfRecordFragment; | 11 | import com.cnlive.moudle.pedometer.ui.fragment.SelfRecordFragment; |
| 11 | import com.example.moudle_pedometer.R; | 12 | import com.example.moudle_pedometer.R; |
| 12 | 13 | ||
| @@ -16,8 +17,11 @@ import com.example.moudle_pedometer.R; | @@ -16,8 +17,11 @@ import com.example.moudle_pedometer.R; | ||
| 16 | */ | 17 | */ |
| 17 | public class SelfRecordActivity extends AppCompatActivity { | 18 | public class SelfRecordActivity extends AppCompatActivity { |
| 18 | 19 | ||
| 19 | - public static void newInstance(Activity context){ | 20 | + public static void newInstance(Activity context,String userId,String userIcon,String userName){ |
| 20 | Intent intent = new Intent(context,SelfRecordActivity.class); | 21 | Intent intent = new Intent(context,SelfRecordActivity.class); |
| 22 | + intent.putExtra("userId",userId); | ||
| 23 | + intent.putExtra("userIcon",userIcon); | ||
| 24 | + intent.putExtra("userName",userName); | ||
| 21 | context.startActivity(intent); | 25 | context.startActivity(intent); |
| 22 | } | 26 | } |
| 23 | 27 | ||
| @@ -28,6 +32,11 @@ public class SelfRecordActivity extends AppCompatActivity { | @@ -28,6 +32,11 @@ public class SelfRecordActivity extends AppCompatActivity { | ||
| 28 | StatusBarUtil2.setColor(this, getResources().getColor(R.color.color_fff), 0); | 32 | StatusBarUtil2.setColor(this, getResources().getColor(R.color.color_fff), 0); |
| 29 | setContentView(R.layout.activity_self_record); | 33 | setContentView(R.layout.activity_self_record); |
| 30 | 34 | ||
| 35 | + if(getIntent().getStringExtra("userId") != null){ | ||
| 36 | + CommonInfo.setUserId(this,getIntent().getStringExtra("userId")); | ||
| 37 | + CommonInfo.setUserNickName(this,getIntent().getStringExtra("userName")); | ||
| 38 | + CommonInfo.setUserIcon(this,getIntent().getStringExtra("userIcon")); | ||
| 39 | + } | ||
| 31 | getSupportFragmentManager().beginTransaction().replace(R.id.record_container, new SelfRecordFragment()).commit(); | 40 | getSupportFragmentManager().beginTransaction().replace(R.id.record_container, new SelfRecordFragment()).commit(); |
| 32 | } | 41 | } |
| 33 | } | 42 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/ShareRecordActivity.java
| @@ -14,9 +14,13 @@ import android.widget.RelativeLayout; | @@ -14,9 +14,13 @@ import android.widget.RelativeLayout; | ||
| 14 | import android.widget.TextView; | 14 | import android.widget.TextView; |
| 15 | 15 | ||
| 16 | import com.alibaba.android.arouter.launcher.ARouter; | 16 | import com.alibaba.android.arouter.launcher.ARouter; |
| 17 | +import com.bumptech.glide.Glide; | ||
| 18 | +import com.bumptech.glide.load.resource.bitmap.CircleCrop; | ||
| 19 | +import com.bumptech.glide.request.RequestOptions; | ||
| 17 | import com.cnlive.libs.base.arouter.QrService; | 20 | import com.cnlive.libs.base.arouter.QrService; |
| 18 | import com.cnlive.libs.base.util.StatusBarUtil; | 21 | import com.cnlive.libs.base.util.StatusBarUtil; |
| 19 | import com.cnlive.libs.base.util.StatusBarUtil2; | 22 | import com.cnlive.libs.base.util.StatusBarUtil2; |
| 23 | +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | ||
| 20 | import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsListener; | 24 | import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsListener; |
| 21 | import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsUtils; | 25 | import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsUtils; |
| 22 | import com.example.moudle_pedometer.R; | 26 | import com.example.moudle_pedometer.R; |
| @@ -35,6 +39,8 @@ public class ShareRecordActivity extends AppCompatActivity { | @@ -35,6 +39,8 @@ public class ShareRecordActivity extends AppCompatActivity { | ||
| 35 | private RelativeLayout ry_cen; | 39 | private RelativeLayout ry_cen; |
| 36 | private EditText editText; | 40 | private EditText editText; |
| 37 | private PermissionsUtils mPermissionsUtils = new PermissionsUtils(); | 41 | private PermissionsUtils mPermissionsUtils = new PermissionsUtils(); |
| 42 | + private ImageView record_icon; | ||
| 43 | + private TextView record_name; | ||
| 38 | 44 | ||
| 39 | public static void newInstance(Activity context,String title,String kilo,String step,String time,String speed){ | 45 | public static void newInstance(Activity context,String title,String kilo,String step,String time,String speed){ |
| 40 | Intent intent = new Intent(context,ShareRecordActivity.class); | 46 | Intent intent = new Intent(context,ShareRecordActivity.class); |
| @@ -62,6 +68,18 @@ public class ShareRecordActivity extends AppCompatActivity { | @@ -62,6 +68,18 @@ public class ShareRecordActivity extends AppCompatActivity { | ||
| 62 | share_back = findViewById(R.id.share_back); | 68 | share_back = findViewById(R.id.share_back); |
| 63 | share = findViewById(R.id.share); | 69 | share = findViewById(R.id.share); |
| 64 | ry_cen = findViewById(R.id.ry_cen); | 70 | ry_cen = findViewById(R.id.ry_cen); |
| 71 | + record_icon = findViewById(R.id.record_icon); | ||
| 72 | + record_name = findViewById(R.id.record_name); | ||
| 73 | + | ||
| 74 | + if(CommonInfo.getUserNickName(this) != null && CommonInfo.getUserNickName(this).trim().length() > 0){ | ||
| 75 | + record_name.setText(CommonInfo.getUserNickName(this)); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + if(CommonInfo.getUserIcon(this) != null && CommonInfo.getUserIcon(this).trim().length() > 0){ | ||
| 79 | + Glide.with(this).load(CommonInfo.getUserIcon(this)) | ||
| 80 | + .apply(RequestOptions.bitmapTransform(new CircleCrop()).placeholder(R.drawable.ic_icon)).into(record_icon); | ||
| 81 | + } | ||
| 82 | + | ||
| 65 | share_back.setOnClickListener(v -> finish()); | 83 | share_back.setOnClickListener(v -> finish()); |
| 66 | share.setOnClickListener(v -> getPermissionsWithTip()); | 84 | share.setOnClickListener(v -> getPermissionsWithTip()); |
| 67 | 85 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/adapter/MyRecordAdapter.java
| @@ -11,6 +11,7 @@ import android.widget.RelativeLayout; | @@ -11,6 +11,7 @@ import android.widget.RelativeLayout; | ||
| 11 | import android.widget.TextView; | 11 | import android.widget.TextView; |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | +import com.alibaba.android.arouter.launcher.ARouter; | ||
| 14 | import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | 15 | import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; |
| 15 | import com.cnlive.moudle.pedometer.net.bean.MyRecordInfo; | 16 | import com.cnlive.moudle.pedometer.net.bean.MyRecordInfo; |
| 16 | import com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity; | 17 | import com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity; |
| @@ -53,7 +54,11 @@ public class MyRecordAdapter extends RecyclerView.Adapter<MyRecordAdapter.MyView | @@ -53,7 +54,11 @@ public class MyRecordAdapter extends RecyclerView.Adapter<MyRecordAdapter.MyView | ||
| 53 | myViewHolder.my_record_ry.setVisibility(View.VISIBLE); | 54 | myViewHolder.my_record_ry.setVisibility(View.VISIBLE); |
| 54 | myViewHolder.has_report.setVisibility(View.GONE); | 55 | myViewHolder.has_report.setVisibility(View.GONE); |
| 55 | myViewHolder.my_record.setOnClickListener(v -> startAc(list.get(i))); | 56 | myViewHolder.my_record.setOnClickListener(v -> startAc(list.get(i))); |
| 56 | -// myViewHolder.check_raking.setOnClickListener(v -> ); | 57 | + myViewHolder.check_raking.setOnClickListener(v -> |
| 58 | + ARouter.getInstance().build("/web/WebViewColorActivity") | ||
| 59 | + .withString("url", "http://wjjh5test.cnlive.com/cnSportListOver.html") | ||
| 60 | + .withString("title",list.get(i).getTitle()+"总排行榜") | ||
| 61 | + .navigation(context)); | ||
| 57 | if (clickListener != null) { | 62 | if (clickListener != null) { |
| 58 | myViewHolder.item_ly.setOnClickListener(v -> clickListener.onClickListener(list.get(i), i)); | 63 | myViewHolder.item_ly.setOnClickListener(v -> clickListener.onClickListener(list.get(i), i)); |
| 59 | } | 64 | } |
| @@ -77,7 +82,7 @@ public class MyRecordAdapter extends RecyclerView.Adapter<MyRecordAdapter.MyView | @@ -77,7 +82,7 @@ public class MyRecordAdapter extends RecyclerView.Adapter<MyRecordAdapter.MyView | ||
| 77 | private void startAc(MyRecordInfo.ListBean listBean){ | 82 | private void startAc(MyRecordInfo.ListBean listBean){ |
| 78 | CommonInfo.setStreetId(context,listBean.getId()+""); | 83 | CommonInfo.setStreetId(context,listBean.getId()+""); |
| 79 | // RaceRecordActivity.newInstance(context,listBean.getTitle()); | 84 | // RaceRecordActivity.newInstance(context,listBean.getTitle()); |
| 80 | - SelfRecordActivity.newInstance(context); | 85 | + SelfRecordActivity.newInstance(context,null,null,null); |
| 81 | } | 86 | } |
| 82 | 87 | ||
| 83 | 88 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RegistrationInfoFragment.java
| @@ -4,12 +4,7 @@ package com.cnlive.moudle.pedometer.ui.fragment; | @@ -4,12 +4,7 @@ package com.cnlive.moudle.pedometer.ui.fragment; | ||
| 4 | import android.os.Bundle; | 4 | import android.os.Bundle; |
| 5 | import android.support.annotation.NonNull; | 5 | import android.support.annotation.NonNull; |
| 6 | import android.support.annotation.Nullable; | 6 | import android.support.annotation.Nullable; |
| 7 | -import android.support.v4.app.Fragment; | ||
| 8 | -import android.util.Log; | ||
| 9 | -import android.view.LayoutInflater; | ||
| 10 | import android.view.View; | 7 | import android.view.View; |
| 11 | -import android.view.ViewGroup; | ||
| 12 | -import android.widget.Toast; | ||
| 13 | 8 | ||
| 14 | import com.baidu.trace.LBSTraceClient; | 9 | import com.baidu.trace.LBSTraceClient; |
| 15 | import com.baidu.trace.api.fence.AddMonitoredPersonRequest; | 10 | import com.baidu.trace.api.fence.AddMonitoredPersonRequest; |
| @@ -18,12 +13,9 @@ import com.baidu.trace.api.fence.CreateFenceResponse; | @@ -18,12 +13,9 @@ import com.baidu.trace.api.fence.CreateFenceResponse; | ||
| 18 | import com.baidu.trace.api.fence.DeleteFenceResponse; | 13 | import com.baidu.trace.api.fence.DeleteFenceResponse; |
| 19 | import com.baidu.trace.api.fence.DeleteMonitoredPersonResponse; | 14 | import com.baidu.trace.api.fence.DeleteMonitoredPersonResponse; |
| 20 | import com.baidu.trace.api.fence.FenceListResponse; | 15 | import com.baidu.trace.api.fence.FenceListResponse; |
| 21 | -import com.baidu.trace.api.fence.FenceType; | ||
| 22 | import com.baidu.trace.api.fence.HistoryAlarmResponse; | 16 | import com.baidu.trace.api.fence.HistoryAlarmResponse; |
| 23 | import com.baidu.trace.api.fence.ListMonitoredPersonResponse; | 17 | import com.baidu.trace.api.fence.ListMonitoredPersonResponse; |
| 24 | -import com.baidu.trace.api.fence.MonitoredStatus; | ||
| 25 | import com.baidu.trace.api.fence.MonitoredStatusByLocationResponse; | 18 | import com.baidu.trace.api.fence.MonitoredStatusByLocationResponse; |
| 26 | -import com.baidu.trace.api.fence.MonitoredStatusInfo; | ||
| 27 | import com.baidu.trace.api.fence.MonitoredStatusResponse; | 19 | import com.baidu.trace.api.fence.MonitoredStatusResponse; |
| 28 | import com.baidu.trace.api.fence.OnFenceListener; | 20 | import com.baidu.trace.api.fence.OnFenceListener; |
| 29 | import com.baidu.trace.api.fence.UpdateFenceResponse; | 21 | import com.baidu.trace.api.fence.UpdateFenceResponse; |
moudle_pedometer/src/main/res/layout/fragment_registration_info.xml
| @@ -28,11 +28,13 @@ | @@ -28,11 +28,13 @@ | ||
| 28 | android:padding="20dp"> | 28 | android:padding="20dp"> |
| 29 | 29 | ||
| 30 | <ImageView | 30 | <ImageView |
| 31 | + android:id="@+id/user_icon" | ||
| 31 | android:layout_width="60dp" | 32 | android:layout_width="60dp" |
| 32 | android:layout_height="60dp" | 33 | android:layout_height="60dp" |
| 33 | android:src="@drawable/ic_icon"/> | 34 | android:src="@drawable/ic_icon"/> |
| 34 | 35 | ||
| 35 | <TextView | 36 | <TextView |
| 37 | + android:id="@+id/userName" | ||
| 36 | android:layout_width="wrap_content" | 38 | android:layout_width="wrap_content" |
| 37 | android:layout_height="wrap_content" | 39 | android:layout_height="wrap_content" |
| 38 | android:textColor="#333333" | 40 | android:textColor="#333333" |
| @@ -163,44 +165,5 @@ | @@ -163,44 +165,5 @@ | ||
| 163 | android:background="@drawable/green_bg_circle" | 165 | android:background="@drawable/green_bg_circle" |
| 164 | /> | 166 | /> |
| 165 | 167 | ||
| 166 | - <LinearLayout | ||
| 167 | - android:id="@+id/result_ly" | ||
| 168 | - android:layout_width="match_parent" | ||
| 169 | - android:layout_height="match_parent" | ||
| 170 | - android:layout_centerInParent="true" | ||
| 171 | - android:layout_below="@id/topbar" | ||
| 172 | - android:background="@color/white" | ||
| 173 | - android:visibility="gone" | ||
| 174 | - android:orientation="vertical"> | ||
| 175 | - | ||
| 176 | - <ImageView | ||
| 177 | - android:layout_width="wrap_content" | ||
| 178 | - android:layout_height="wrap_content" | ||
| 179 | - android:layout_marginTop="150dp" | ||
| 180 | - android:layout_gravity="center_horizontal" | ||
| 181 | - android:src="@drawable/bmcg" /> | ||
| 182 | - | ||
| 183 | - <TextView | ||
| 184 | - android:layout_width="wrap_content" | ||
| 185 | - android:layout_height="wrap_content" | ||
| 186 | - android:layout_gravity="center" | ||
| 187 | - android:layout_marginTop="20dp" | ||
| 188 | - android:textColor="#333333" | ||
| 189 | - android:textSize="20sp" | ||
| 190 | - android:text="@string/commit_success" /> | ||
| 191 | - | ||
| 192 | - <TextView | ||
| 193 | - android:id="@+id/to_line_detail" | ||
| 194 | - android:layout_width="wrap_content" | ||
| 195 | - android:layout_height="wrap_content" | ||
| 196 | - android:layout_gravity="center" | ||
| 197 | - android:textColor="#23D41E" | ||
| 198 | - android:textSize="15sp" | ||
| 199 | - android:padding="10dp" | ||
| 200 | - android:text="@string/to_line_detail" /> | ||
| 201 | - | ||
| 202 | - </LinearLayout> | ||
| 203 | - | ||
| 204 | - | ||
| 205 | </RelativeLayout> | 168 | </RelativeLayout> |
| 206 | </layout> | 169 | </layout> |
moudle_pedometer/src/main/res/values/colors.xml
| @@ -29,6 +29,7 @@ | @@ -29,6 +29,7 @@ | ||
| 29 | 29 | ||
| 30 | <color name="red">#EF5544</color> | 30 | <color name="red">#EF5544</color> |
| 31 | <color name="bg">#012648</color> | 31 | <color name="bg">#012648</color> |
| 32 | + <color name="orang">#f96e53</color> | ||
| 32 | 33 | ||
| 33 | <color name="text_black">#333333</color> | 34 | <color name="text_black">#333333</color> |
| 34 | <color name="bottom_sheet_dialog_race_location_text">#999999</color> | 35 | <color name="bottom_sheet_dialog_race_location_text">#999999</color> |