TraingNomalView::TraingNomalView()
{
/*判断是否需要GPS*/
- if(TraingModel::GetInstance()->IsNeedGPS(TraingModel::GetInstance()->GetSportEvent()) == true)
- {
- TraingModel::GetInstance()->start_heart_gps();
- }
+ TraingModel::GetInstance()->start_heart_gps();
g_pTraingNomalView = this;
}
TraingNomalView::~TraingNomalView()
{
DeInit();
- // TraingModel::GetInstance()->stop_heart_gps();
g_pTraingNomalView = nullptr;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "加载GPS连接图标失败: %s", GPS_1_IMAGE);
return false;
}
- button_image_path = GPS_1_IMAGE;
+ button_image_path = GO_1_IMAGE;
}
else
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "加载GPS断开图标失败: %s", GPS_2_IMAGE);
return false;
}
- button_image_path = GPS_2_IMAGE;
+ button_image_path = GO_2_IMAGE;
}
gps_image_->SetSrc(image);
buttonGo_->SetImageSrc(button_image_path.c_str(), button_image_path.c_str());
+ //刷新一下
+ GetRootContainer()->Invalidate();
return true;
}
}
TraingNomalView::TraingNomalView()
{
/*判断是否需要GPS*/
- if(TraingModel::GetInstance()->IsNeedGPS(TraingModel::GetInstance()->GetSportEvent()) == true)
- {
- TraingModel::GetInstance()->start_heart_gps();
- }
+ TraingModel::GetInstance()->start_heart_gps();
g_pTraingNomalView = this;
}
TraingNomalView::~TraingNomalView()
{
DeInit();
- // TraingModel::GetInstance()->stop_heart_gps();
g_pTraingNomalView = nullptr;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "加载GPS连接图标失败: %s", GPS_1_IMAGE);
return false;
}
- button_image_path = GPS_1_IMAGE;
+ button_image_path = GO_1_IMAGE;
}
else
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "加载GPS断开图标失败: %s", GPS_2_IMAGE);
return false;
}
- button_image_path = GPS_2_IMAGE;
+ button_image_path = GO_2_IMAGE;
}
gps_image_->SetSrc(image);
buttonGo_->SetImageSrc(button_image_path.c_str(), button_image_path.c_str());
+ //刷新一下
+ GetRootContainer()->Invalidate();
return true;
}
}
TraingNomalView::TraingNomalView()
{
/*判断是否需要GPS*/
- if(TraingModel::GetInstance()->IsNeedGPS(TraingModel::GetInstance()->GetSportEvent()) == true)
- {
- TraingModel::GetInstance()->start_heart_gps();
- }
+ TraingModel::GetInstance()->start_heart_gps();
g_pTraingNomalView = this;
}
TraingNomalView::~TraingNomalView()
{
DeInit();
- // TraingModel::GetInstance()->stop_heart_gps();
g_pTraingNomalView = nullptr;
}
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "加载GPS连接图标失败: %s", GPS_1_IMAGE);
return false;
}
- button_image_path = GPS_1_IMAGE;
+ button_image_path = GO_1_IMAGE;
}
else
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "加载GPS断开图标失败: %s", GPS_2_IMAGE);
return false;
}
- button_image_path = GPS_2_IMAGE;
+ button_image_path = GO_2_IMAGE;
}
gps_image_->SetSrc(image);
buttonGo_->SetImageSrc(button_image_path.c_str(), button_image_path.c_str());
+ //刷新一下
+ GetRootContainer()->Invalidate();
return true;
}
}