Commit dbc32f3fe268af1c2e03f47d77ad69a17d157fce
1 parent
5146a702
参与人员列表修改
Showing
4 changed files
with
21 additions
and
18 deletions
config.gradle
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); | |
| 25 | 24 | CollFailedEntityDao.createTable(db, ifNotExists); |
| 26 | 25 | CollUserStepEntityDao.createTable(db, ifNotExists); |
| 27 | 26 | FailedEntityDao.createTable(db, ifNotExists); |
| 28 | 27 | 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); | |
| 34 | 33 | CollFailedEntityDao.dropTable(db, ifExists); |
| 35 | 34 | CollUserStepEntityDao.dropTable(db, ifExists); |
| 36 | 35 | FailedEntityDao.dropTable(db, ifExists); |
| 37 | 36 | 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); | |
| 57 | 56 | registerDaoClass(CollFailedEntityDao.class); |
| 58 | 57 | registerDaoClass(CollUserStepEntityDao.class); |
| 59 | 58 | registerDaoClass(FailedEntityDao.class); |
| 60 | 59 | 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; | |
| 12 | 11 | import com.cnlive.moudle.pedometer.sql.entity.CollFailedEntity; |
| 13 | 12 | import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity; |
| 14 | 13 | import com.cnlive.moudle.pedometer.sql.entity.FailedEntity; |
| 15 | 14 | 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; | |
| 18 | 17 | import com.cnlive.moudle.pedometer.sql.dao.CollFailedEntityDao; |
| 19 | 18 | import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; |
| 20 | 19 | import com.cnlive.moudle.pedometer.sql.dao.FailedEntityDao; |
| 21 | 20 | 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,25 +29,22 @@ import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; |
| 29 | 29 | */ |
| 30 | 30 | public class DaoSession extends AbstractDaoSession { |
| 31 | 31 | |
| 32 | - private final DaoConfig calorieEntityDaoConfig; | |
| 33 | 32 | private final DaoConfig collFailedEntityDaoConfig; |
| 34 | 33 | private final DaoConfig collUserStepEntityDaoConfig; |
| 35 | 34 | private final DaoConfig failedEntityDaoConfig; |
| 36 | 35 | private final DaoConfig userStepEntityDaoConfig; |
| 36 | + private final DaoConfig calorieEntityDaoConfig; | |
| 37 | 37 | |
| 38 | - private final CalorieEntityDao calorieEntityDao; | |
| 39 | 38 | private final CollFailedEntityDao collFailedEntityDao; |
| 40 | 39 | private final CollUserStepEntityDao collUserStepEntityDao; |
| 41 | 40 | private final FailedEntityDao failedEntityDao; |
| 42 | 41 | 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 | - | |
| 51 | 48 | collFailedEntityDaoConfig = daoConfigMap.get(CollFailedEntityDao.class).clone(); |
| 52 | 49 | collFailedEntityDaoConfig.initIdentityScope(type); |
| 53 | 50 | |
| ... | ... | @@ -60,29 +57,28 @@ public class DaoSession extends AbstractDaoSession { |
| 60 | 57 | userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone(); |
| 61 | 58 | userStepEntityDaoConfig.initIdentityScope(type); |
| 62 | 59 | |
| 63 | - calorieEntityDao = new CalorieEntityDao(calorieEntityDaoConfig, this); | |
| 60 | + calorieEntityDaoConfig = daoConfigMap.get(CalorieEntityDao.class).clone(); | |
| 61 | + calorieEntityDaoConfig.initIdentityScope(type); | |
| 62 | + | |
| 64 | 63 | collFailedEntityDao = new CollFailedEntityDao(collFailedEntityDaoConfig, this); |
| 65 | 64 | collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this); |
| 66 | 65 | failedEntityDao = new FailedEntityDao(failedEntityDaoConfig, this); |
| 67 | 66 | userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this); |
| 67 | + calorieEntityDao = new CalorieEntityDao(calorieEntityDaoConfig, this); | |
| 68 | 68 | |
| 69 | - registerDao(CalorieEntity.class, calorieEntityDao); | |
| 70 | 69 | registerDao(CollFailedEntity.class, collFailedEntityDao); |
| 71 | 70 | registerDao(CollUserStepEntity.class, collUserStepEntityDao); |
| 72 | 71 | registerDao(FailedEntity.class, failedEntityDao); |
| 73 | 72 | registerDao(UserStepEntity.class, userStepEntityDao); |
| 73 | + registerDao(CalorieEntity.class, calorieEntityDao); | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | public void clear() { |
| 77 | - calorieEntityDaoConfig.clearIdentityScope(); | |
| 78 | 77 | collFailedEntityDaoConfig.clearIdentityScope(); |
| 79 | 78 | collUserStepEntityDaoConfig.clearIdentityScope(); |
| 80 | 79 | failedEntityDaoConfig.clearIdentityScope(); |
| 81 | 80 | userStepEntityDaoConfig.clearIdentityScope(); |
| 82 | - } | |
| 83 | - | |
| 84 | - public CalorieEntityDao getCalorieEntityDao() { | |
| 85 | - return calorieEntityDao; | |
| 81 | + calorieEntityDaoConfig.clearIdentityScope(); | |
| 86 | 82 | } |
| 87 | 83 | |
| 88 | 84 | public CollFailedEntityDao getCollFailedEntityDao() { |
| ... | ... | @@ -101,4 +97,8 @@ public class DaoSession extends AbstractDaoSession { |
| 101 | 97 | return userStepEntityDao; |
| 102 | 98 | } |
| 103 | 99 | |
| 100 | + public CalorieEntityDao getCalorieEntityDao() { | |
| 101 | + return calorieEntityDao; | |
| 102 | + } | |
| 103 | + | |
| 104 | 104 | } | ... | ... |
moudle_pedometer/src/main/res/layout/item_tabke_part.xml
| ... | ... | @@ -22,7 +22,10 @@ |
| 22 | 22 | android:textSize="15sp" |
| 23 | 23 | android:textColor="#333333" |
| 24 | 24 | android:layout_toRightOf="@id/icon_img" |
| 25 | + android:lines="1" | |
| 26 | + android:ellipsize="end" | |
| 25 | 27 | android:layout_centerVertical="true" |
| 28 | + android:layout_marginRight="5dp" | |
| 26 | 29 | /> |
| 27 | 30 | |
| 28 | 31 | <View | ... | ... |