Commit a5fd20695502923652832a92d84bf9f7667da319
1 parent
356e4dd2
1 修改百度key
Showing
6 changed files
with
136 additions
and
20 deletions
.idea/codeStyles/Project.xml
0 → 100644
| 1 | +<component name="ProjectCodeStyleConfiguration"> | |
| 2 | + <code_scheme name="Project" version="173"> | |
| 3 | + <codeStyleSettings language="XML"> | |
| 4 | + <indentOptions> | |
| 5 | + <option name="CONTINUATION_INDENT_SIZE" value="4" /> | |
| 6 | + </indentOptions> | |
| 7 | + <arrangement> | |
| 8 | + <rules> | |
| 9 | + <section> | |
| 10 | + <rule> | |
| 11 | + <match> | |
| 12 | + <AND> | |
| 13 | + <NAME>xmlns:android</NAME> | |
| 14 | + <XML_ATTRIBUTE /> | |
| 15 | + <XML_NAMESPACE>^$</XML_NAMESPACE> | |
| 16 | + </AND> | |
| 17 | + </match> | |
| 18 | + </rule> | |
| 19 | + </section> | |
| 20 | + <section> | |
| 21 | + <rule> | |
| 22 | + <match> | |
| 23 | + <AND> | |
| 24 | + <NAME>xmlns:.*</NAME> | |
| 25 | + <XML_ATTRIBUTE /> | |
| 26 | + <XML_NAMESPACE>^$</XML_NAMESPACE> | |
| 27 | + </AND> | |
| 28 | + </match> | |
| 29 | + <order>BY_NAME</order> | |
| 30 | + </rule> | |
| 31 | + </section> | |
| 32 | + <section> | |
| 33 | + <rule> | |
| 34 | + <match> | |
| 35 | + <AND> | |
| 36 | + <NAME>.*:id</NAME> | |
| 37 | + <XML_ATTRIBUTE /> | |
| 38 | + <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> | |
| 39 | + </AND> | |
| 40 | + </match> | |
| 41 | + </rule> | |
| 42 | + </section> | |
| 43 | + <section> | |
| 44 | + <rule> | |
| 45 | + <match> | |
| 46 | + <AND> | |
| 47 | + <NAME>.*:name</NAME> | |
| 48 | + <XML_ATTRIBUTE /> | |
| 49 | + <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> | |
| 50 | + </AND> | |
| 51 | + </match> | |
| 52 | + </rule> | |
| 53 | + </section> | |
| 54 | + <section> | |
| 55 | + <rule> | |
| 56 | + <match> | |
| 57 | + <AND> | |
| 58 | + <NAME>name</NAME> | |
| 59 | + <XML_ATTRIBUTE /> | |
| 60 | + <XML_NAMESPACE>^$</XML_NAMESPACE> | |
| 61 | + </AND> | |
| 62 | + </match> | |
| 63 | + </rule> | |
| 64 | + </section> | |
| 65 | + <section> | |
| 66 | + <rule> | |
| 67 | + <match> | |
| 68 | + <AND> | |
| 69 | + <NAME>style</NAME> | |
| 70 | + <XML_ATTRIBUTE /> | |
| 71 | + <XML_NAMESPACE>^$</XML_NAMESPACE> | |
| 72 | + </AND> | |
| 73 | + </match> | |
| 74 | + </rule> | |
| 75 | + </section> | |
| 76 | + <section> | |
| 77 | + <rule> | |
| 78 | + <match> | |
| 79 | + <AND> | |
| 80 | + <NAME>.*</NAME> | |
| 81 | + <XML_ATTRIBUTE /> | |
| 82 | + <XML_NAMESPACE>^$</XML_NAMESPACE> | |
| 83 | + </AND> | |
| 84 | + </match> | |
| 85 | + <order>BY_NAME</order> | |
| 86 | + </rule> | |
| 87 | + </section> | |
| 88 | + <section> | |
| 89 | + <rule> | |
| 90 | + <match> | |
| 91 | + <AND> | |
| 92 | + <NAME>.*</NAME> | |
| 93 | + <XML_ATTRIBUTE /> | |
| 94 | + <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> | |
| 95 | + </AND> | |
| 96 | + </match> | |
| 97 | + <order>ANDROID_ATTRIBUTE_ORDER</order> | |
| 98 | + </rule> | |
| 99 | + </section> | |
| 100 | + <section> | |
| 101 | + <rule> | |
| 102 | + <match> | |
| 103 | + <AND> | |
| 104 | + <NAME>.*</NAME> | |
| 105 | + <XML_ATTRIBUTE /> | |
| 106 | + <XML_NAMESPACE>.*</XML_NAMESPACE> | |
| 107 | + </AND> | |
| 108 | + </match> | |
| 109 | + <order>BY_NAME</order> | |
| 110 | + </rule> | |
| 111 | + </section> | |
| 112 | + </rules> | |
| 113 | + </arrangement> | |
| 114 | + </codeStyleSettings> | |
| 115 | + </code_scheme> | |
| 116 | +</component> | |
| 0 | 117 | \ No newline at end of file | ... | ... |
app/build.gradle
| ... | ... | @@ -28,12 +28,12 @@ android { |
| 28 | 28 | buildConfigField("String", "APP_ID", stringValue("802_jhbqccxw08")) |
| 29 | 29 | buildConfigField("String", "APP_KEY", stringValue("9c5619e9be747bb3b925dd215ca5923d86f12c09b9394f")) |
| 30 | 30 | buildConfigField("String", "APP_SCERET", stringValue("1e6380cb347255e777f72b5aa60f41daa68443a132aaea")) |
| 31 | - buildConfigField("String", "BAIDU_MAP_APP_KEY", stringValue("2IIsTtvX2FA88yvDrPZedc2ZvMhxyDbN")) | |
| 31 | + buildConfigField("String", "BAIDU_MAP_APP_KEY", stringValue("P1q4kdoonCzPY9qbwvk0jlrHPD7DyQBH")) | |
| 32 | 32 | // BAIDU_MAP_APP_KEY: "OeotXc38bbnU7WmyKGA0VMahk4v35VG2" //测试 |
| 33 | 33 | |
| 34 | 34 | manifestPlaceholders = [ |
| 35 | 35 | |
| 36 | - BAIDU_MAP_APP_KEY: "2IIsTtvX2FA88yvDrPZedc2ZvMhxyDbN" | |
| 36 | + BAIDU_MAP_APP_KEY: "P1q4kdoonCzPY9qbwvk0jlrHPD7DyQBH" | |
| 37 | 37 | // BAIDU_MAP_APP_KEY: "OeotXc38bbnU7WmyKGA0VMahk4v35VG2" |
| 38 | 38 | |
| 39 | 39 | ] | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoMaster.java
| ... | ... | @@ -21,20 +21,20 @@ 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 | + CalorieEntityDao.createTable(db, ifNotExists); | |
| 24 | 25 | CollFailedEntityDao.createTable(db, ifNotExists); |
| 25 | 26 | CollUserStepEntityDao.createTable(db, ifNotExists); |
| 26 | 27 | FailedEntityDao.createTable(db, ifNotExists); |
| 27 | 28 | UserStepEntityDao.createTable(db, ifNotExists); |
| 28 | - CalorieEntityDao.createTable(db, ifNotExists); | |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** Drops underlying database table using DAOs. */ |
| 32 | 32 | public static void dropAllTables(Database db, boolean ifExists) { |
| 33 | + CalorieEntityDao.dropTable(db, ifExists); | |
| 33 | 34 | CollFailedEntityDao.dropTable(db, ifExists); |
| 34 | 35 | CollUserStepEntityDao.dropTable(db, ifExists); |
| 35 | 36 | FailedEntityDao.dropTable(db, ifExists); |
| 36 | 37 | UserStepEntityDao.dropTable(db, ifExists); |
| 37 | - CalorieEntityDao.dropTable(db, ifExists); | |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
| ... | ... | @@ -53,11 +53,11 @@ public class DaoMaster extends AbstractDaoMaster { |
| 53 | 53 | |
| 54 | 54 | public DaoMaster(Database db) { |
| 55 | 55 | super(db, SCHEMA_VERSION); |
| 56 | + registerDaoClass(CalorieEntityDao.class); | |
| 56 | 57 | registerDaoClass(CollFailedEntityDao.class); |
| 57 | 58 | registerDaoClass(CollUserStepEntityDao.class); |
| 58 | 59 | registerDaoClass(FailedEntityDao.class); |
| 59 | 60 | registerDaoClass(UserStepEntityDao.class); |
| 60 | - registerDaoClass(CalorieEntityDao.class); | |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | public DaoSession newSession() { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoSession.java
| ... | ... | @@ -8,17 +8,17 @@ 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.CalorieEntity; | |
| 11 | 12 | import com.cnlive.moudle.pedometer.sql.entity.CollFailedEntity; |
| 12 | 13 | import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity; |
| 13 | 14 | import com.cnlive.moudle.pedometer.sql.entity.FailedEntity; |
| 14 | 15 | import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; |
| 15 | -import com.cnlive.moudle.pedometer.sql.entity.CalorieEntity; | |
| 16 | 16 | |
| 17 | +import com.cnlive.moudle.pedometer.sql.dao.CalorieEntityDao; | |
| 17 | 18 | import com.cnlive.moudle.pedometer.sql.dao.CollFailedEntityDao; |
| 18 | 19 | import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; |
| 19 | 20 | import com.cnlive.moudle.pedometer.sql.dao.FailedEntityDao; |
| 20 | 21 | import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; |
| 21 | -import com.cnlive.moudle.pedometer.sql.dao.CalorieEntityDao; | |
| 22 | 22 | |
| 23 | 23 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. |
| 24 | 24 | |
| ... | ... | @@ -29,22 +29,25 @@ import com.cnlive.moudle.pedometer.sql.dao.CalorieEntityDao; |
| 29 | 29 | */ |
| 30 | 30 | public class DaoSession extends AbstractDaoSession { |
| 31 | 31 | |
| 32 | + private final DaoConfig calorieEntityDaoConfig; | |
| 32 | 33 | private final DaoConfig collFailedEntityDaoConfig; |
| 33 | 34 | private final DaoConfig collUserStepEntityDaoConfig; |
| 34 | 35 | private final DaoConfig failedEntityDaoConfig; |
| 35 | 36 | private final DaoConfig userStepEntityDaoConfig; |
| 36 | - private final DaoConfig calorieEntityDaoConfig; | |
| 37 | 37 | |
| 38 | + private final CalorieEntityDao calorieEntityDao; | |
| 38 | 39 | private final CollFailedEntityDao collFailedEntityDao; |
| 39 | 40 | private final CollUserStepEntityDao collUserStepEntityDao; |
| 40 | 41 | private final FailedEntityDao failedEntityDao; |
| 41 | 42 | private final UserStepEntityDao userStepEntityDao; |
| 42 | - private final CalorieEntityDao calorieEntityDao; | |
| 43 | 43 | |
| 44 | 44 | public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> |
| 45 | 45 | daoConfigMap) { |
| 46 | 46 | super(db); |
| 47 | 47 | |
| 48 | + calorieEntityDaoConfig = daoConfigMap.get(CalorieEntityDao.class).clone(); | |
| 49 | + calorieEntityDaoConfig.initIdentityScope(type); | |
| 50 | + | |
| 48 | 51 | collFailedEntityDaoConfig = daoConfigMap.get(CollFailedEntityDao.class).clone(); |
| 49 | 52 | collFailedEntityDaoConfig.initIdentityScope(type); |
| 50 | 53 | |
| ... | ... | @@ -57,28 +60,29 @@ public class DaoSession extends AbstractDaoSession { |
| 57 | 60 | userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone(); |
| 58 | 61 | userStepEntityDaoConfig.initIdentityScope(type); |
| 59 | 62 | |
| 60 | - calorieEntityDaoConfig = daoConfigMap.get(CalorieEntityDao.class).clone(); | |
| 61 | - calorieEntityDaoConfig.initIdentityScope(type); | |
| 62 | - | |
| 63 | + calorieEntityDao = new CalorieEntityDao(calorieEntityDaoConfig, this); | |
| 63 | 64 | collFailedEntityDao = new CollFailedEntityDao(collFailedEntityDaoConfig, this); |
| 64 | 65 | collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this); |
| 65 | 66 | failedEntityDao = new FailedEntityDao(failedEntityDaoConfig, this); |
| 66 | 67 | userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this); |
| 67 | - calorieEntityDao = new CalorieEntityDao(calorieEntityDaoConfig, this); | |
| 68 | 68 | |
| 69 | + registerDao(CalorieEntity.class, calorieEntityDao); | |
| 69 | 70 | registerDao(CollFailedEntity.class, collFailedEntityDao); |
| 70 | 71 | registerDao(CollUserStepEntity.class, collUserStepEntityDao); |
| 71 | 72 | registerDao(FailedEntity.class, failedEntityDao); |
| 72 | 73 | registerDao(UserStepEntity.class, userStepEntityDao); |
| 73 | - registerDao(CalorieEntity.class, calorieEntityDao); | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | public void clear() { |
| 77 | + calorieEntityDaoConfig.clearIdentityScope(); | |
| 77 | 78 | collFailedEntityDaoConfig.clearIdentityScope(); |
| 78 | 79 | collUserStepEntityDaoConfig.clearIdentityScope(); |
| 79 | 80 | failedEntityDaoConfig.clearIdentityScope(); |
| 80 | 81 | userStepEntityDaoConfig.clearIdentityScope(); |
| 81 | - calorieEntityDaoConfig.clearIdentityScope(); | |
| 82 | + } | |
| 83 | + | |
| 84 | + public CalorieEntityDao getCalorieEntityDao() { | |
| 85 | + return calorieEntityDao; | |
| 82 | 86 | } |
| 83 | 87 | |
| 84 | 88 | public CollFailedEntityDao getCollFailedEntityDao() { |
| ... | ... | @@ -97,8 +101,4 @@ public class DaoSession extends AbstractDaoSession { |
| 97 | 101 | return userStepEntityDao; |
| 98 | 102 | } |
| 99 | 103 | |
| 100 | - public CalorieEntityDao getCalorieEntityDao() { | |
| 101 | - return calorieEntityDao; | |
| 102 | - } | |
| 103 | - | |
| 104 | 104 | } | ... | ... |
moudle_pedometer/src/main/res/drawable/selector_tip_dialog_btn_bottom.xml
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | 2 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | 3 | <item android:drawable="@color/transparent" android:state_pressed="false" /> |
| 4 | - <item android:drawable="@drawable/shape_tip_dialog_btn_bottom_press" android:state_pressed="true" /> | |
| 4 | + <item android:drawable="@drawable/shape_pedometer_tip_dialog_btn_bottom_press" android:state_pressed="true" /> | |
| 5 | 5 | |
| 6 | 6 | </selector> |
| 7 | 7 | \ No newline at end of file | ... | ... |
moudle_pedometer/src/main/res/drawable/shape_tip_dialog_btn_bottom_press.xml renamed to moudle_pedometer/src/main/res/drawable/shape_pedometer_tip_dialog_btn_bottom_press.xml