The document discusses the iPhone SDK. It includes code snippets and descriptions of various UIKit classes and components used for building iPhone applications, such as UIImageView, CALayer, UITableView, and more. It provides examples of how to load and cache images, implement pull-to-refresh functionality in a UITableView, and animate UI elements like buttons.
La conférence « ProTips » de Mathias Seguy (Android2EE).
Cette conférence a eu lieu lors du BarCamp de la DroidCon Paris, Lundi 17 Juin 2013.
Si vous êtes un JUG ou un AUG et que cette conférence vous interesse, n'hésitez pas à me contacter.
Si vous souhaitez apprendre la technologie Android, contacter moi: mathias.seguy@android2ee.com, je suis formateur Android et les formations Android que je dispense sont exceptionnelles.
Speaker:Mathias est le fondateur de la société Android2ee spécialisée dans la technologie Android.
Il est :
• formateur Android,
• expert logiciel Android,
• speaker Android sur de grandes conférences Java : AndroidCon, Devoxx France, Eclipse Day Toulouse, JCertif Africa, Toulouse JUG, CocoAhead,…
• Rédacteur Android sur Developpez.com ;
• Programmateur Android : MyLight, MyTorch, MySensors, JCertifMobile disponibles sur GooglePlay ;
• Docteur en Mathématiques Fondamentales et Ingénieur de l’ENSEEIHT ;
• Expert technique de l’agence nationale de la recherche française ;
Il présentera au cours de cette conférence sa vision sur la mise en place d’une architecture d’une application Android pertinente et partagera les meilleurs pro-tips (astuces de pro) de sa connaissance. A ne pas manquez.
Mathias Séguy
mathias.seguy@android2ee.com
Fondateur Android2EE
Formation – Expertise – Consulting Android.
Ebooks pour apprendre la programmation sous Android.
The document discusses the iPhone SDK. It includes code snippets and descriptions of various UIKit classes and components used for building iPhone applications, such as UIImageView, CALayer, UITableView, and more. It provides examples of how to load and cache images, implement pull-to-refresh functionality in a UITableView, and animate UI elements like buttons.
La conférence « ProTips » de Mathias Seguy (Android2EE).
Cette conférence a eu lieu lors du BarCamp de la DroidCon Paris, Lundi 17 Juin 2013.
Si vous êtes un JUG ou un AUG et que cette conférence vous interesse, n'hésitez pas à me contacter.
Si vous souhaitez apprendre la technologie Android, contacter moi: mathias.seguy@android2ee.com, je suis formateur Android et les formations Android que je dispense sont exceptionnelles.
Speaker:Mathias est le fondateur de la société Android2ee spécialisée dans la technologie Android.
Il est :
• formateur Android,
• expert logiciel Android,
• speaker Android sur de grandes conférences Java : AndroidCon, Devoxx France, Eclipse Day Toulouse, JCertif Africa, Toulouse JUG, CocoAhead,…
• Rédacteur Android sur Developpez.com ;
• Programmateur Android : MyLight, MyTorch, MySensors, JCertifMobile disponibles sur GooglePlay ;
• Docteur en Mathématiques Fondamentales et Ingénieur de l’ENSEEIHT ;
• Expert technique de l’agence nationale de la recherche française ;
Il présentera au cours de cette conférence sa vision sur la mise en place d’une architecture d’une application Android pertinente et partagera les meilleurs pro-tips (astuces de pro) de sa connaissance. A ne pas manquez.
Mathias Séguy
mathias.seguy@android2ee.com
Fondateur Android2EE
Formation – Expertise – Consulting Android.
Ebooks pour apprendre la programmation sous Android.
Angular2: Quick overview with 2do app exampleAlexey Frolov
This document provides an overview of Angular 2 including its history, architecture, components, services, and comparisons to React. Some key points include:
- Angular 2 was announced in 2012 and released in 2016, improving on Angular 1.
- It uses TypeScript for type safety and supports both declarative and imperative programming.
- The core aspects of Angular 2 apps are components, which encapsulate templates, styles, and logic, and services which components use to share data.
[Ultracode Munich Meetup #7] Android view customization in a nutshellBeMyApp
Slides by Bernhard Pflug, Senior Android developer @ Iconmobile during the Ulracode Munich Meetup #7
http://www.meetup.com/Ultracode-Munich/events/219689131/
This document provides an overview of key Android development concepts and techniques. It discusses fragments, the support library, dependency injection, image caching, threading and AsyncTask, notifications, supporting multiple screens, and optimizing ListView performance. The document also recommends several popular Android libraries and open source apps that demonstrate best practices.
Forge - DevCon 2016: Visual Reporting with Connected Design DataAutodesk
Viewing a 3D model on a webpage or in a mobile app is really cool, but visualizing design data isn’t just about meshes and textures. In this class Philippe Leefsma of Autodesk will show you how the Forge Model Derivative API and JavaScript viewer give you access to the valuable data associated with each model component that is extracted from the original design file. We will take that a step further and connect those models to an external database to add even richer data. Finally, we will stylize the model to turn a model into a powerful, intuitive reporting tool.
This document provides an overview of Angular and discusses its core concepts and features. It introduces Angular components, templates, dependency injection, forms, routing, modularity, and UI libraries like PrimeNG. It also covers more advanced topics like lazy loading, AOT compilation, change detection, and server-side rendering. The document is meant to help get started with Angular and provide guidance on when and how to use it for building applications. Key recommendations include using the Angular CLI, enabling AOT and lazy loading for production builds, and leveraging PrimeNG for UI components. It also addresses common questions around Angular's stability, comparisons to other frameworks, and whether backend development may be preferable.
After you’ve done all the UI optimizations recommended by UX designers, how do you make your interface even more engaging? That’s where the Samsung Mobile SDK can help. Part 1 of Advancing Your UI introduces you to three new technologies -- Look, Motion, and Gesture – that allow you to create an interface that engages your audience in ways you have not yet explored.
Academy PRO: React native - building first scenesBinary Studio
This document provides an overview of building initial scenes in React Native, including setting up components, styles, state, props, file structure, and networking. It discusses common React Native components like View, Text, Image, ScrollView, ListView, and interaction components. It also covers more advanced topics such as maps, dates pickers, geolocation, cameras, and working with native iOS and Android modules.
MOPCON 2014 - Best software architecture in app developmentanistar sung
Talking about how to build smart design and architecture for app development. Let your app can easy develop and deploy components on your app. And more topic of version control and quality improvement.
The document discusses creating and animating custom views in Android. It covers topics like why to use custom views, the View class hierarchy, drawing and styling custom views, and different techniques for animating views including using Runnables, ValueAnimators, and ObjectAnimators. Key points include how to subclass View, override drawing methods like onDraw(), apply XML styling attributes, and animate view properties over time through interpolation of values.
The document provides an overview of Angular concepts and best practices. It begins with an "Angular Alphabet" that defines essential Angular elements and concepts corresponding to each letter. It then discusses specific concepts in more detail, such as components, directives, services and templates. It concludes by recommending next steps like exploring the Angular glossary, creating a sample project and sharing it for review.
303 TANSTAAFL: Using Open Source iPhone UI Codejonmarimba
This document discusses modifications made to improve the animation and behavior of an open source cover flow library called OpenFlow. The author hacked the code to have a scroll view handle animation instead of core animation for better control. Touch handling was also hijacked to directly control selection instead of relying on scroll view callbacks. Friction was reduced and reflection rendering was adjusted to better match Apple's implementation.
[FEConf Korea 2017]Angular 컴포넌트 대화법Jeado Ko
This document summarizes Angular component communication patterns. It discusses using @Input and @Output to communicate between parent and child components. It also covers using a shared service to communicate between siblings and across the component tree. Services can utilize BehaviorSubject to share state updates through observables. Larger applications may use a state management library like NgRx to introduce a single source of truth via a centralized store.
This document provides an overview of Angular fundamentals including components, directives, pipes, services, and reactive programming concepts. It defines components as reusable UI building blocks that control a view. It demonstrates core directives like NgFor, NgIf, and NgSwitch. It also covers lifecycle hooks, built-in and custom pipes, dependency injection with services, RxJS observables, and reactive programming concepts like streams and operators.
The document discusses the mobl programming language for building mobile web applications. Mobl is a statically-typed language that compiles to HTML and JavaScript. It aims to provide features for building reactive user interfaces and uses techniques like continuation-passing style and observables to support asynchronous programming in a synchronous-looking way. The document provides examples of coding common mobile app patterns like data binding, network requests, and user input handling in mobl.
Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)anistar sung
This session I explained about how to build shareable library and what we did for AppDeKit that is open source app developing tool for app development. If you're looking for a good mechanism for developing your own app, please read this deck to know AppDevKit more.
https://github.com/yahoo/AppDevKit
This document discusses using Flutter and ML Kit to build mobile apps with machine learning capabilities. It provides an overview of Flutter and ML Kit, then demonstrates how to build a sample app with Flutter that uses the camera and ML Kit's vision API for tasks like face detection and text recognition. The sample app code is explained step-by-step, covering initializing the camera, detecting images, drawing the results on the canvas, and providing a demo of the working app.
The Duck Teaches Learn to debug from the masters. Local to production- kill ...ShaiAlmog1
The document outlines an agenda for a workshop on debugging techniques. The workshop covers installing tools, flow and breakpoints debugging, watching variables, Kubernetes debugging, and developer observability. Key techniques discussed include tracepoints, memory debugging, exception breakpoints, object marking, and logs, snapshots, and metrics for observability. The goal is to teach practical debugging skills that can be applied at scale in production environments like Kubernetes.
Angular2: Quick overview with 2do app exampleAlexey Frolov
This document provides an overview of Angular 2 including its history, architecture, components, services, and comparisons to React. Some key points include:
- Angular 2 was announced in 2012 and released in 2016, improving on Angular 1.
- It uses TypeScript for type safety and supports both declarative and imperative programming.
- The core aspects of Angular 2 apps are components, which encapsulate templates, styles, and logic, and services which components use to share data.
[Ultracode Munich Meetup #7] Android view customization in a nutshellBeMyApp
Slides by Bernhard Pflug, Senior Android developer @ Iconmobile during the Ulracode Munich Meetup #7
http://www.meetup.com/Ultracode-Munich/events/219689131/
This document provides an overview of key Android development concepts and techniques. It discusses fragments, the support library, dependency injection, image caching, threading and AsyncTask, notifications, supporting multiple screens, and optimizing ListView performance. The document also recommends several popular Android libraries and open source apps that demonstrate best practices.
Forge - DevCon 2016: Visual Reporting with Connected Design DataAutodesk
Viewing a 3D model on a webpage or in a mobile app is really cool, but visualizing design data isn’t just about meshes and textures. In this class Philippe Leefsma of Autodesk will show you how the Forge Model Derivative API and JavaScript viewer give you access to the valuable data associated with each model component that is extracted from the original design file. We will take that a step further and connect those models to an external database to add even richer data. Finally, we will stylize the model to turn a model into a powerful, intuitive reporting tool.
This document provides an overview of Angular and discusses its core concepts and features. It introduces Angular components, templates, dependency injection, forms, routing, modularity, and UI libraries like PrimeNG. It also covers more advanced topics like lazy loading, AOT compilation, change detection, and server-side rendering. The document is meant to help get started with Angular and provide guidance on when and how to use it for building applications. Key recommendations include using the Angular CLI, enabling AOT and lazy loading for production builds, and leveraging PrimeNG for UI components. It also addresses common questions around Angular's stability, comparisons to other frameworks, and whether backend development may be preferable.
After you’ve done all the UI optimizations recommended by UX designers, how do you make your interface even more engaging? That’s where the Samsung Mobile SDK can help. Part 1 of Advancing Your UI introduces you to three new technologies -- Look, Motion, and Gesture – that allow you to create an interface that engages your audience in ways you have not yet explored.
Academy PRO: React native - building first scenesBinary Studio
This document provides an overview of building initial scenes in React Native, including setting up components, styles, state, props, file structure, and networking. It discusses common React Native components like View, Text, Image, ScrollView, ListView, and interaction components. It also covers more advanced topics such as maps, dates pickers, geolocation, cameras, and working with native iOS and Android modules.
MOPCON 2014 - Best software architecture in app developmentanistar sung
Talking about how to build smart design and architecture for app development. Let your app can easy develop and deploy components on your app. And more topic of version control and quality improvement.
The document discusses creating and animating custom views in Android. It covers topics like why to use custom views, the View class hierarchy, drawing and styling custom views, and different techniques for animating views including using Runnables, ValueAnimators, and ObjectAnimators. Key points include how to subclass View, override drawing methods like onDraw(), apply XML styling attributes, and animate view properties over time through interpolation of values.
The document provides an overview of Angular concepts and best practices. It begins with an "Angular Alphabet" that defines essential Angular elements and concepts corresponding to each letter. It then discusses specific concepts in more detail, such as components, directives, services and templates. It concludes by recommending next steps like exploring the Angular glossary, creating a sample project and sharing it for review.
303 TANSTAAFL: Using Open Source iPhone UI Codejonmarimba
This document discusses modifications made to improve the animation and behavior of an open source cover flow library called OpenFlow. The author hacked the code to have a scroll view handle animation instead of core animation for better control. Touch handling was also hijacked to directly control selection instead of relying on scroll view callbacks. Friction was reduced and reflection rendering was adjusted to better match Apple's implementation.
[FEConf Korea 2017]Angular 컴포넌트 대화법Jeado Ko
This document summarizes Angular component communication patterns. It discusses using @Input and @Output to communicate between parent and child components. It also covers using a shared service to communicate between siblings and across the component tree. Services can utilize BehaviorSubject to share state updates through observables. Larger applications may use a state management library like NgRx to introduce a single source of truth via a centralized store.
This document provides an overview of Angular fundamentals including components, directives, pipes, services, and reactive programming concepts. It defines components as reusable UI building blocks that control a view. It demonstrates core directives like NgFor, NgIf, and NgSwitch. It also covers lifecycle hooks, built-in and custom pipes, dependency injection with services, RxJS observables, and reactive programming concepts like streams and operators.
The document discusses the mobl programming language for building mobile web applications. Mobl is a statically-typed language that compiles to HTML and JavaScript. It aims to provide features for building reactive user interfaces and uses techniques like continuation-passing style and observables to support asynchronous programming in a synchronous-looking way. The document provides examples of coding common mobile app patterns like data binding, network requests, and user input handling in mobl.
Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)anistar sung
This session I explained about how to build shareable library and what we did for AppDeKit that is open source app developing tool for app development. If you're looking for a good mechanism for developing your own app, please read this deck to know AppDevKit more.
https://github.com/yahoo/AppDevKit
This document discusses using Flutter and ML Kit to build mobile apps with machine learning capabilities. It provides an overview of Flutter and ML Kit, then demonstrates how to build a sample app with Flutter that uses the camera and ML Kit's vision API for tasks like face detection and text recognition. The sample app code is explained step-by-step, covering initializing the camera, detecting images, drawing the results on the canvas, and providing a demo of the working app.
The Duck Teaches Learn to debug from the masters. Local to production- kill ...ShaiAlmog1
The document outlines an agenda for a workshop on debugging techniques. The workshop covers installing tools, flow and breakpoints debugging, watching variables, Kubernetes debugging, and developer observability. Key techniques discussed include tracepoints, memory debugging, exception breakpoints, object marking, and logs, snapshots, and metrics for observability. The goal is to teach practical debugging skills that can be applied at scale in production environments like Kubernetes.
The document describes code for implementing the server-side functionality of a WhatsApp clone. It includes classes for representing users, messages, and server connections. The Server class initializes user and message data from files, handles login/signup, and establishes a websocket connection for real-time messaging. It can send and receive messages when connected, or queue messages when offline.
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfChart Kalyan
A Mix Chart displays historical data of numbers in a graphical or tabular form. The Kalyan Rajdhani Mix Chart specifically shows the results of a sequence of numbers over different periods.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
Webinar: Designing a schema for a Data WarehouseFederico Razzoli
Are you new to data warehouses (DWH)? Do you need to check whether your data warehouse follows the best practices for a good design? In both cases, this webinar is for you.
A data warehouse is a central relational database that contains all measurements about a business or an organisation. This data comes from a variety of heterogeneous data sources, which includes databases of any type that back the applications used by the company, data files exported by some applications, or APIs provided by internal or external services.
But designing a data warehouse correctly is a hard task, which requires gathering information about the business processes that need to be analysed in the first place. These processes must be translated into so-called star schemas, which means, denormalised databases where each table represents a dimension or facts.
We will discuss these topics:
- How to gather information about a business;
- Understanding dictionaries and how to identify business entities;
- Dimensions and facts;
- Setting a table granularity;
- Types of facts;
- Types of dimensions;
- Snowflakes and how to avoid them;
- Expanding existing dimensions and facts.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
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
We can start by adding an event handler to the blackButton from the enterNavigationMode method
We are effectively coloring the pin layer to create the tint effect
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
We added a new BlinkDot class to implement the pulsing blue dot effect
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
Another new API the hailRide method in LocationService allows us to hail a ride...
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
Notice I don't show anything when the ride is hailed, I'll add that workflow with the driver app later
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
The BlinkDot class is pretty trivial. I could have used an animated gif but instead I just did this.
This is mostly for transparency we don't really use the UIID here
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
I use low level animations here so the best practice is to register/remove with initComponent/deinitialize
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
The motion class represents a timed motion between values which allows us to animate a value from point X to point Y. In this case I'm just growing the circle using the
value. Notice only the animate method mutates values as the paint method can be invoked more than once per cycle in theory
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
The drawing logic is mostly hardcoded, I would have used the shape API to get a more refined effect but it would have made things more complicated