SlideShare a Scribd company logo
Creating an Uber Clone - Part XXI
private MapContainer mc;
private AutoCompleteAddressInput lastFocused;
private MapListener lastMapListener;
private UITimer lastTimer;
private Button whereTo;
private Container mapLayer;
private boolean inNavigationMode;
MapForm
private MapContainer mc;
private AutoCompleteAddressInput lastFocused;
private MapListener lastMapListener;
private UITimer lastTimer;
private Button whereTo;
private Container mapLayer;
private boolean inNavigationMode;
MapForm
private MapContainer mc;
private AutoCompleteAddressInput lastFocused;
private MapListener lastMapListener;
private UITimer lastTimer;
private Button whereTo;
private Container mapLayer;
private boolean inNavigationMode;
MapForm
private MapContainer mc;
private AutoCompleteAddressInput lastFocused;
private MapListener lastMapListener;
private UITimer lastTimer;
private Button whereTo;
private Container mapLayer;
private boolean inNavigationMode;
MapForm
private MapContainer mc;
private AutoCompleteAddressInput lastFocused;
private MapListener lastMapListener;
private UITimer lastTimer;
private Button whereTo;
private Container mapLayer;
private boolean inNavigationMode;
MapForm
private MapContainer mc;
private AutoCompleteAddressInput lastFocused;
private MapListener lastMapListener;
private UITimer lastTimer;
private Button whereTo;
private Container mapLayer;
private boolean inNavigationMode;
MapForm
private MapContainer mc;
private AutoCompleteAddressInput lastFocused;
private MapListener lastMapListener;
private UITimer lastTimer;
private Button whereTo;
private Container mapLayer;
private boolean inNavigationMode;
MapForm
void showNavigationToolbar() {
final Container layer = getLayeredPane(MapForm.class, true);
layer.setName("MapFormLayer");
layer.setLayout(new BorderLayout());
final Container pinLayer = getLayeredPane(AutoCompleteAddressInput.class, false);
pinLayer.setName("PinLayer");
pinLayer.setLayout(new BorderLayout(CENTER_BEHAVIOR_CENTER_ABSOLUTE));
Image pin = Resources.getGlobalResources().getImage("Pin.png");
Label pinLabel = new Label(pin);
MapLayout.setHorizontalAlignment(pinLabel, MapLayout.HALIGN.CENTER);
MapLayout.setVerticalAlignment(pinLabel, MapLayout.VALIGN.BOTTOM);
pinLayer.add(CENTER, pinLabel);
Button back = new Button("", "TitleCommand");
FontImage.setMaterialIcon(back, FontImage.MATERIAL_ARROW_BACK);
CompletionContainer cc = new CompletionContainer();
AutoCompleteAddressInput from =
new AutoCompleteAddressInput("Current Location", "From",layer,cc);
AutoCompleteAddressInput to =
new AutoCompleteAddressInput("", "Where To?", layer, cc);
from.setCurrentLocation(LocationService.getCurrentLocation());
Image circle = Image.createImage(square.getWidth(),square.getHeight(),0);
Graphics g = circle.getGraphics();
showNavigationToolbar
void showNavigationToolbar() {
final Container layer = getLayeredPane(MapForm.class, true);
layer.setName("MapFormLayer");
layer.setLayout(new BorderLayout());
final Container pinLayer = getLayeredPane(AutoCompleteAddressInput.class, false);
pinLayer.setName("PinLayer");
pinLayer.setLayout(new BorderLayout(CENTER_BEHAVIOR_CENTER_ABSOLUTE));
Image pin = Resources.getGlobalResources().getImage("Pin.png");
Label pinLabel = new Label(pin);
MapLayout.setHorizontalAlignment(pinLabel, MapLayout.HALIGN.CENTER);
MapLayout.setVerticalAlignment(pinLabel, MapLayout.VALIGN.BOTTOM);
pinLayer.add(CENTER, pinLabel);
Button back = new Button("", "TitleCommand");
FontImage.setMaterialIcon(back, FontImage.MATERIAL_ARROW_BACK);
CompletionContainer cc = new CompletionContainer();
AutoCompleteAddressInput from =
new AutoCompleteAddressInput("Current Location", "From",layer,cc);
AutoCompleteAddressInput to =
new AutoCompleteAddressInput("", "Where To?", layer, cc);
from.setCurrentLocation(LocationService.getCurrentLocation());
Image circle = Image.createImage(square.getWidth(),square.getHeight(),0);
Graphics g = circle.getGraphics();
showNavigationToolbar
from.setCurrentLocation(LocationService.getCurrentLocation());
Image circle = Image.createImage(square.getWidth(),square.getHeight(),0);
Graphics g = circle.getGraphics();
g.setColor(0xa4a4ac);
g.setAntiAliased(true);
g.fillArc(0, 0, circle.getWidth(), circle.getHeight(), 0, 360);
final Label fromSelected = new Label(circle);
final Label toSelected = new Label(square);
SearchService.nameMyCurrentLocation(
LocationService.getCurrentLocation(), name -> from.setTextNoEvent(name));
to.requestFocus();
lastFocused = to;
from.addFocusListener(new FocusListener() {
@Override
public void focusGained(Component cmp) {
fromSelected.setIcon(square);
lastFocused = from;
}
@Override
public void focusLost(Component cmp) {
fromSelected.setIcon(circle);
}
showNavigationToolbar
@Override
public void focusLost(Component cmp) {
toSelected.setIcon(circle);
}
});
addMapListener((source, zoom, center) -> {
if(lastTimer != null) {
lastTimer.cancel();
}
lastTimer = UITimer.timer(500, false, () -> {
lastTimer = null;
SearchService.nameMyCurrentLocation(
new Location(center.getLatitude(), center.getLongitude()),
name -> {
lastFocused.setTextNoEvent(name);
lastFocused.setCurrentLocation(
new Location(center.getLatitude(), center.getLongitude()));
});
});
});
Container navigationToolbar = BoxLayout.encloseY(back,
showNavigationToolbar
lastFocused.setCurrentLocation(
new Location(center.getLatitude(), center.getLongitude()));
});
});
});
Container navigationToolbar = BoxLayout.encloseY(back,
BorderLayout.centerCenterEastWest(from, null, fromSelected),
BorderLayout.centerCenterEastWest(to, null, toSelected)
);
navigationToolbar.setUIID("WhereToToolbar");
navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> {
g1.setAlpha(255);
g1.setColor(0xffffff);
if(dropShadow != null) {
if(((BorderLayout)layer.getLayout()).getCenter() != null) {
g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight());
}
g1.drawImage(dropShadow, rect.getX() - shadowHeight, rect.getY() +
rect.getHeight() - dropShadow.getHeight() / 4 * 3);
g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getY() +
rect.getHeight() - shadowHeight);
} else {
showNavigationToolbar
g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getY() +
rect.getHeight() - shadowHeight);
} else {
g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight());
}
g1.setColor(0xa4a4ac);
g1.setAntiAliased(true);
int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1;
int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 +
circle.getHeight() / 2;
g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y +
toSelected.getHeight() / 2 - circle.getHeight() / 2);
});
cc.addCompletionListener(e -> {
if(to.getCurrentLocation() != null) {
SearchService.directions(from.getCurrentLocation(), to.getCurrentLocation(),
(path, duration, distance) -> {
enterNavigationMode(pinLayer, navigationToolbar, layer, path,
from.getText(), to.getText(), duration);
});
}
showNavigationToolbar
SearchService.directions(from.getCurrentLocation(), to.getCurrentLocation(),
(path, duration, distance) -> {
enterNavigationMode(pinLayer, navigationToolbar, layer, path,
from.getText(), to.getText(), duration);
});
}
});
back.addActionListener(e -> {
pinLayer.removeAll();
navigationToolbar.setY(-navigationToolbar.getHeight());
layer.getComponentAt(1).setY(getDisplayHeight());
navigationToolbar.getParent().animateUnlayout(200, 120, () -> {
layer.removeAll();
revalidate();
});
});
layer.add(NORTH, navigationToolbar);
navigationToolbar.setWidth(getDisplayWidth());
navigationToolbar.setHeight(getPreferredH());
navigationToolbar.setY(-navigationToolbar.getHeight());
getAnimationManager().addAnimation(layer.createAnimateLayout(200),
() -> cc.showCompletionBar(layer));
}
showNavigationToolbar
private void addMapListener(MapListener ml) {
if(lastMapListener != null) {
mc.removeMapListener(lastMapListener);
}
lastMapListener = ml;
mc.addMapListener(ml);
}
addMapListener

