Skip to content

Commit f227d5a

Browse files
committed
Added icons to media player
1 parent f8105a1 commit f227d5a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CodenameOne/src/com/codename1/components/MediaPlayer.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.codename1.ui.Component;
2929
import com.codename1.ui.Container;
3030
import com.codename1.ui.Display;
31+
import com.codename1.ui.FontImage;
3132
import com.codename1.ui.Image;
3233
import com.codename1.ui.events.ActionEvent;
3334
import com.codename1.ui.events.ActionListener;
@@ -67,12 +68,17 @@ public class MediaPlayer extends Container {
6768
* Empty constructor
6869
*/
6970
public MediaPlayer() {
71+
playIcon = FontImage.createMaterial(FontImage.MATERIAL_PLAY_ARROW, "Button", 3);
72+
pauseIcon = FontImage.createMaterial(FontImage.MATERIAL_PAUSE, "Button", 3);
73+
fwdIcon = FontImage.createMaterial(FontImage.MATERIAL_FAST_FORWARD, "Button", 3);
74+
backIcon = FontImage.createMaterial(FontImage.MATERIAL_FAST_REWIND, "Button", 3);
7075
}
71-
76+
7277
/**
7378
* Empty constructor
7479
*/
7580
public MediaPlayer(Media video) {
81+
this();
7682
this.video = video;
7783
initUI();
7884
}

0 commit comments

Comments
 (0)