コード例 #1
0
 public void setWeatherModel(WeatherModel weatherModel) {
   mWeatherModel = weatherModel;
   TextConfigModel textModel = mWeatherModel.getTextConfigModel();
   mWeatherPaint.setColor(Color.parseColor(textModel.maybeGetColor()));
   mWeatherPaint.setTextSize(
       UnitTransferUtils.getPixelFromDp(textModel.maybeGetTextSize(), mContext));
 }
コード例 #2
0
 public void setText(TextConfigModel textModel) {
   mTextModel = textModel;
   mTextPaint.setColor(Color.parseColor(textModel.maybeGetColor()));
   mTextPaint.setTextSize(
       UnitTransferUtils.getPixelFromDp(textModel.maybeGetTextSize(), mContext));
 }