More Related Content

PDF
Creating an Uber Clone - Part XXI - Transcript.pdf
PDF
Creating an Uber Clone - Part XXIII.pdf
PDF
Creating an Uber Clone - Part XXIII - Transcript.pdf
PDF
Creating an Uber Clone - Part VIII - Transcript.pdf
PDF
Creating an Uber Clone - Part XXX.pdf
PDF
Creating an Uber Clone - Part VII - Transcript.pdf
PDF
Creating an Uber Clone - Part XX - Transcript.pdf
PDF
Creating an Uber Clone - Part IX.pdf
Creating an Uber Clone - Part XXI - Transcript.pdf
Creating an Uber Clone - Part XXIII.pdf
Creating an Uber Clone - Part XXIII - Transcript.pdf
Creating an Uber Clone - Part VIII - Transcript.pdf
Creating an Uber Clone - Part XXX.pdf
Creating an Uber Clone - Part VII - Transcript.pdf
Creating an Uber Clone - Part XX - Transcript.pdf
Creating an Uber Clone - Part IX.pdf

Similar to Creating an Uber Clone - Part XXI.pdf (10)

PDF
Creating an Uber Clone - Part VII.pdf
PDF
Creating an Uber Clone - Part XVI.pdf
PDF
Creating an Uber Clone - Part VIII.pdf
PDF
Creating an Uber Clone - Part XIX.pdf
PDF
Creating an Uber Clone - Part XX.pdf
PDF
Creating an Uber Clone - Part XXX - Transcript.pdf
PDF
Creating an Uber Clone - Part XIX - Transcript.pdf
PDF
Creating an Uber Clone - Part XVII.pdf
PDF
Creating an Uber Clone - Part XXIX.pdf
PDF
Creating an Uber Clone - Part XXII.pdf
Creating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part XVI.pdf
Creating an Uber Clone - Part VIII.pdf
Creating an Uber Clone - Part XIX.pdf
Creating an Uber Clone - Part XX.pdf
Creating an Uber Clone - Part XXX - Transcript.pdf
Creating an Uber Clone - Part XIX - Transcript.pdf
Creating an Uber Clone - Part XVII.pdf
Creating an Uber Clone - Part XXIX.pdf
Creating an Uber Clone - Part XXII.pdf
Ad

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
Ad

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Machine Learning_overview_presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Cloud computing and distributed systems.
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx
Machine learning based COVID-19 study performance prediction
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Digital-Transformation-Roadmap-for-Companies.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Dropbox Q2 2025 Financial Results & Investor Presentation
Machine Learning_overview_presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Spectroscopy.pptx food analysis technology
Cloud computing and distributed systems.
A comparative analysis of optical character recognition models for extracting...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
“AI and Expert System Decision Support & Business Intelligence Systems”

