SlideShare a Scribd company logo
Creating a Facebook Clone - Part III
Splash Screen
© Codename One 2017 all rights reserved
public class UIController {
public static void showSplashScreen() {
Form splash = new Form(new BorderLayout(
BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE));
splash.setUIID("SplashForm");
Label logo = new Label("uf308", "IconFont");
logo.setName("Logo");
splash.add(CENTER, logo);
splash.setTransitionOutAnimator(
MorphTransition.
create(1200).
morph("Logo"));
final Motion anim = Motion.createLinearMotion(0, 127, 1000);
anim.start();
UITimer.timer(20, true, splash, () -> {
if(anim.isFinished()) {
showLoginForm();
} else {
logo.getUnselectedStyle().setOpacity(anim.getValue()+127);
logo.repaint();
}
UIController
public class UIController {
public static void showSplashScreen() {
Form splash = new Form(new BorderLayout(
BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE));
splash.setUIID("SplashForm");
Label logo = new Label("uf308", "IconFont");
logo.setName("Logo");
splash.add(CENTER, logo);
splash.setTransitionOutAnimator(
MorphTransition.
create(1200).
morph("Logo"));
final Motion anim = Motion.createLinearMotion(0, 127, 1000);
anim.start();
UITimer.timer(20, true, splash, () -> {
if(anim.isFinished()) {
showLoginForm();
} else {
logo.getUnselectedStyle().setOpacity(anim.getValue()+127);
logo.repaint();
}
UIController
public class UIController {
public static void showSplashScreen() {
Form splash = new Form(new BorderLayout(
BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE));
splash.setUIID("SplashForm");
Label logo = new Label("uf308", "IconFont");
logo.setName("Logo");
splash.add(CENTER, logo);
splash.setTransitionOutAnimator(
MorphTransition.
create(1200).
morph("Logo"));
final Motion anim = Motion.createLinearMotion(0, 127, 1000);
anim.start();
UITimer.timer(20, true, splash, () -> {
if(anim.isFinished()) {
showLoginForm();
} else {
logo.getUnselectedStyle().setOpacity(anim.getValue()+127);
logo.repaint();
}
UIController
public class UIController {
public static void showSplashScreen() {
Form splash = new Form(new BorderLayout(
BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE));
splash.setUIID("SplashForm");
Label logo = new Label("uf308", "IconFont");
logo.setName("Logo");
splash.add(CENTER, logo);
splash.setTransitionOutAnimator(
MorphTransition.
create(1200).
morph("Logo"));
final Motion anim = Motion.createLinearMotion(0, 127, 1000);
anim.start();
UITimer.timer(20, true, splash, () -> {
if(anim.isFinished()) {
showLoginForm();
} else {
logo.getUnselectedStyle().setOpacity(anim.getValue()+127);
logo.repaint();
}
UIController
public class UIController {
public static void showSplashScreen() {
Form splash = new Form(new BorderLayout(
BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE));
splash.setUIID("SplashForm");
Label logo = new Label("uf308", "IconFont");
logo.setName("Logo");
splash.add(CENTER, logo);
splash.setTransitionOutAnimator(
MorphTransition.
create(1200).
morph("Logo"));
final Motion anim = Motion.createLinearMotion(0, 127, 1000);
anim.start();
UITimer.timer(20, true, splash, () -> {
if(anim.isFinished()) {
showLoginForm();
} else {
logo.getUnselectedStyle().setOpacity(anim.getValue()+127);
logo.repaint();
}
UIController
public class UIController {
public static void showSplashScreen() {
Form splash = new Form(new BorderLayout(
BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE));
splash.setUIID("SplashForm");
Label logo = new Label("uf308", "IconFont");
logo.setName("Logo");
splash.add(CENTER, logo);
splash.setTransitionOutAnimator(
MorphTransition.
create(1200).
morph("Logo"));
final Motion anim = Motion.createLinearMotion(0, 127, 1000);
anim.start();
UITimer.timer(20, true, splash, () -> {
if(anim.isFinished()) {
showLoginForm();
} else {
logo.getUnselectedStyle().setOpacity(anim.getValue()+127);
logo.repaint();
}
UIController
splash.setUIID("SplashForm");
Label logo = new Label("uf308", "IconFont");
logo.setName("Logo");
splash.add(CENTER, logo);
splash.setTransitionOutAnimator(
MorphTransition.
create(1200).
morph("Logo"));
final Motion anim = Motion.createLinearMotion(0, 127, 1000);
anim.start();
UITimer.timer(20, true, splash, () -> {
if(anim.isFinished()) {
showLoginForm();
} else {
logo.getUnselectedStyle().setOpacity(anim.getValue()+127);
logo.repaint();
}
});
splash.show();
}
public static void showLoginForm() {
}
}
UIController
splash.setUIID("SplashForm");
Label logo = new Label("uf308", "IconFont");
logo.setName("Logo");
splash.add(CENTER, logo);
splash.setTransitionOutAnimator(
MorphTransition.
create(1200).
morph("Logo"));
final Motion anim = Motion.createLinearMotion(0, 127, 1000);
anim.start();
UITimer.timer(20, true, splash, () -> {
if(anim.isFinished()) {
showLoginForm();
} else {
logo.getUnselectedStyle().setOpacity(anim.getValue()+127);
logo.repaint();
}
});
splash.show();
}
public static void showLoginForm() {
}
}
UIController
SplashForm {
background-color: #4367b3;
margin: 0px;
padding: 0px;
}
theme.css
public void start() {
if(current != null){
current.show();
return;
}
UIController.showSplashScreen();
}
FacebookClone

More Related Content

PDF
Creating a Facebook Clone - Part III - Transcript.pdf
PDF
Creating an Uber Clone - Part VII.pdf
PDF
Макс Грибов — Использование SpriteKit в неигровых приложениях
PDF
Android Wear Essentials
PDF
GCD in Action
PDF
Creating an Uber Clone - Part XXXIX.pdf
PDF
Creating an Uber Clone - Part X.pdf
PDF
Prototype UI
Creating a Facebook Clone - Part III - Transcript.pdf
Creating an Uber Clone - Part VII.pdf
Макс Грибов — Использование SpriteKit в неигровых приложениях
Android Wear Essentials
GCD in Action
Creating an Uber Clone - Part XXXIX.pdf
Creating an Uber Clone - Part X.pdf
Prototype UI

Similar to Creating a Facebook Clone - Part III.pdf (20)

PDF
Android design and Custom views
PDF
Famo.us: From Zero to UI
KEY
I phone勉強会 (2011.11.23)
PDF
Writing videogames with titanium appcelerator
PDF
Prototype UI Intro
PDF
Initial UI Mockup - Part 2.pdf
PDF
Building mobile web apps with Mobello
PDF
HTML5って必要?
KEY
Sbaw090623
PDF
Adapting to Tablets and Desktops - Part 3.pdf
PPTX
Academy PRO: React native - building first scenes
PDF
Modify the following source code so that when the mouse is clicked w.pdf
KEY
Leaving Flatland: getting started with WebGL
PDF
Leaving Interface Builder Behind
PDF
Creating an Uber Clone - Part XXIV.pdf
PPTX
JS.Chi CSS Animations
PDF
Creating an Uber Clone - Part IV.pdf
PPTX
Android Oreo
PPTX
Appsplash'16 session (4) "Ui components & controller"
PPT
Angular animate
Android design and Custom views
Famo.us: From Zero to UI
I phone勉強会 (2011.11.23)
Writing videogames with titanium appcelerator
Prototype UI Intro
Initial UI Mockup - Part 2.pdf
Building mobile web apps with Mobello
HTML5って必要?
Sbaw090623
Adapting to Tablets and Desktops - Part 3.pdf
Academy PRO: React native - building first scenes
Modify the following source code so that when the mouse is clicked w.pdf
Leaving Flatland: getting started with WebGL
Leaving Interface Builder Behind
Creating an Uber Clone - Part XXIV.pdf
JS.Chi CSS Animations
Creating an Uber Clone - Part IV.pdf
Android Oreo
Appsplash'16 session (4) "Ui components & controller"
Angular animate

More from ShaiAlmog1 (20)

PDF
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
PDF
create-netflix-clone-06-client-ui.pdf
PDF
create-netflix-clone-01-introduction_transcript.pdf
PDF
create-netflix-clone-02-server_transcript.pdf
PDF
create-netflix-clone-04-server-continued_transcript.pdf
PDF
create-netflix-clone-01-introduction.pdf
PDF
create-netflix-clone-06-client-ui_transcript.pdf
PDF
create-netflix-clone-03-server.pdf
PDF
create-netflix-clone-04-server-continued.pdf
PDF
create-netflix-clone-05-client-model_transcript.pdf
PDF
create-netflix-clone-03-server_transcript.pdf
PDF
create-netflix-clone-02-server.pdf
PDF
create-netflix-clone-05-client-model.pdf
PDF
Creating a Whatsapp Clone - Part II.pdf
PDF
Creating a Whatsapp Clone - Part IX - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part II - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part V - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part IV - Transcript.pdf
PDF
Creating a Whatsapp Clone - Part IV.pdf
PDF
Creating a Whatsapp Clone - Part I - Transcript.pdf
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-01-introduction.pdf
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-03-server.pdf
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-02-server.pdf
create-netflix-clone-05-client-model.pdf
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
KodekX | Application Modernization Development
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
Dropbox Q2 2025 Financial Results & Investor Presentation
KodekX | Application Modernization Development
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Machine learning based COVID-19 study performance prediction
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MIND Revenue Release Quarter 2 2025 Press Release
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Network Security Unit 5.pdf for BCA BBA.
Programs and apps: productivity, graphics, security and other tools
Electronic commerce courselecture one. Pdf
Advanced methodologies resolving dimensionality complications for autism neur...

Creating a Facebook Clone - Part III.pdf

  • 1. Creating a Facebook Clone - Part III
  • 2. Splash Screen © Codename One 2017 all rights reserved
  • 3. public class UIController { public static void showSplashScreen() { Form splash = new Form(new BorderLayout( BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE)); splash.setUIID("SplashForm"); Label logo = new Label("uf308", "IconFont"); logo.setName("Logo"); splash.add(CENTER, logo); splash.setTransitionOutAnimator( MorphTransition. create(1200). morph("Logo")); final Motion anim = Motion.createLinearMotion(0, 127, 1000); anim.start(); UITimer.timer(20, true, splash, () -> { if(anim.isFinished()) { showLoginForm(); } else { logo.getUnselectedStyle().setOpacity(anim.getValue()+127); logo.repaint(); } UIController
  • 4. public class UIController { public static void showSplashScreen() { Form splash = new Form(new BorderLayout( BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE)); splash.setUIID("SplashForm"); Label logo = new Label("uf308", "IconFont"); logo.setName("Logo"); splash.add(CENTER, logo); splash.setTransitionOutAnimator( MorphTransition. create(1200). morph("Logo")); final Motion anim = Motion.createLinearMotion(0, 127, 1000); anim.start(); UITimer.timer(20, true, splash, () -> { if(anim.isFinished()) { showLoginForm(); } else { logo.getUnselectedStyle().setOpacity(anim.getValue()+127); logo.repaint(); } UIController
  • 5. public class UIController { public static void showSplashScreen() { Form splash = new Form(new BorderLayout( BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE)); splash.setUIID("SplashForm"); Label logo = new Label("uf308", "IconFont"); logo.setName("Logo"); splash.add(CENTER, logo); splash.setTransitionOutAnimator( MorphTransition. create(1200). morph("Logo")); final Motion anim = Motion.createLinearMotion(0, 127, 1000); anim.start(); UITimer.timer(20, true, splash, () -> { if(anim.isFinished()) { showLoginForm(); } else { logo.getUnselectedStyle().setOpacity(anim.getValue()+127); logo.repaint(); } UIController
  • 6. public class UIController { public static void showSplashScreen() { Form splash = new Form(new BorderLayout( BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE)); splash.setUIID("SplashForm"); Label logo = new Label("uf308", "IconFont"); logo.setName("Logo"); splash.add(CENTER, logo); splash.setTransitionOutAnimator( MorphTransition. create(1200). morph("Logo")); final Motion anim = Motion.createLinearMotion(0, 127, 1000); anim.start(); UITimer.timer(20, true, splash, () -> { if(anim.isFinished()) { showLoginForm(); } else { logo.getUnselectedStyle().setOpacity(anim.getValue()+127); logo.repaint(); } UIController
  • 7. public class UIController { public static void showSplashScreen() { Form splash = new Form(new BorderLayout( BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE)); splash.setUIID("SplashForm"); Label logo = new Label("uf308", "IconFont"); logo.setName("Logo"); splash.add(CENTER, logo); splash.setTransitionOutAnimator( MorphTransition. create(1200). morph("Logo")); final Motion anim = Motion.createLinearMotion(0, 127, 1000); anim.start(); UITimer.timer(20, true, splash, () -> { if(anim.isFinished()) { showLoginForm(); } else { logo.getUnselectedStyle().setOpacity(anim.getValue()+127); logo.repaint(); } UIController
  • 8. public class UIController { public static void showSplashScreen() { Form splash = new Form(new BorderLayout( BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE)); splash.setUIID("SplashForm"); Label logo = new Label("uf308", "IconFont"); logo.setName("Logo"); splash.add(CENTER, logo); splash.setTransitionOutAnimator( MorphTransition. create(1200). morph("Logo")); final Motion anim = Motion.createLinearMotion(0, 127, 1000); anim.start(); UITimer.timer(20, true, splash, () -> { if(anim.isFinished()) { showLoginForm(); } else { logo.getUnselectedStyle().setOpacity(anim.getValue()+127); logo.repaint(); } UIController
  • 9. splash.setUIID("SplashForm"); Label logo = new Label("uf308", "IconFont"); logo.setName("Logo"); splash.add(CENTER, logo); splash.setTransitionOutAnimator( MorphTransition. create(1200). morph("Logo")); final Motion anim = Motion.createLinearMotion(0, 127, 1000); anim.start(); UITimer.timer(20, true, splash, () -> { if(anim.isFinished()) { showLoginForm(); } else { logo.getUnselectedStyle().setOpacity(anim.getValue()+127); logo.repaint(); } }); splash.show(); } public static void showLoginForm() { } } UIController
  • 10. splash.setUIID("SplashForm"); Label logo = new Label("uf308", "IconFont"); logo.setName("Logo"); splash.add(CENTER, logo); splash.setTransitionOutAnimator( MorphTransition. create(1200). morph("Logo")); final Motion anim = Motion.createLinearMotion(0, 127, 1000); anim.start(); UITimer.timer(20, true, splash, () -> { if(anim.isFinished()) { showLoginForm(); } else { logo.getUnselectedStyle().setOpacity(anim.getValue()+127); logo.repaint(); } }); splash.show(); } public static void showLoginForm() { } } UIController
  • 11. SplashForm { background-color: #4367b3; margin: 0px; padding: 0px; } theme.css
  • 12. public void start() { if(current != null){ current.show(); return; } UIController.showSplashScreen(); } FacebookClone