SlideShare a Scribd company logo
1 of 12
Download to read offline
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

Similar to Creating a Facebook Clone - Part III.pdf

Android design and Custom views
Android design and Custom views Android design and Custom views
Android design and Custom views
Lars Vogel
 
Modify the following source code so that when the mouse is clicked w.pdf
Modify the following source code so that when the mouse is clicked w.pdfModify the following source code so that when the mouse is clicked w.pdf
Modify the following source code so that when the mouse is clicked w.pdf
arorastores
 
JS.Chi CSS Animations
JS.Chi CSS AnimationsJS.Chi CSS Animations
JS.Chi CSS Animations
Justin Meyer
 

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

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

More from ShaiAlmog1

More from ShaiAlmog1 (20)

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

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

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