Creating an Uber Clone - Part XXI.pdf

  • 1. Creating an Uber Clone - Part XXI
  • 2. private MapContainer mc; private AutoCompleteAddressInput lastFocused; private MapListener lastMapListener; private UITimer lastTimer; private Button whereTo; private Container mapLayer; private boolean inNavigationMode; MapForm
  • 3. private MapContainer mc; private AutoCompleteAddressInput lastFocused; private MapListener lastMapListener; private UITimer lastTimer; private Button whereTo; private Container mapLayer; private boolean inNavigationMode; MapForm
  • 4. private MapContainer mc; private AutoCompleteAddressInput lastFocused; private MapListener lastMapListener; private UITimer lastTimer; private Button whereTo; private Container mapLayer; private boolean inNavigationMode; MapForm
  • 5. private MapContainer mc; private AutoCompleteAddressInput lastFocused; private MapListener lastMapListener; private UITimer lastTimer; private Button whereTo; private Container mapLayer; private boolean inNavigationMode; MapForm
  • 6. private MapContainer mc; private AutoCompleteAddressInput lastFocused; private MapListener lastMapListener; private UITimer lastTimer; private Button whereTo; private Container mapLayer; private boolean inNavigationMode; MapForm
  • 7. private MapContainer mc; private AutoCompleteAddressInput lastFocused; private MapListener lastMapListener; private UITimer lastTimer; private Button whereTo; private Container mapLayer; private boolean inNavigationMode; MapForm
  • 8. private MapContainer mc; private AutoCompleteAddressInput lastFocused; private MapListener lastMapListener; private UITimer lastTimer; private Button whereTo; private Container mapLayer; private boolean inNavigationMode; MapForm
  • 9. void showNavigationToolbar() { final Container layer = getLayeredPane(MapForm.class, true); layer.setName("MapFormLayer"); layer.setLayout(new BorderLayout()); final Container pinLayer = getLayeredPane(AutoCompleteAddressInput.class, false); pinLayer.setName("PinLayer"); pinLayer.setLayout(new BorderLayout(CENTER_BEHAVIOR_CENTER_ABSOLUTE)); Image pin = Resources.getGlobalResources().getImage("Pin.png"); Label pinLabel = new Label(pin); MapLayout.setHorizontalAlignment(pinLabel, MapLayout.HALIGN.CENTER); MapLayout.setVerticalAlignment(pinLabel, MapLayout.VALIGN.BOTTOM); pinLayer.add(CENTER, pinLabel); Button back = new Button("", "TitleCommand"); FontImage.setMaterialIcon(back, FontImage.MATERIAL_ARROW_BACK); CompletionContainer cc = new CompletionContainer(); AutoCompleteAddressInput from = new AutoCompleteAddressInput("Current Location", "From",layer,cc); AutoCompleteAddressInput to = new AutoCompleteAddressInput("", "Where To?", layer, cc); from.setCurrentLocation(LocationService.getCurrentLocation()); Image circle = Image.createImage(square.getWidth(),square.getHeight(),0); Graphics g = circle.getGraphics(); showNavigationToolbar
  • 10. void showNavigationToolbar() { final Container layer = getLayeredPane(MapForm.class, true); layer.setName("MapFormLayer"); layer.setLayout(new BorderLayout()); final Container pinLayer = getLayeredPane(AutoCompleteAddressInput.class, false); pinLayer.setName("PinLayer"); pinLayer.setLayout(new BorderLayout(CENTER_BEHAVIOR_CENTER_ABSOLUTE)); Image pin = Resources.getGlobalResources().getImage("Pin.png"); Label pinLabel = new Label(pin); MapLayout.setHorizontalAlignment(pinLabel, MapLayout.HALIGN.CENTER); MapLayout.setVerticalAlignment(pinLabel, MapLayout.VALIGN.BOTTOM); pinLayer.add(CENTER, pinLabel); Button back = new Button("", "TitleCommand"); FontImage.setMaterialIcon(back, FontImage.MATERIAL_ARROW_BACK); CompletionContainer cc = new CompletionContainer(); AutoCompleteAddressInput from = new AutoCompleteAddressInput("Current Location", "From",layer,cc); AutoCompleteAddressInput to = new AutoCompleteAddressInput("", "Where To?", layer, cc); from.setCurrentLocation(LocationService.getCurrentLocation()); Image circle = Image.createImage(square.getWidth(),square.getHeight(),0); Graphics g = circle.getGraphics(); showNavigationToolbar
  • 11. from.setCurrentLocation(LocationService.getCurrentLocation()); Image circle = Image.createImage(square.getWidth(),square.getHeight(),0); Graphics g = circle.getGraphics(); g.setColor(0xa4a4ac); g.setAntiAliased(true); g.fillArc(0, 0, circle.getWidth(), circle.getHeight(), 0, 360); final Label fromSelected = new Label(circle); final Label toSelected = new Label(square); SearchService.nameMyCurrentLocation( LocationService.getCurrentLocation(), name -> from.setTextNoEvent(name)); to.requestFocus(); lastFocused = to; from.addFocusListener(new FocusListener() { @Override public void focusGained(Component cmp) { fromSelected.setIcon(square); lastFocused = from; } @Override public void focusLost(Component cmp) { fromSelected.setIcon(circle); } showNavigationToolbar
  • 12. @Override public void focusLost(Component cmp) { toSelected.setIcon(circle); } }); addMapListener((source, zoom, center) -> { if(lastTimer != null) { lastTimer.cancel(); } lastTimer = UITimer.timer(500, false, () -> { lastTimer = null; SearchService.nameMyCurrentLocation( new Location(center.getLatitude(), center.getLongitude()), name -> { lastFocused.setTextNoEvent(name); lastFocused.setCurrentLocation( new Location(center.getLatitude(), center.getLongitude())); }); }); }); Container navigationToolbar = BoxLayout.encloseY(back, showNavigationToolbar
  • 13. lastFocused.setCurrentLocation( new Location(center.getLatitude(), center.getLongitude())); }); }); }); Container navigationToolbar = BoxLayout.encloseY(back, BorderLayout.centerCenterEastWest(from, null, fromSelected), BorderLayout.centerCenterEastWest(to, null, toSelected) ); navigationToolbar.setUIID("WhereToToolbar"); navigationToolbar.getUnselectedStyle().setBgPainter((g1, rect) -> { g1.setAlpha(255); g1.setColor(0xffffff); if(dropShadow != null) { if(((BorderLayout)layer.getLayout()).getCenter() != null) { g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight()); } g1.drawImage(dropShadow, rect.getX() - shadowHeight, rect.getY() + rect.getHeight() - dropShadow.getHeight() / 4 * 3); g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getY() + rect.getHeight() - shadowHeight); } else { showNavigationToolbar
  • 14. g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getY() + rect.getHeight() - shadowHeight); } else { g1.fillRect(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight()); } g1.setColor(0xa4a4ac); g1.setAntiAliased(true); int x = fromSelected.getAbsoluteX() + fromSelected.getWidth() / 2 - 1; int y = fromSelected.getAbsoluteY() + fromSelected.getHeight() / 2 + circle.getHeight() / 2; g1.fillRect(x, y, 2, toSelected.getAbsoluteY() - y + toSelected.getHeight() / 2 - circle.getHeight() / 2); }); cc.addCompletionListener(e -> { if(to.getCurrentLocation() != null) { SearchService.directions(from.getCurrentLocation(), to.getCurrentLocation(), (path, duration, distance) -> { enterNavigationMode(pinLayer, navigationToolbar, layer, path, from.getText(), to.getText(), duration); }); } showNavigationToolbar
  • 15. SearchService.directions(from.getCurrentLocation(), to.getCurrentLocation(), (path, duration, distance) -> { enterNavigationMode(pinLayer, navigationToolbar, layer, path, from.getText(), to.getText(), duration); }); } }); back.addActionListener(e -> { pinLayer.removeAll(); navigationToolbar.setY(-navigationToolbar.getHeight()); layer.getComponentAt(1).setY(getDisplayHeight()); navigationToolbar.getParent().animateUnlayout(200, 120, () -> { layer.removeAll(); revalidate(); }); }); layer.add(NORTH, navigationToolbar); navigationToolbar.setWidth(getDisplayWidth()); navigationToolbar.setHeight(getPreferredH()); navigationToolbar.setY(-navigationToolbar.getHeight()); getAnimationManager().addAnimation(layer.createAnimateLayout(200), () -> cc.showCompletionBar(layer)); } showNavigationToolbar
  • 16. private void addMapListener(MapListener ml) { if(lastMapListener != null) { mc.removeMapListener(lastMapListener); } lastMapListener = ml; mc.addMapListener(ml); } addMapListener