com.ingenic.iwds.slpt.view.sport.SlptLastHeartRateView Java Examples
The following examples show how to use
com.ingenic.iwds.slpt.view.sport.SlptLastHeartRateView.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HeartRateWidget.java From AmazfitAPKs with Apache License 2.0 | 6 votes |
@Override public List<SlptViewComponent> buildSlptViewComponent(Service service) { SlptLinearLayout heart = new SlptLinearLayout(); SlptPictureView bpm = new SlptPictureView(); bpm.setStringPicture(" bpm"); heart.add(new SlptLastHeartRateView()); heart.add(bpm); heart.setTextAttrForAll( service.getResources().getDimension(R.dimen.circles_font_size_slpt), -16777216, ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.PROTOTYPE_SOURCE) ); heart.setStart( (int) service.getResources().getDimension(R.dimen.heart_rate_text_left_slpt), (int) service.getResources().getDimension(R.dimen.heart_rate_text_top_slpt)); heart.alignX= 2; heart.alignY= 0; heart.setRect(100, 30); return Collections.<SlptViewComponent>singletonList(heart); }
Example #2
Source File: HeartRateWidget.java From AmazfitAPKs with Apache License 2.0 | 6 votes |
@Override public List<SlptViewComponent> buildSlptViewComponent(Service service) { SlptLinearLayout heart = new SlptLinearLayout(); heart.add(new SlptLastHeartRateView()); heart.setTextAttrForAll( service.getResources().getDimension(R.dimen.circles_font_size_slpt), -16777216, ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.BEBAS_NEUE) ); heart.setStart( (int) service.getResources().getDimension(R.dimen.widget_text_left_slpt), (int) service.getResources().getDimension(R.dimen.widget_text_top_slpt)); heart.alignX=2; heart.alignY=0; heart.setRect(60,60); return Collections.<SlptViewComponent>singletonList(heart); }
Example #3
Source File: HeartRateWidget.java From AmazfitAPKs with Apache License 2.0 | 5 votes |
@Override public List<SlptViewComponent> buildSlptViewComponent(Service service) { SlptLinearLayout heart = new SlptLinearLayout(); heart.add(new SlptLastHeartRateView()); heart.setTextAttrForAll( service.getResources().getDimension(R.dimen.malvarez_circles_font_size_slpt), -1, ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.BEBAS_NEUE) ); heart.setStart( (int) service.getResources().getDimension(R.dimen.malvarez_heart_rate_text_left_slpt), (int) service.getResources().getDimension(R.dimen.malvarez_heart_rate_text_top_slpt)); return Collections.<SlptViewComponent>singletonList(heart); }
Example #4
Source File: HeartRateWidget.java From xDrip-Watchface with Apache License 2.0 | 5 votes |
@Override public List<SlptViewComponent> buildSlptViewComponent(Service service) { SlptLinearLayout heart = new SlptLinearLayout(); heart.add(new SlptLastHeartRateView()); // Show or Not Units if(service.getResources().getBoolean(R.bool.heart_rate_units)) { SlptPictureView bpm = new SlptPictureView(); bpm.setStringPicture(" bpm"); heart.add(bpm); } heart.setTextAttrForAll( service.getResources().getDimension(R.dimen.heart_rate_font_size), service.getResources().getColor(R.color.heart_colour_slpt), ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.MONO_SPACE) ); // Position based on screen on heart.alignX = 2; heart.alignY = 0; int tmp_left = (int) service.getResources().getDimension(R.dimen.heart_rate_text_left); if(!service.getResources().getBoolean(R.bool.heart_rate_left_align)) { // If text is centered, set rectangle heart.setRect( (int) (2 * tmp_left + 640), (int) (service.getResources().getDimension(R.dimen.heart_rate_font_size)) ); tmp_left = -320; } heart.setStart( tmp_left, (int) (service.getResources().getDimension(R.dimen.heart_rate_text_top)-((float)service.getResources().getInteger(R.integer.font_ratio)/100)*service.getResources().getDimension(R.dimen.heart_rate_font_size)) ); // Hide if disabled if(!service.getResources().getBoolean(R.bool.heart_rate)){heart.show=false;} return Collections.<SlptViewComponent>singletonList(heart); }
Example #5
Source File: HeartRateWidget.java From malvarez-watchface with Apache License 2.0 | 5 votes |
@Override public List<SlptViewComponent> buildSlptViewComponent(Service service) { SlptLinearLayout heart = new SlptLinearLayout(); heart.add(new SlptLastHeartRateView()); heart.setTextAttrForAll( service.getResources().getDimension(R.dimen.malvarez_circles_font_size_slpt), -1, ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.BEBAS_NEUE) ); heart.setStart( (int) service.getResources().getDimension(R.dimen.malvarez_heart_rate_text_left_slpt), (int) service.getResources().getDimension(R.dimen.malvarez_heart_rate_text_top_slpt)); return Collections.<SlptViewComponent>singletonList(heart); }