出行动态数据库相关操作迁移至单例,方便初始化

This commit is contained in:
tongchenfei
2020-07-09 14:40:38 +08:00
parent 54ab418dea
commit cc07e79efa
9 changed files with 232 additions and 175 deletions

View File

@@ -10,7 +10,7 @@ import kotlinx.android.synthetic.main.module_left_panel_simple_speed.*
*
* @author tongchenfei
*/
private const val SPEED_THRESHOLD = 90
private const val SPEED_THRESHOLD = 40
class SimpleSpeedFragment: MvpFragment<SimpleSpeedFragment, SimpleSpeedPresenter>() {
override fun getLayoutId(): Int {
return R.layout.module_left_panel_simple_speed

View File

@@ -29,4 +29,16 @@
android:textColor="#fff"
android:background="@drawable/module_left_panel_normal_speed_bg" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="当前车速"
android:textColor="#fff"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="@id/tvModuleLeftPanelSpeed"
app:layout_constraintRight_toRightOf="@id/tvModuleLeftPanelSpeed"
app:layout_constraintTop_toBottomOf="@id/tvModuleLeftPanelSpeed"
android:layout_marginTop="@dimen/module_left_panel_simple_speed_title_margin"
android:textSize="@dimen/module_left_panel_simple_speed_title_size" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,4 +2,7 @@
<resources>
<dimen name="module_left_panel_simple_speed_text_size">80px</dimen>
<dimen name="module_left_panel_simple_speed_text_margin_top">69.6px</dimen>
<dimen name="module_left_panel_simple_speed_title_size">20px</dimen>
<dimen name="module_left_panel_simple_speed_title_margin">28px</dimen>
</resources>