SlideShare a Scribd company logo
Creating an Uber Clone - Part XXIV
Hailing
© Codename One 2017 all rights reserved
blackButton.addActionListener(e -> {
exitNavigationMode(layer, fromComponent, toComponent, pathObject);
Label searching = new Label("Finding your ride",
Resources.getGlobalResources().getImage("searching-cab-icon.png"),
"SearchingDialog");
pinLayer.add(SOUTH, searching);
pinLayer.getUnselectedStyle().setBgColor(0);
pinLayer.getUnselectedStyle().setBgTransparency(120);
pinLayer.add(CENTER, new BlinkDot());
LocationService.hailRide(from, to, car -> {
pinLayer.getUnselectedStyle().setBgTransparency(0);
pinLayer.removeAll();
});
});
enterNavigationMode
blackButton.addActionListener(e -> {
exitNavigationMode(layer, fromComponent, toComponent, pathObject);
Label searching = new Label("Finding your ride",
Resources.getGlobalResources().getImage("searching-cab-icon.png"),
"SearchingDialog");
pinLayer.add(SOUTH, searching);
pinLayer.getUnselectedStyle().setBgColor(0);
pinLayer.getUnselectedStyle().setBgTransparency(120);
pinLayer.add(CENTER, new BlinkDot());
LocationService.hailRide(from, to, car -> {
pinLayer.getUnselectedStyle().setBgTransparency(0);
pinLayer.removeAll();
});
});
enterNavigationMode
blackButton.addActionListener(e -> {
exitNavigationMode(layer, fromComponent, toComponent, pathObject);
Label searching = new Label("Finding your ride",
Resources.getGlobalResources().getImage("searching-cab-icon.png"),
"SearchingDialog");
pinLayer.add(SOUTH, searching);
pinLayer.getUnselectedStyle().setBgColor(0);
pinLayer.getUnselectedStyle().setBgTransparency(120);
pinLayer.add(CENTER, new BlinkDot());
LocationService.hailRide(from, to, car -> {
pinLayer.getUnselectedStyle().setBgTransparency(0);
pinLayer.removeAll();
});
});
enterNavigationMode
blackButton.addActionListener(e -> {
exitNavigationMode(layer, fromComponent, toComponent, pathObject);
Label searching = new Label("Finding your ride",
Resources.getGlobalResources().getImage("searching-cab-icon.png"),
"SearchingDialog");
pinLayer.add(SOUTH, searching);
pinLayer.getUnselectedStyle().setBgColor(0);
pinLayer.getUnselectedStyle().setBgTransparency(120);
pinLayer.add(CENTER, new BlinkDot());
LocationService.hailRide(from, to, car -> {
pinLayer.getUnselectedStyle().setBgTransparency(0);
pinLayer.removeAll();
});
});
enterNavigationMode
SearchingDialog
© Codename One 2017 all rights reserved
SearchingDialog
© Codename One 2017 all rights reserved
SearchingDialog
© Codename One 2017 all rights reserved
SearchingDialog
© Codename One 2017 all rights reserved
SearchingDialog
© Codename One 2017 all rights reserved
public class BlinkDot extends Component {
private int value;
private Motion growth;
public BlinkDot() {
setUIID("Label");
}
@Override
protected void initComponent() {
super.initComponent();
getComponentForm().registerAnimated(this);
}
@Override
protected void deinitialize() {
getComponentForm().deregisterAnimated(this);
super.deinitialize();
}
@Override
public boolean animate() {
if(growth == null || growth.isFinished()) {
growth = Motion.createEaseInOutMotion(3, getWidth() / 2, 1000);
growth.start();
}
int newValue = growth.getValue();
if(newValue != value) {
value = newValue;
return true;
}
BlinkDot
public class BlinkDot extends Component {
private int value;
private Motion growth;
public BlinkDot() {
setUIID("Label");
}
@Override
protected void initComponent() {
super.initComponent();
getComponentForm().registerAnimated(this);
}
@Override
protected void deinitialize() {
getComponentForm().deregisterAnimated(this);
super.deinitialize();
}
@Override
public boolean animate() {
if(growth == null || growth.isFinished()) {
growth = Motion.createEaseInOutMotion(3, getWidth() / 2, 1000);
growth.start();
}
int newValue = growth.getValue();
if(newValue != value) {
value = newValue;
return true;
}
BlinkDot
public class BlinkDot extends Component {
private int value;
private Motion growth;
public BlinkDot() {
setUIID("Label");
}
@Override
protected void initComponent() {
super.initComponent();
getComponentForm().registerAnimated(this);
}
@Override
protected void deinitialize() {
getComponentForm().deregisterAnimated(this);
super.deinitialize();
}
@Override
public boolean animate() {
if(growth == null || growth.isFinished()) {
growth = Motion.createEaseInOutMotion(3, getWidth() / 2, 1000);
growth.start();
}
int newValue = growth.getValue();
if(newValue != value) {
value = newValue;
return true;
}
BlinkDot
growth.start();
}
int newValue = growth.getValue();
if(newValue != value) {
value = newValue;
return true;
}
return false;
}
@Override
public void paint(Graphics g) {
g.setAlpha(255);
g.setColor(0x297aa7);
int s = convertToPixels(2);
g.setAntiAliased(true);
g.fillArc(getX() + getWidth() / 2 - s / 2, getY() + getHeight() / 2 -
s / 2, s, s, 0, 360);
g.drawArc(getX() + getWidth() / 2 - value,
getY() + getHeight() / 2 - value, value * 2, value * 2, 0, 360);
g.drawArc(getX() + getWidth() / 2 - value - 1, getY() + getHeight() / 2 -
value - 1, value * 2 + 1, value * 2 + 1, 0, 360);
}
@Override
protected Dimension calcPreferredSize() {
int s = convertToPixels(15);
return new Dimension(s, s);
}
BlinkDot

More Related Content

Similar to Creating an Uber Clone - Part XXIV.pdf

Creating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdfCreating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdf
ShaiAlmog1
 
Creating a Facebook Clone - Part XXXVI - Transcript.pdf
Creating a Facebook Clone - Part XXXVI - Transcript.pdfCreating a Facebook Clone - Part XXXVI - Transcript.pdf
Creating a Facebook Clone - Part XXXVI - Transcript.pdf
ShaiAlmog1
 
Why SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScriptWhy SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScriptmartinlippert
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
Ryunosuke SATO
 
Creating a Facebook Clone - Part XXXVI.pdf
Creating a Facebook Clone - Part XXXVI.pdfCreating a Facebook Clone - Part XXXVI.pdf
Creating a Facebook Clone - Part XXXVI.pdf
ShaiAlmog1
 
前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说Ting Lv
 
662305 11
662305 11662305 11
Leaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGLLeaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGL
gerbille
 
Creating an Uber Clone - Part VIII.pdf
Creating an Uber Clone - Part VIII.pdfCreating an Uber Clone - Part VIII.pdf
Creating an Uber Clone - Part VIII.pdf
ShaiAlmog1
 
Mobile Game and Application with J2ME - Collision Detection
Mobile Gameand Application withJ2ME  - Collision DetectionMobile Gameand Application withJ2ME  - Collision Detection
Mobile Game and Application with J2ME - Collision Detection
Jenchoke Tachagomain
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2ME
Jenchoke Tachagomain
 
JavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScriptJavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScript
Laurence Svekis ✔
 
Creating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdfCreating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdf
ShaiAlmog1
 
HTML5って必要?
HTML5って必要?HTML5って必要?
HTML5って必要?
GCS2013
 
The next step, part 2
The next step, part 2The next step, part 2
The next step, part 2
Pat Cavit
 
Creating an Uber Clone - Part XXIX - Transcript.pdf
Creating an Uber Clone - Part XXIX - Transcript.pdfCreating an Uber Clone - Part XXIX - Transcript.pdf
Creating an Uber Clone - Part XXIX - Transcript.pdf
ShaiAlmog1
 
Build Lightweight Web Module
Build Lightweight Web ModuleBuild Lightweight Web Module
Build Lightweight Web ModuleMorgan Cheng
 

Similar to Creating an Uber Clone - Part XXIV.pdf (20)

Creating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdfCreating an Uber Clone - Part XXXX.pdf
Creating an Uber Clone - Part XXXX.pdf
 
Creating a Facebook Clone - Part XXXVI - Transcript.pdf
Creating a Facebook Clone - Part XXXVI - Transcript.pdfCreating a Facebook Clone - Part XXXVI - Transcript.pdf
Creating a Facebook Clone - Part XXXVI - Transcript.pdf
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Why SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScriptWhy SOLID matters - even for JavaScript
Why SOLID matters - even for JavaScript
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
 
Creating a Facebook Clone - Part XXXVI.pdf
Creating a Facebook Clone - Part XXXVI.pdfCreating a Facebook Clone - Part XXXVI.pdf
Creating a Facebook Clone - Part XXXVI.pdf
 
前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
 
662305 11
662305 11662305 11
662305 11
 
Sbaw091117
Sbaw091117Sbaw091117
Sbaw091117
 
Leaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGLLeaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGL
 
Creating an Uber Clone - Part VIII.pdf
Creating an Uber Clone - Part VIII.pdfCreating an Uber Clone - Part VIII.pdf
Creating an Uber Clone - Part VIII.pdf
 
Mobile Game and Application with J2ME - Collision Detection
Mobile Gameand Application withJ2ME  - Collision DetectionMobile Gameand Application withJ2ME  - Collision Detection
Mobile Game and Application with J2ME - Collision Detection
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2ME
 
JavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScriptJavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScript
 
662305 LAB13
662305 LAB13662305 LAB13
662305 LAB13
 
Creating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdfCreating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdf
 
HTML5って必要?
HTML5って必要?HTML5って必要?
HTML5って必要?
 
The next step, part 2
The next step, part 2The next step, part 2
The next step, part 2
 
Creating an Uber Clone - Part XXIX - Transcript.pdf
Creating an Uber Clone - Part XXIX - Transcript.pdfCreating an Uber Clone - Part XXIX - Transcript.pdf
Creating an Uber Clone - Part XXIX - Transcript.pdf
 
Build Lightweight Web Module
Build Lightweight Web ModuleBuild Lightweight Web Module
Build Lightweight Web Module
 

More from ShaiAlmog1

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 ...
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdf
ShaiAlmog1
 
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
ShaiAlmog1
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdf
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdf
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
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
ShaiAlmog1
 
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
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

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

Creating an Uber Clone - Part XXIV.pdf

  • 1. Creating an Uber Clone - Part XXIV
  • 2. Hailing © Codename One 2017 all rights reserved
  • 3. blackButton.addActionListener(e -> { exitNavigationMode(layer, fromComponent, toComponent, pathObject); Label searching = new Label("Finding your ride", Resources.getGlobalResources().getImage("searching-cab-icon.png"), "SearchingDialog"); pinLayer.add(SOUTH, searching); pinLayer.getUnselectedStyle().setBgColor(0); pinLayer.getUnselectedStyle().setBgTransparency(120); pinLayer.add(CENTER, new BlinkDot()); LocationService.hailRide(from, to, car -> { pinLayer.getUnselectedStyle().setBgTransparency(0); pinLayer.removeAll(); }); }); enterNavigationMode
  • 4. blackButton.addActionListener(e -> { exitNavigationMode(layer, fromComponent, toComponent, pathObject); Label searching = new Label("Finding your ride", Resources.getGlobalResources().getImage("searching-cab-icon.png"), "SearchingDialog"); pinLayer.add(SOUTH, searching); pinLayer.getUnselectedStyle().setBgColor(0); pinLayer.getUnselectedStyle().setBgTransparency(120); pinLayer.add(CENTER, new BlinkDot()); LocationService.hailRide(from, to, car -> { pinLayer.getUnselectedStyle().setBgTransparency(0); pinLayer.removeAll(); }); }); enterNavigationMode
  • 5. blackButton.addActionListener(e -> { exitNavigationMode(layer, fromComponent, toComponent, pathObject); Label searching = new Label("Finding your ride", Resources.getGlobalResources().getImage("searching-cab-icon.png"), "SearchingDialog"); pinLayer.add(SOUTH, searching); pinLayer.getUnselectedStyle().setBgColor(0); pinLayer.getUnselectedStyle().setBgTransparency(120); pinLayer.add(CENTER, new BlinkDot()); LocationService.hailRide(from, to, car -> { pinLayer.getUnselectedStyle().setBgTransparency(0); pinLayer.removeAll(); }); }); enterNavigationMode
  • 6. blackButton.addActionListener(e -> { exitNavigationMode(layer, fromComponent, toComponent, pathObject); Label searching = new Label("Finding your ride", Resources.getGlobalResources().getImage("searching-cab-icon.png"), "SearchingDialog"); pinLayer.add(SOUTH, searching); pinLayer.getUnselectedStyle().setBgColor(0); pinLayer.getUnselectedStyle().setBgTransparency(120); pinLayer.add(CENTER, new BlinkDot()); LocationService.hailRide(from, to, car -> { pinLayer.getUnselectedStyle().setBgTransparency(0); pinLayer.removeAll(); }); }); enterNavigationMode
  • 7. SearchingDialog © Codename One 2017 all rights reserved
  • 8. SearchingDialog © Codename One 2017 all rights reserved
  • 9. SearchingDialog © Codename One 2017 all rights reserved
  • 10. SearchingDialog © Codename One 2017 all rights reserved
  • 11. SearchingDialog © Codename One 2017 all rights reserved
  • 12. public class BlinkDot extends Component { private int value; private Motion growth; public BlinkDot() { setUIID("Label"); } @Override protected void initComponent() { super.initComponent(); getComponentForm().registerAnimated(this); } @Override protected void deinitialize() { getComponentForm().deregisterAnimated(this); super.deinitialize(); } @Override public boolean animate() { if(growth == null || growth.isFinished()) { growth = Motion.createEaseInOutMotion(3, getWidth() / 2, 1000); growth.start(); } int newValue = growth.getValue(); if(newValue != value) { value = newValue; return true; } BlinkDot
  • 13. public class BlinkDot extends Component { private int value; private Motion growth; public BlinkDot() { setUIID("Label"); } @Override protected void initComponent() { super.initComponent(); getComponentForm().registerAnimated(this); } @Override protected void deinitialize() { getComponentForm().deregisterAnimated(this); super.deinitialize(); } @Override public boolean animate() { if(growth == null || growth.isFinished()) { growth = Motion.createEaseInOutMotion(3, getWidth() / 2, 1000); growth.start(); } int newValue = growth.getValue(); if(newValue != value) { value = newValue; return true; } BlinkDot
  • 14. public class BlinkDot extends Component { private int value; private Motion growth; public BlinkDot() { setUIID("Label"); } @Override protected void initComponent() { super.initComponent(); getComponentForm().registerAnimated(this); } @Override protected void deinitialize() { getComponentForm().deregisterAnimated(this); super.deinitialize(); } @Override public boolean animate() { if(growth == null || growth.isFinished()) { growth = Motion.createEaseInOutMotion(3, getWidth() / 2, 1000); growth.start(); } int newValue = growth.getValue(); if(newValue != value) { value = newValue; return true; } BlinkDot
  • 15. growth.start(); } int newValue = growth.getValue(); if(newValue != value) { value = newValue; return true; } return false; } @Override public void paint(Graphics g) { g.setAlpha(255); g.setColor(0x297aa7); int s = convertToPixels(2); g.setAntiAliased(true); g.fillArc(getX() + getWidth() / 2 - s / 2, getY() + getHeight() / 2 - s / 2, s, s, 0, 360); g.drawArc(getX() + getWidth() / 2 - value, getY() + getHeight() / 2 - value, value * 2, value * 2, 0, 360); g.drawArc(getX() + getWidth() / 2 - value - 1, getY() + getHeight() / 2 - value - 1, value * 2 + 1, value * 2 + 1, 0, 360); } @Override protected Dimension calcPreferredSize() { int s = convertToPixels(15); return new Dimension(s, s); } BlinkDot