From f227d5a29d91fc930732f22776083c84cdc78e0f Mon Sep 17 00:00:00 2001 From: Shai Almog Date: Mon, 25 Jul 2016 22:38:23 +0300 Subject: [PATCH] Added icons to media player --- CodenameOne/src/com/codename1/components/MediaPlayer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CodenameOne/src/com/codename1/components/MediaPlayer.java b/CodenameOne/src/com/codename1/components/MediaPlayer.java index b4f4b16b36..c2b362e698 100644 --- a/CodenameOne/src/com/codename1/components/MediaPlayer.java +++ b/CodenameOne/src/com/codename1/components/MediaPlayer.java @@ -28,6 +28,7 @@ import com.codename1.ui.Component; import com.codename1.ui.Container; import com.codename1.ui.Display; +import com.codename1.ui.FontImage; import com.codename1.ui.Image; import com.codename1.ui.events.ActionEvent; import com.codename1.ui.events.ActionListener; @@ -67,12 +68,17 @@ public class MediaPlayer extends Container { * Empty constructor */ public MediaPlayer() { + playIcon = FontImage.createMaterial(FontImage.MATERIAL_PLAY_ARROW, "Button", 3); + pauseIcon = FontImage.createMaterial(FontImage.MATERIAL_PAUSE, "Button", 3); + fwdIcon = FontImage.createMaterial(FontImage.MATERIAL_FAST_FORWARD, "Button", 3); + backIcon = FontImage.createMaterial(FontImage.MATERIAL_FAST_REWIND, "Button", 3); } - + /** * Empty constructor */ public MediaPlayer(Media video) { + this(); this.video = video; initUI(); }