Java Code Examples for com.ingenic.iwds.slpt.view.arc.SlptPowerArcAnglePicView#setImagePicture()
The following examples show how to use
com.ingenic.iwds.slpt.view.arc.SlptPowerArcAnglePicView#setImagePicture() .
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: CirclesWidget.java From AmazfitAPKs with Apache License 2.0 | 5 votes |
@Override public List<SlptViewComponent> buildSlptViewComponent(Service service) { Typeface timeTypeFace = ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.BEBAS_NEUE); SlptLinearLayout steps = new SlptLinearLayout(); steps.alignX = 2; steps.alignY = 2; steps.add(new SlptTodayStepNumView()); steps.setTextAttrForAll( service.getResources().getDimension(R.dimen.circles_font_size_slpt), -16777216 , timeTypeFace ); SlptPowerArcAnglePicView powerArcView = new SlptPowerArcAnglePicView(); powerArcView.setImagePicture(Util.assetToBytes(service, "battery_splt.png")); powerArcView.start_angle = (int) startAngleBattery + 180 - 3; powerArcView.full_angle = (int) arcSizeBattery + 6; SlptTodayStepArcAnglePicView stepArcPicView = new SlptTodayStepArcAnglePicView(); stepArcPicView.setImagePicture(Util.assetToBytes(service, "steps_splt.png")); stepArcPicView.start_angle = (int) startAngleSteps + 180 - 3; stepArcPicView.full_angle = (int) arcSizeSteps + 6; return Arrays.asList(steps, stepArcPicView, powerArcView); }
Example 2
Source File: CirclesWidget.java From AmazfitAPKs with Apache License 2.0 | 4 votes |
@Override public List<SlptViewComponent> buildSlptViewComponent(Service service) { Typeface timeTypeFace = ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.BEBAS_NEUE); SlptLinearLayout power = new SlptLinearLayout(); power.alignX = 2; power.alignY = 2; power.add(new SlptPowerNumView()); power.setTextAttrForAll( service.getResources().getDimension(R.dimen.malvarez_circles_font_size_slpt), -1, timeTypeFace ); power.setStart( (int) service.getResources().getDimension(R.dimen.malvarez_battery_text_left_slpt), (int) service.getResources().getDimension(R.dimen.malvarez_battery_text_top_slpt)); SlptLinearLayout steps = new SlptLinearLayout(); steps.alignX = 2; steps.alignY = 2; steps.add(new SlptTodayStepNumView()); steps.setTextAttrForAll( service.getResources().getDimension(R.dimen.malvarez_circles_font_size_slpt), -1, timeTypeFace ); steps.setStart( (int) service.getResources().getDimension(R.dimen.malvarez_steps_text_left_slpt), (int) service.getResources().getDimension(R.dimen.malvarez_steps_text_top_slpt)); SlptLinearLayout sport = new SlptLinearLayout(); sport.add(new SlptTodaySportDistanceLView()); sport.setTextAttrForAll( service.getResources().getDimension(R.dimen.malvarez_circles_font_size_slpt), -1, timeTypeFace ); sport.setStart( (int) service.getResources().getDimension(R.dimen.malvarez_sport_text_left_slpt), (int) service.getResources().getDimension(R.dimen.malvarez_sport_text_top_slpt)); SlptPowerArcAnglePicView powerArcView = new SlptPowerArcAnglePicView(); powerArcView.setImagePicture(SimpleFile.readFileFromAssets(service.getApplicationContext(), "battery_splt.png")); powerArcView.start_angle = (int) startAngleBattery + 180 - 3; powerArcView.full_angle = (int) arcSizeBattery + 6; SlptTodayStepArcAnglePicView stepArcPicView = new SlptTodayStepArcAnglePicView(); stepArcPicView.setImagePicture(SimpleFile.readFileFromAssets(service.getApplicationContext(), "steps_splt.png")); stepArcPicView.start_angle = (int) startAngleSteps + 180 - 3; stepArcPicView.full_angle = (int) arcSizeSteps + 6; SlptTodayDistanceArcAnglePicView distanceArcPicView = new SlptTodayDistanceArcAnglePicView(); distanceArcPicView.setImagePicture(SimpleFile.readFileFromAssets(service.getApplicationContext(), "sports_splt.png")); distanceArcPicView.start_angle = (int) startAngleSport + 180 - 3; distanceArcPicView.full_angle = (int) arcSizeSport + 6; return Arrays.asList(power, steps, sport, powerArcView, stepArcPicView, distanceArcPicView); }
Example 3
Source File: CirclesWidget.java From malvarez-watchface with Apache License 2.0 | 4 votes |
@Override public List<SlptViewComponent> buildSlptViewComponent(Service service) { Typeface timeTypeFace = ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.BEBAS_NEUE); SlptLinearLayout power = new SlptLinearLayout(); power.alignX = 2; power.alignY = 2; power.add(new SlptPowerNumView()); power.setTextAttrForAll( service.getResources().getDimension(R.dimen.malvarez_circles_font_size_slpt), -1, timeTypeFace ); power.setStart( (int) service.getResources().getDimension(R.dimen.malvarez_battery_text_left_slpt), (int) service.getResources().getDimension(R.dimen.malvarez_battery_text_top_slpt)); SlptLinearLayout steps = new SlptLinearLayout(); steps.alignX = 2; steps.alignY = 2; steps.add(new SlptTodayStepNumView()); steps.setTextAttrForAll( service.getResources().getDimension(R.dimen.malvarez_circles_font_size_slpt), -1, timeTypeFace ); steps.setStart( (int) service.getResources().getDimension(R.dimen.malvarez_steps_text_left_slpt), (int) service.getResources().getDimension(R.dimen.malvarez_steps_text_top_slpt)); SlptLinearLayout sport = new SlptLinearLayout(); sport.add(new SlptTodaySportDistanceLView()); sport.setTextAttrForAll( service.getResources().getDimension(R.dimen.malvarez_circles_font_size_slpt), -1, timeTypeFace ); sport.setStart( (int) service.getResources().getDimension(R.dimen.malvarez_sport_text_left_slpt), (int) service.getResources().getDimension(R.dimen.malvarez_sport_text_top_slpt)); SlptPowerArcAnglePicView powerArcView = new SlptPowerArcAnglePicView(); powerArcView.setImagePicture(Util.assetToBytes(service, "battery_splt.png")); powerArcView.start_angle = (int) startAngleBattery + 180 - 3; powerArcView.full_angle = (int) arcSizeBattery + 6; SlptTodayStepArcAnglePicView stepArcPicView = new SlptTodayStepArcAnglePicView(); stepArcPicView.setImagePicture(Util.assetToBytes(service, "steps_splt.png")); stepArcPicView.start_angle = (int) startAngleSteps + 180 - 3; stepArcPicView.full_angle = (int) arcSizeSteps + 6; SlptTodayDistanceArcAnglePicView distanceArcPicView = new SlptTodayDistanceArcAnglePicView(); distanceArcPicView.setImagePicture(Util.assetToBytes(service, "sports_splt.png")); distanceArcPicView.start_angle = (int) startAngleSport + 180 - 3; distanceArcPicView.full_angle = (int) arcSizeSport + 6; return Arrays.asList(power, steps, sport, powerArcView, stepArcPicView, distanceArcPicView); }