This document provides an overview of UI programming for mobile apps. It discusses state machine programming patterns and the model-view-controller (MVC) pattern. It explains how MVC is implemented in Android and iOS. It also describes Android programming basics such as activities, services, content providers, and resources. It covers views, layouts, fragments and other aspects of the Android user interface.
The document provides an overview of the Tellurium Automated Testing Framework, which is an open source framework built on Selenium that aims to address challenges in automated web testing like robustness to changes, testing dynamic content, triggering JavaScript events, reusability, expressiveness, and maintainability. It introduces key Tellurium concepts like the UI module, composite locators, and group locating to decouple UI and tests and make tests more robust and maintainable.
This document discusses fragments, menus, and contextual modes in Android. It defines fragments as reusable parts of an activity's user interface that have their own lifecycles. The document provides instructions for creating fragments, adding them to activities, and replacing them dynamically. It also discusses using the action bar to define options menus and handling menu item selections. Finally, it covers activating a contextual mode for long presses on an element and defining actions for the contextual menu bar.
IBM Worklight is a platform for developing hybrid mobile applications. It consists of five main components: Worklight Studio, Worklight Server, Worklight Console, device runtime, and Application Center. Worklight Studio is an Eclipse plugin that provides an IDE for developing applications using web technologies like HTML5, JavaScript, and CSS as well as native device APIs. The Worklight Server manages applications and communication between mobile devices and back-end systems. The Worklight Console is used to manage applications and adapters deployed to the Worklight Server. Device runtime provides APIs for features like authentication, security, and analytics. Application Center is a private app store for feedback and early testing.
The document discusses Java programming concepts including:
- Java provides a common framework to handle strings, networks, and extended functions. It also handles garbage collection and can be cross-platform.
- The main() method is where every Java program begins execution. It must have a specific signature of public static void main(String[] args).
- There are 8 primitive data types in Java including int, short, long, float, double, char, boolean, and byte that are used to store basic values.
This document provides an overview of Maven, Subversion (SVN), and GIT. It discusses how to install and set up Maven, create Maven projects, and manage dependencies. It also explores version control systems, specifically SVN and GIT. With SVN, it demonstrates how to create repositories and check out projects. It discusses merging code and avoiding conflicts. The document is a presentation intended to teach these topics.
This document provides an overview of Android application development including:
- Android uses a modified Linux kernel and allows developers to write code in Java.
- Common layouts for user interfaces include linear, relative, frame, and list views.
- Applications need to support multiple screen sizes by providing different layouts and resources.
- Challenges in app development include choosing the right IDE, implementing user interactions like spinners and clicks, managing activities, and optimizing layouts.
This document discusses Angular components, dependency injection, and routing. It defines Angular as being built on modules, components, templates, and services. Components are the basic building blocks and make up a hierarchical tree structure. Dependency injection allows components to access services. Routing in Angular uses a router to navigate between views and components based on URL changes.
The document provides an overview of the Tellurium Automated Testing Framework, which is an open source framework built on Selenium that aims to address challenges in automated web testing like robustness to changes, testing dynamic content, triggering JavaScript events, reusability, expressiveness, and maintainability. It introduces key Tellurium concepts like the UI module, composite locators, and group locating to decouple UI and tests and make tests more robust and maintainable.
This document discusses fragments, menus, and contextual modes in Android. It defines fragments as reusable parts of an activity's user interface that have their own lifecycles. The document provides instructions for creating fragments, adding them to activities, and replacing them dynamically. It also discusses using the action bar to define options menus and handling menu item selections. Finally, it covers activating a contextual mode for long presses on an element and defining actions for the contextual menu bar.
IBM Worklight is a platform for developing hybrid mobile applications. It consists of five main components: Worklight Studio, Worklight Server, Worklight Console, device runtime, and Application Center. Worklight Studio is an Eclipse plugin that provides an IDE for developing applications using web technologies like HTML5, JavaScript, and CSS as well as native device APIs. The Worklight Server manages applications and communication between mobile devices and back-end systems. The Worklight Console is used to manage applications and adapters deployed to the Worklight Server. Device runtime provides APIs for features like authentication, security, and analytics. Application Center is a private app store for feedback and early testing.
The document discusses Java programming concepts including:
- Java provides a common framework to handle strings, networks, and extended functions. It also handles garbage collection and can be cross-platform.
- The main() method is where every Java program begins execution. It must have a specific signature of public static void main(String[] args).
- There are 8 primitive data types in Java including int, short, long, float, double, char, boolean, and byte that are used to store basic values.
This document provides an overview of Maven, Subversion (SVN), and GIT. It discusses how to install and set up Maven, create Maven projects, and manage dependencies. It also explores version control systems, specifically SVN and GIT. With SVN, it demonstrates how to create repositories and check out projects. It discusses merging code and avoiding conflicts. The document is a presentation intended to teach these topics.
This document provides an overview of Android application development including:
- Android uses a modified Linux kernel and allows developers to write code in Java.
- Common layouts for user interfaces include linear, relative, frame, and list views.
- Applications need to support multiple screen sizes by providing different layouts and resources.
- Challenges in app development include choosing the right IDE, implementing user interactions like spinners and clicks, managing activities, and optimizing layouts.
This document discusses Angular components, dependency injection, and routing. It defines Angular as being built on modules, components, templates, and services. Components are the basic building blocks and make up a hierarchical tree structure. Dependency injection allows components to access services. Routing in Angular uses a router to navigate between views and components based on URL changes.
Spring IOC advantages and developing spring application sample Sunil kumar Mohanty
This document provides an over view of spring IOC and it's advantages. It also gives basic idea on the spring core container. At the last it describes how develop a simple spring application
The document summarizes enhancements made in PeopleTools releases 8.48 to 8.51, including improvements to data mover, security, development tools, reporting tools, integration tools, and PeopleBooks. Key enhancements are support for TRUNCATE in data mover, unique indexes requirement for data archive manager, extended password controls, modal secondary page improvements, and homepage pagelet load speed updates.
This document discusses working with servlets and session tracking in Java. It explores the ServletConfig and ServletContext interfaces, and how to implement session tracking using HttpSession, cookies, and URL rewriting. The objectives are to learn how to access configuration information from servlets, set and get attributes in the servlet context, and maintain state across HTTP requests using different session tracking mechanisms.
- Perspectives in Eclipse workbench are visual containers that group related views and editors to accomplish a specific task.
- Creating a perspective involves defining an extension in plugin.xml and implementing the perspective class to control initial layout.
- Views display data from the domain model and are created by defining an extension point and implementing the view class.
- The entry point for an RCP application is a class that implements IApplication to control application execution and create the workbench.
Here are the steps to implement the requested perspective layout using views and the perspectiveExtensions extension point:
1. Create four views (View1, View2, View3, View4) and add them to the plugin.xml.
2. Create a new perspective class that implements the layout:
```java
public class MyPerspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
layout.addView(View1Id, IPageLayout.LEFT, 0.5f, IPageLayout.ID_EDITOR_AREA);
layout.addView(View2Id, IPageLayout.RIGHT, 0.5f, View1Id);
layout.add
This document discusses component interfaces in PeopleSoft. It defines a component interface as a means to access PeopleSoft applications without using PeopleSoft pages. Component interfaces expose PeopleSoft components for synchronous access from external applications. This allows external applications to access underlying data and business logic without needing to understand page structures and component definitions. The document then describes the key elements and architecture of component interfaces, including components, properties, collections, methods, and how to create and work with component interfaces.
This document provides an overview of creating a basic Eclipse Rich Client Platform (RCP) application, including setting up the necessary plug-in project, defining perspectives and views, and implementing core classes like Application, WorkbenchAdvisor, and Perspective. It describes how to add new views to a perspective and launch the RCP application. The key classes involved in startup and initialization of the Eclipse workbench are also explained.
This document provides an overview of ASP.NET MVC frameworks and how to get started with ASP.NET MVC 4. It discusses how ASP.NET MVC supports the MVC pattern and test-driven development. It also describes how to install ASP.NET MVC 4, create a basic MVC 4 project with different templates, add controllers and views, and connect to a database using Entity Framework.
This document provides a summary of dependency injection and Dagger 2 in Android applications. It explains that dependency injection separates configuration from usage to improve maintainability, testability and reduce coupling. It describes how Dagger generates code to inject dependencies using annotations and component and module definitions. Modules provide dependencies while components inject them into classes. Scopes like per activity are supported. Overall Dagger improves architecture by managing object creation and dependencies through compile time verification rather than runtime errors.
This document discusses strategies for streamlining application architecture. It defines a large application as one requiring significant effort to maintain. Examples given include Gmail, Yahoo homepage, and MobileMe. Current architectures are described as having custom widgets, modules, MVC patterns and libraries coupled together. Problems identified include lack of reusability and tight coupling. The document proposes using a module pattern with loose coupling, a facade abstraction layer, and mediator pattern to improve maintainability. Modules would communicate through publishing events to the facade/mediator core rather than directly accessing each other.
The document discusses Struts framework and internationalization (I18N) applications. Some key points:
1. Struts is a MVC framework that simplifies development of web applications. It provides components like ActionServlet and tag libraries.
2. I18N applications display output based on the user's locale/language. This is achieved using properties files with language-specific translations and the ResourceBundle class.
3. In Struts, properties files are configured in struts-config.xml and accessed in JSPs using the <message> tag. Keys not found will result in errors unless null=false is specified.
The document discusses different types of views and view groups in Android user interface development. It describes layouts like LinearLayout, RelativeLayout and FrameLayout that extend the ViewGroup class. These layouts allow arranging views in different orientations using attributes like layout_width, layout_height, layout_weight etc. The document also talks about defining views and layouts in XML files or programmatically at runtime.
Android is a software stack that includes an operating system and applications for mobile devices. It is based on the Linux kernel and was developed by the Open Handset Alliance, including Google. Android supports a variety of hardware platforms and provides features like storage, messaging, a web browser, media support, Bluetooth, and more. Developers can create Android applications using the Android SDK and Eclipse IDE, targeting the Dalvik virtual machine. The SDK includes tools, libraries, and sample code needed to build Android apps.
Android is a software stack that includes an operating system and applications for mobile devices. It is based on the Linux kernel and was developed by the Open Handset Alliance, including Google. Android supports a variety of hardware platforms and provides features like storage, messaging, a web browser, media support, Bluetooth, and more. Developers can create Android applications using the Android SDK and Eclipse IDE, targeting the Dalvik virtual machine. The SDK includes tools, libraries, and sample code needed to build Android apps.
jQquerysummit - Large-scale JavaScript Application Architecture Jiby John
The document discusses organizing jQuery and JavaScript applications using different patterns and frameworks. It begins by explaining design patterns and their benefits. It then covers using the Model-View-Controller (MVC) pattern with jQuery, providing examples of MVC frameworks. Finally, it discusses other JavaScript patterns for organizing code into reusable modules.
This document provides an overview of different types of PeopleCode events in PeopleSoft applications. It discusses page events like Activate and component events like FieldChange, RowInsert, and SaveEdit. Each event is described in 1-2 sentences explaining what it is and when it fires. The document also notes what types of objects (pages, fields, etc.) each event can be associated with.
Android is a software stack that includes an operating system, middleware and applications for mobile devices. It uses the Java programming language and allows developers to create applications that have access to device hardware and software features like location services, background processes, notifications and more. The Android architecture includes core applications, an application framework, libraries, the Dalvik virtual machine, and the Linux kernel.
This document provides an overview of key concepts in Orchard CMS, an open source content management system. It discusses how Orchard is built on ASP.NET MVC and Razor, and introduces concepts like modules, themes, widgets, and shapes. It also explains how modules extend Orchard's functionality, and how themes control visual design through alternate shape templates.
The document provides an overview of the Abstract Window Toolkit (AWT) classes in Java. It discusses that AWT classes are available in the java.awt package and support creating applet windows and standalone GUI applications. It then lists and describes many important AWT classes, including those for buttons, checkboxes, menus, text fields, labels and more.
Lecture 03 Mobile App Design. Feature DevelopmentMaksym Davydov
How to decide what features should mobile app implement. Development from mission and vision to target audience, tasks, context, capabilities, and functions.
Spring IOC advantages and developing spring application sample Sunil kumar Mohanty
This document provides an over view of spring IOC and it's advantages. It also gives basic idea on the spring core container. At the last it describes how develop a simple spring application
The document summarizes enhancements made in PeopleTools releases 8.48 to 8.51, including improvements to data mover, security, development tools, reporting tools, integration tools, and PeopleBooks. Key enhancements are support for TRUNCATE in data mover, unique indexes requirement for data archive manager, extended password controls, modal secondary page improvements, and homepage pagelet load speed updates.
This document discusses working with servlets and session tracking in Java. It explores the ServletConfig and ServletContext interfaces, and how to implement session tracking using HttpSession, cookies, and URL rewriting. The objectives are to learn how to access configuration information from servlets, set and get attributes in the servlet context, and maintain state across HTTP requests using different session tracking mechanisms.
- Perspectives in Eclipse workbench are visual containers that group related views and editors to accomplish a specific task.
- Creating a perspective involves defining an extension in plugin.xml and implementing the perspective class to control initial layout.
- Views display data from the domain model and are created by defining an extension point and implementing the view class.
- The entry point for an RCP application is a class that implements IApplication to control application execution and create the workbench.
Here are the steps to implement the requested perspective layout using views and the perspectiveExtensions extension point:
1. Create four views (View1, View2, View3, View4) and add them to the plugin.xml.
2. Create a new perspective class that implements the layout:
```java
public class MyPerspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
layout.addView(View1Id, IPageLayout.LEFT, 0.5f, IPageLayout.ID_EDITOR_AREA);
layout.addView(View2Id, IPageLayout.RIGHT, 0.5f, View1Id);
layout.add
This document discusses component interfaces in PeopleSoft. It defines a component interface as a means to access PeopleSoft applications without using PeopleSoft pages. Component interfaces expose PeopleSoft components for synchronous access from external applications. This allows external applications to access underlying data and business logic without needing to understand page structures and component definitions. The document then describes the key elements and architecture of component interfaces, including components, properties, collections, methods, and how to create and work with component interfaces.
This document provides an overview of creating a basic Eclipse Rich Client Platform (RCP) application, including setting up the necessary plug-in project, defining perspectives and views, and implementing core classes like Application, WorkbenchAdvisor, and Perspective. It describes how to add new views to a perspective and launch the RCP application. The key classes involved in startup and initialization of the Eclipse workbench are also explained.
This document provides an overview of ASP.NET MVC frameworks and how to get started with ASP.NET MVC 4. It discusses how ASP.NET MVC supports the MVC pattern and test-driven development. It also describes how to install ASP.NET MVC 4, create a basic MVC 4 project with different templates, add controllers and views, and connect to a database using Entity Framework.
This document provides a summary of dependency injection and Dagger 2 in Android applications. It explains that dependency injection separates configuration from usage to improve maintainability, testability and reduce coupling. It describes how Dagger generates code to inject dependencies using annotations and component and module definitions. Modules provide dependencies while components inject them into classes. Scopes like per activity are supported. Overall Dagger improves architecture by managing object creation and dependencies through compile time verification rather than runtime errors.
This document discusses strategies for streamlining application architecture. It defines a large application as one requiring significant effort to maintain. Examples given include Gmail, Yahoo homepage, and MobileMe. Current architectures are described as having custom widgets, modules, MVC patterns and libraries coupled together. Problems identified include lack of reusability and tight coupling. The document proposes using a module pattern with loose coupling, a facade abstraction layer, and mediator pattern to improve maintainability. Modules would communicate through publishing events to the facade/mediator core rather than directly accessing each other.
The document discusses Struts framework and internationalization (I18N) applications. Some key points:
1. Struts is a MVC framework that simplifies development of web applications. It provides components like ActionServlet and tag libraries.
2. I18N applications display output based on the user's locale/language. This is achieved using properties files with language-specific translations and the ResourceBundle class.
3. In Struts, properties files are configured in struts-config.xml and accessed in JSPs using the <message> tag. Keys not found will result in errors unless null=false is specified.
The document discusses different types of views and view groups in Android user interface development. It describes layouts like LinearLayout, RelativeLayout and FrameLayout that extend the ViewGroup class. These layouts allow arranging views in different orientations using attributes like layout_width, layout_height, layout_weight etc. The document also talks about defining views and layouts in XML files or programmatically at runtime.
Android is a software stack that includes an operating system and applications for mobile devices. It is based on the Linux kernel and was developed by the Open Handset Alliance, including Google. Android supports a variety of hardware platforms and provides features like storage, messaging, a web browser, media support, Bluetooth, and more. Developers can create Android applications using the Android SDK and Eclipse IDE, targeting the Dalvik virtual machine. The SDK includes tools, libraries, and sample code needed to build Android apps.
Android is a software stack that includes an operating system and applications for mobile devices. It is based on the Linux kernel and was developed by the Open Handset Alliance, including Google. Android supports a variety of hardware platforms and provides features like storage, messaging, a web browser, media support, Bluetooth, and more. Developers can create Android applications using the Android SDK and Eclipse IDE, targeting the Dalvik virtual machine. The SDK includes tools, libraries, and sample code needed to build Android apps.
jQquerysummit - Large-scale JavaScript Application Architecture Jiby John
The document discusses organizing jQuery and JavaScript applications using different patterns and frameworks. It begins by explaining design patterns and their benefits. It then covers using the Model-View-Controller (MVC) pattern with jQuery, providing examples of MVC frameworks. Finally, it discusses other JavaScript patterns for organizing code into reusable modules.
This document provides an overview of different types of PeopleCode events in PeopleSoft applications. It discusses page events like Activate and component events like FieldChange, RowInsert, and SaveEdit. Each event is described in 1-2 sentences explaining what it is and when it fires. The document also notes what types of objects (pages, fields, etc.) each event can be associated with.
Android is a software stack that includes an operating system, middleware and applications for mobile devices. It uses the Java programming language and allows developers to create applications that have access to device hardware and software features like location services, background processes, notifications and more. The Android architecture includes core applications, an application framework, libraries, the Dalvik virtual machine, and the Linux kernel.
This document provides an overview of key concepts in Orchard CMS, an open source content management system. It discusses how Orchard is built on ASP.NET MVC and Razor, and introduces concepts like modules, themes, widgets, and shapes. It also explains how modules extend Orchard's functionality, and how themes control visual design through alternate shape templates.
The document provides an overview of the Abstract Window Toolkit (AWT) classes in Java. It discusses that AWT classes are available in the java.awt package and support creating applet windows and standalone GUI applications. It then lists and describes many important AWT classes, including those for buttons, checkboxes, menus, text fields, labels and more.
Lecture 03 Mobile App Design. Feature DevelopmentMaksym Davydov
How to decide what features should mobile app implement. Development from mission and vision to target audience, tasks, context, capabilities, and functions.
Team Technologies LLC consists of mobile developers Oleg and Nazar. The document discusses developing cross-platform mobile applications using Xamarin. It outlines why native mobile development is important, what Xamarin is, and how to architect mobile apps in Xamarin including using Xamarin Forms. It provides an agenda and overview of the topics that will be covered.
Data Model of the Strategic Action Planning and Scheduling Problem in a Disas...Reza Nourjou, Ph.D.
This document presents a data model for strategic action planning and scheduling problems in disaster response teams. The data model is designed as a Unified Modeling Language class diagram consisting of entity types, attributes, and relationships associated with modeling the strategic action planning and scheduling problem. The data model supports the development of an intelligent assistant software system to help incident commanders with strategic action planning and scheduling during disaster response. The data model makes five novel contributions, including modeling the strategic action planning problem, representing task information geographically and temporally, encoding human strategic guidance, formulating strategic action plans, and integrating strategic action schedules with other entities.
Alloy is a powerful MVC framework built on Node.js that is integrated with Titanium Studio to make Titanium development easier, faster, and more scalable. Key features of Alloy include separating UI and app logic through MVC, developing apps using XML and JSON, reusable widgets and templates, and built-in support for Backbone.js and Underscore.js. The document provides instructions on getting started with Alloy including installing it, creating a sample tab-based app that makes an XHR request and displays results, and generating controllers and models using the Alloy CLI.
5 Common Data Visualization Mistakes (and how to avoid making them)Brian Bamberger
Data visualization is a useful tool to leverage when using data to communicate information. Done correctly, dataviz can substantially boost your audience's engagement and understanding. However, poorly-visualized data can override your message. This presentation provides an overview of common dataviz mistakes and how to avoid them.
El documento resume la Revolución Industrial, incluyendo su primera etapa entre 1760 y 1870. Durante este período hubo continuos inventos como la pila eléctrica por Volta en 1800, la primera locomotora de vapor por Stephenson en 1814, la inauguración de la primera línea de pasajeros en 1825, la máquina de hilar e ideación del telar por Richard Roberts en 1834, y la invención del telégrafo por Morse en 1837. Esta primera etapa de la Revolución Industrial estuvo marcada por importantes avances tecnoló
Este documento presenta un taller sobre dinámica y caída libre en el que se resuelven varios problemas relacionados con sistemas de bombeo. En el primer problema se analiza una curva de bomba para determinar su eficiencia, potencia consumida y cabeza de descarga. En el segundo problema se calcula el NPSH disponible y la cabeza total para una bomba centrífuga. En el tercer problema se representa la curva resistente de un sistema para determinar si es posible utilizar la bomba según su comportamiento. Finalmente, en el cuarto problema
The document discusses the results of a study on the impact of climate change on coffee production. Researchers found that suitable land for coffee production could decline by up to 50% by 2050 due to rising temperatures and changing rain patterns associated with climate change. Arabica coffee was found to be especially threatened, as its growing regions may shrink by 88% under a business-as-usual scenario of increasing greenhouse gas emissions. The study concludes that climate change poses a severe risk to the coffee economy worldwide.
Export Manager: una storia di lavoro, talento e passione Intervista ad Anton...Free Your Talent
Intervista ad Antonio Fontana, Ex Export Area Manager per La Doria S.p.A. a cura di Isabella Corsini, Myglange Ngnassi, Noemi Pezzotti, studentesse del Master in Retail and Sales Management ISTUD “Retail Your Talent” 2016-2017
Mobile apps are increasingly popular, with over 1 million available and the average user having 36 apps, though 1/4 are never used. Deep linking allows apps to be discoverable through search and accessible from related web pages. The App Indexing API enables deep links between apps and websites to improve discoverability and drive more users and engagement. The presentation demonstrated how to implement deep links and verify the app in Google Search Console for indexing.
Optimizing apps for better performance extended Elif Boncuk
This document provides guidance on optimizing mobile apps for better performance. It discusses four major steps for optimization: rendering, compute, memory, and battery. Specific techniques are described for each step. For rendering, it discusses reducing overdraw through clipping and eliminating unnecessary backgrounds. For compute, it recommends profiling with Traceview and Hierarchy Viewer. For memory, it discusses caching, avoiding blocking the UI thread, and using the memory monitor, heap viewer, and allocation tracker. For battery, it discusses optimizing network requests and adapting to latency using tools like Batterystats and Battery Historian. The document provides examples and screenshots to illustrate key optimization techniques.
Workshop on Search Engine OptimizationAdarsh Patel
Search Engine Optimization is the way to enhance your website/blog ranking so you will get more customer and finally more money. The Workshop covers every aspect of Search Engine Optimization with practical aspects. Suitable for any kind of audience who want to increase their presence in search engine. Check more workshop @ http://arthtechnology.com/workshop.html
Workhsop on Logic Building for ProgrammingAdarsh Patel
Do you face trouble while analysis of any project ? Don't know from where to start analysis of any project or program. Here is the workshop which can give you quick start with analysis.
Project Analysis - How to Start Project DevelomentAdarsh Patel
Are you Freshers ? Don't know how to start analysis of project which can be developed using php, .net or any other language? Check out you will get quick start.
This document provides an overview of user interface (UI) programming for mobile apps. It discusses UI programming patterns like state machines and model-view-controller (MVC). It explains how MVC is implemented in Android and iOS. It also describes core Android application components like activities, services, content providers and more. Finally, it covers topics like layouts, views, resources and more aspects of Android UI programming.
Those who want to be familiar with Android, can easily go through this document. It will help them to learn basics. It is also useful for those who are preparing for cracking android interviews as this document is short and precise.
The document discusses the architecture and frameworks of the Android operating system. It is divided into five main sections: the Linux kernel, hardware abstraction layer, Android runtime, native C/C++ libraries, and the Java API framework. The key layers are the Linux kernel, which provides low-level functionality, the hardware abstraction layer for accessing device hardware, the Android runtime for running apps, native libraries for C/C++ code, and the Java framework APIs. System apps, activities, services, broadcast receivers, and content providers are the main components that make up Android applications.
mobile operating system based on a modified version of the Linux kernel and other open-source software, designed primarily for touchscreen mobile devices such as smartphones and tablets.
The document provides an overview of an Android architecture presentation. It discusses key topics like the Android virtual machine, application stack and framework, core libraries, and the main components of an Android application. For application components, it covers the AndroidManifest file, activities and their lifecycle, intents, application resources including strings and drawables, and localization. It provides examples and code snippets for many of these topics. It also lists additional topics that will be covered in part two of the presentation, such as preferences, app widgets, services, and content providers.
Android interview questions and answerskavinilavuG
Android uses Dalvik Virtual Machine (DVM) which requires a special bytecode format called .dex files. The DVM executes multiple virtual machines efficiently and runs Java bytecode, converting it to .dex format. Activities dictate the user interface and handle interactions, services handle background processes, broadcast receivers handle communication between apps and the OS, and content providers manage data storage. The Android SDK includes tools like the emulator, DDMS, and ADB for app development.
This document provides an overview of tools and steps for developing Android applications. It describes installing the Android SDK and Eclipse plugin, creating an Android project, basic project components like activities and services, using the Android emulator and debugger, and includes an example of integrating the Google Maps API. The tutorial is intended as a brief introduction to major Android development concepts and references more complete documentation on the Android developer site.
The document discusses the development of the Android operating system. It describes how the Open Handset Alliance was formed in 2007 by Google and other companies to develop Android. Android is an open source software stack that includes an operating system, middleware and key apps. It uses the Java programming language and a custom virtual machine called Dalvik. The Android architecture includes frameworks for applications, libraries, the Android runtime and the Linux kernel. It also discusses the lifecycles of Android services and applications.
mobile application development -unit-3-TejamFandat
The document discusses various components of mobile application development in Android including control flow, application components like activities and services, Android application directory structure, and layouts. It describes key files like AndroidManifest.xml and important folders like java, drawable, layout, and mipmap. It also explains different types of layouts like linear layout, relative layout, frame layout, and table layout along with code examples.
This document provides an overview of the Android framework and development tools for Java developers. It summarizes the key components of the Android framework including the Linux kernel, Dalvik VM, core libraries, and application framework. It also describes the basic structure of an Android app, common elements like activities, intents, and layouts. Finally, it recommends resources for learning more about Android development.
With the great flexibility that xCP 2.0 gives developers when configuring
applications comes the complexity of understanding the best approaches to take
when meeting business requirements.
In some cases there may only be a single design pattern that will meet a business
requirement, and in other cases there may be several valid patterns, but only one
that is expected to meet performance requirements.
The aim of this white paper is to provides guidelines for designing and
configuring an xCP 2.0 application to meet business requirements based on the
experience of EMC subject matter experts.
This version of the document focuses on the design and configuration of the
application model and business processes.
Android Application Development (Android Studio, PHP, XML, MySQL)
Developed an Android Application which connects to a cloud database for Update, Retrieve, Edit and Delete queries for Quarter Allotment of Employees.
OBJECTIVES:
1) Design a cloud-based MySQL Database for storing and performing operations of all employee data.
2) Design a User Interface based on Android to enable user to interact with the Database.
3) Implement the above using JAVA, XML and PHP.
SCOPE:
1) Apply (Insert) of Application
2) Modification (Edit) of Application
3) Cancellation (Deletion) of Application
4) Status of Application
This document provides an overview of Android architecture and components. It describes that Android is an open source software stack that includes an operating system, middleware and key applications built around the Linux kernel. The Android software architecture consists of applications, an application framework, libraries and services, and the operating system. It explains the main components of an Android application - activities, services, broadcast receivers and content providers.
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...Padma shree. T
This Blog is all about memory management in Android. It provides information about how you can analyze & reduce memory usage while developing an Android app.
Memory management is a complex field of computer science and there are many techniques being developed to make it more efficient. This guide is designed to introduce you to some of the basic memory management issues that programmers face.
Mobile Application Development Lecture 05 & 06.pdfAbdullahMunir32
The document provides an overview of mobile application development for Android. It discusses the key components of Android applications including activities, services, content providers, intents, broadcast receivers, and notifications. It also covers the Android application lifecycle and manifest file, and describes how to create activities, externalize resources, and install and configure Android Studio.
The document discusses the Android platform. It describes Android as a layered environment built upon the Linux kernel that includes rich functions. It notes that Android includes an embeddable browser built on WebKit and supports connectivity options like WiFi, Bluetooth and wireless data. It also includes support for graphics, media, 2D/3D graphics via OpenGL, and data storage via SQLite. The software layers include applications, application framework, libraries and services, and the Linux kernel.
- Android is an open source software platform for mobile devices based on the Linux kernel and managed by the Open Handset Alliance. It allows developers to write managed code in Java for the applications layer.
- The Android software stack includes the Linux kernel, native libraries, the Android runtime (which includes a Java virtual machine called Dalvik), and the Application Framework layer where Android applications run.
- Android applications are built using the Android SDK and its tools which allow compilation of Java code into an executable .apk file that can be installed and run on Android devices.
This document discusses how Firebase can be used to develop mobile applications. It introduces various Firebase services including Authentication, Realtime Database, Storage, Hosting, Remote Config, Cloud Messaging, Crash Reporting, Test Lab, Dynamic Links, Invites, App Indexing, AdMob, and Analytics. It provides code examples for implementing Authentication with email/password or Facebook login and interacting with the Realtime Database and Storage. The document emphasizes that Firebase allows developing mobile apps with a compact team and fast iteration by removing the need to set up and manage backend services.
This document provides an overview of Microsoft Azure Mobile Services. It begins with an introduction and agenda. It then discusses the architecture and management portal for Mobile Services. The management portal allows you to manage data, scripts, permissions, scheduling, push notifications, identity, configuration, scaling, and logs. It also covers the REST API for common operations like querying, inserting, updating, and deleting data. Finally, it discusses server scripts and common script objects for working with data, push notifications, and more. Server script modules are also introduced.
Native functions allow Java code to call functions implemented in C/C++. The document shows a native method declared in a Java class that is implemented in a C/C++ file. The native method sets shader bin data and accepts a file name, byte array, and size as parameters. It uses JNI to get the string and byte array from the Java arguments and release them after use in C/C++.
The document discusses networking on mobile devices. It covers supported networking technologies like cellular data, WiFi, and Bluetooth. It discusses required permissions for network operations and the need to perform networking operations on a separate thread to avoid blocking the UI. It provides an example of using AsyncTask to perform networking operations asynchronously. It also covers best security practices, implementing a network security configuration, checking device connectivity, and using Firebase Cloud Messaging as an alternative to polling for updates from a server.
The document contains examples of Java string and object comparisons. It shows that using '==' compares object references while '.equals()' compares object values. It also demonstrates that the Java garbage collector will call 'finalize()' on objects before removing them from memory, and that calling 'System.exit()' in 'finalize()' prevents further object creation.
The document summarizes the key hardware components of mobile devices, including displays, CPUs, memory, storage, cameras, sensors, networking capabilities, and connectors. It discusses screen sizes and resolutions for Android and iOS devices and provides details on processors, memory, and GPUs used by Android and Apple phones. It also covers camera, network connectivity including 4G/5G, Bluetooth, NFC, and connectors such as Micro-USB, USB-C, and Lightning.
This document provides an overview of Microsoft Azure Mobile Services and its management portal. It discusses the key features and capabilities of Azure Mobile Services including data storage, user authentication, push notifications, and server-side scripts. It also summarizes the available server-side script objects and modules that can be used to access additional functionality from scripts. Finally, it outlines the REST API operations for querying, inserting, updating and deleting data in Mobile Services tables.
This document provides an overview of the Firebase mobile platform and its features for developing mobile applications. It discusses Firebase services for authentication, realtime database, storage, hosting, remote config, cloud messaging, crash reporting, testing, dynamic links, invites, advertising and analytics. It includes code examples for authentication, database reads and writes, and storage uploads and downloads. The document promotes Firebase as providing a compact team that can build scalable mobile apps with fast iteration while allowing developers to sleep at night through its backend services.
The document discusses networking on mobile devices. It covers supported networking technologies like cellular data, WiFi and Bluetooth. It discusses required permissions for network operations and that networking should be performed on a separate thread to avoid blocking the UI. It provides an example of using AsyncTask to perform networking operations asynchronously. It also covers best security practices, checking network connectivity, and using Firebase Cloud Messaging as an alternative to polling for updates.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
DDS Security Version 1.2 was adopted in 2024. This revision strengthens support for long runnings systems adding new cryptographic algorithms, certificate revocation, and hardness against DoS attacks.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
6. MVC model
The model is the central component of the pattern. It expresses
the application's behaviour in terms of the problem domain,
independent of the user interface. It directly manages the data,
logic and rules of the application.
A view can be any output representation of information, such as a
chart or a diagram. Multiple views of the same information are
possible, such as a bar chart for management and a tabular view
for accountants.
The third part, the controller, accepts input and converts it to
commands for the model or view.
(from Wikipedia)
6
8. MVC in iOS
From https://developer.apple.com/library/content/
documentation/General/Conceptual/CocoaEncyclopedia/
Model-View-Controller/Model-View-Controller.html#//apple_ref/
doc/uid/TP40010810-CH14
8
9. MVC in Android
MVC is already implemented in Android as:
1 View = layout, resources and built-in classes
like Button derived from android.view.View.
2 Controller = Activity
3 Model = the classes that implement the
application logic
9
11. Android application
An Android application is a single installable unit which can be
started and used independently of other Android applications.
An Android application consists of Android components, Java
source and resource files.
Android application components can connect to components of other
Android applications based on a task description represented by an
Intent object. This way they can create cross-application tasks. The
integration of these components can be done in a way that the
Android application can still work flawless, even if the additional
components are not installed or if different components perform the
same task.
(from http://www.vogella.com/tutorials/Android/article.html)
11
13. Application
• An Android application can have one Application
class which is instantiated as soon as the
application starts and it is the last component
which is stopped during application shutdown.
• If not explicitly defined, Android creates a default
application object for your application.
(from http://www.vogella.com/tutorials/Android/article.html)
13
14. Activity
• An activity is the visual representation of an
Android application. An Android application can
have several activities.
• Activities use views, layouts and fragments to
create the user interface and to interact with the
user.
(from http://www.vogella.com/tutorials/Android/article.html)
14
15. BroadcastReceiver
• A broadcast receiver (receiver) can be registered
to listen to system messages and intents. A
receiver gets notified by the Android system if the
specified event occurs.
• For example, you can register a receiver for the
event that the Android system finished the boot
process. Or you can register for the event that the
state of the phone changes, e.g., someone is
calling.
(from http://www.vogella.com/tutorials/Android/article.html)
15
16. Service
• A service performs tasks without providing an user
interface. They can communicate with other
Android components, for example, via broadcast
receivers and notify the user via the notification
framework in Android.
(from http://www.vogella.com/tutorials/Android/article.html)
16
17. ContentProvider
• A content provider (provider) defines a structured
interface to application data. A provider can be
used for accessing data within one application, but
can also be used to share data with other
applications.
• Android contains an SQLite database which is
frequently used in conjunction with a content
provider. The SQLite database would store the
data, which would be accessed via the provider.
(from http://www.vogella.com/tutorials/Android/article.html)
17
18. Context
• Instances of the class android.content.Context provide the
connection to the Android system which executes theapplication
application. It also gives access to the resources of the project
and the global information about the application environment.
• For example, you can check the size of the current device
display via the Context.
• The Context class also provides access to Android services,
e.g., the alarm manager to trigger time based events.
• Activities and services extend the Context class. Therefore, they
can be directly used to access the Context.
(from http://www.vogella.com/tutorials/Android/article.html)
18
19. Fragments
Fragments are components which run in the context
of an activity. A fragment encapsulates application
code so that it is easier to reuse them and to support
devices of different size.
(from http://www.vogella.com/tutorials/Android/article.html)
19
20. The following picture shows an activity called MainActivity.
On a smaller screen it shows only one fragment and allows
the user to navigate to another fragment. On a wide screen
it shows those two fragments immediately.
(from http://www.vogella.com/tutorials/Android/article.html)
20
21. Views and layout manager
• Views are user interface widgets, e.g., buttons or text
fields. Views have attributes which can be used to
configure their appearance and behavior.
• A ViewGroup is responsible for arranging other views. It
is also known as layout manager. The base class for
these layout managers is the android.view.ViewGroup
class which extends the android.view.View class which
is the base class for views.
• Layout managers can be nested to create complex
layouts.
(from http://www.vogella.com/tutorials/Android/article.html)
21
22. Home screen widgets and
wallpaper
• Widgets are interactive components which are primarily
used on the Android home screen. They typically display
some kind of data and allow the user to perform actions
with them. For example, a widget can display a short
summary of new emails and if the user selects an email, it
could start the email application with the selected email.
• To avoid confusion with views (which are also called
widgets), this text uses the term home screen widgets, if it
speaks about widgets.
• Live wallpapers allow you to create animated backgrounds
for the Android home screen.
(from http://www.vogella.com/tutorials/Android/article.html)
22
23. Resource files
• Android allows you to create static resources like
images and XML configuration files. This allows you
to keep these resources separate from the source
code of your Android application.
• Resource files must be placed in the /res directory
of your application in a predefined sub-folder. The
specific sub-folder depends on type of resource
which is stored.
(from http://www.vogella.com/tutorials/Android/article.html)
23
24. Resource location
Resource Folder Description
Drawables /res/drawables
Images (e.g., png or jpeg files) or
XML files which describe a
Drawable object. Since Android
5.0 you can also use vector
drawables which scale
automatically with the density of
the Android device.
Simple Values /res/values
Used to define strings, colors,
dimensions, styles and static
arrays of strings or integers via
XML files. By convention each
type is stored in a separate file
Layouts /res/layout
XML files with layout descriptions
are used to define the user
interface for Activities and
fragments.
(from http://www.vogella.com/tutorials/Android/article.html)24
25. Resource location
Resource Folder Description
Styles and Themes /res/values
Files which define the appearance of your
Android application.
Animations /res/animator
Defines animations in XML for the
animation API which allows to animate
arbitrary properties of objects over time.
Raw data /res/raw
Arbitrary files saved in their raw form. You
access them via an InputStream object.
Menus /res/menu
Defines the actions which can be used in
the toolbar of the application.
(from http://www.vogella.com/tutorials/Android/article.html)
25
26. Example: Defining strings, string arrays,
colors and dimensions
The following listing is an example for file called values.xml in the /res/values
which defines a few String constants, a String array, a color and a dimension.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Test</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string-array name="operationsystems">
<item>Ubuntu</item>
<item>Android</item>
<item>Microsoft Windows</item>
</string-array>
<color name="red">#ffff0000</color>
<dimen name="mymargin">10dp</dimen>
</resources>
(from http://www.vogella.com/tutorials/Android/article.html)
26
27. Resource IDs and R.java
Every resource gets an ID assigned by the Android build system. The gen
directory in an Android project contains the R.java references file which
contains these generated values. These references are static integer values.
If you add a new resource file, the corresponding reference is automatically
created in a R.java file. Manual changes in the R.java file are not necessary
and will be overwritten by the tooling.
The Android system provides methods to access the corresponding
resource files via these IDs.
For example, to access a String with the R.string.yourString ID in your source
code, you would use the getString(R.string.yourString) method defined on
the Context class.
(from http://www.vogella.com/tutorials/Android/article.html)
27
28. System resources
Android also provides resources. These are called
system resources. System resources are
distinguished from local resources by the android
namespace prefix. For example,
android.R.string.cancel defines the platform string
for a cancel operation.
(from http://www.vogella.com/tutorials/Android/article.html)
28
29. Layout files
• Android activities define their user interface with views
(widgets) and fragments. This user interface can be
defined via XML layout resource files in the /res/layout
folder or via Java code. You can also mix both approaches.
• Defining layouts via XML layout files is the preferred way.
This separates the programming logic from the layout
definition. It also allows the definition of different layouts for
different devices.
• A layout resource file is referred to as layout. A layout
specifies the ViewGroups, Views, their relationship and their
attributes via an XML representation.
(from http://www.vogella.com/tutorials/Android/article.html)
29
30. The following code is an example for
a simple layout file.
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:id="@+id/mytext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</RelativeLayout>
(from http://www.vogella.com/tutorials/Android/article.html)
30
31. A layout is assigned to an
activity via the setContentView()
package com.vogella.android.first;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
(from http://www.vogella.com/tutorials/Android/article.html)
31
32. Defining IDs good practices
If a view needs to be accessed via Java code, you have to give the
view a unique ID via the android:id attribute. To assign a new ID to
a view use the android:id attribute of the corresponding element in
the layout file. The following shows an example in which a button gets
the button1 ID assigned via the android:id="@+id/button1"
parameter.
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Show Preferences" >
</Button>
By conversion this statement creates a new ID if necessary in the
R.java file and assigns the defined ID to the corresponding view.
(from http://www.vogella.com/tutorials/Android/article.html)
32
33. To have one central place to define IDs, you can also define them in a configuration file, typically
called ids.xml, in your /res/values folder and define your IDs in this file. The following listing
shows an example for such a file.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="button1" type="id"/>
</resources>
This allows you to use the ID in your layout file.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<Button
android:id="@id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginRight="27dp"
android:text="Button" />
</RelativeLayout>
(from http://www.vogella.com/tutorials/Android/article.html)
33
34. Android views - UI Widgets
A view in Android represents a widget, e.g., a button, or a
layout manager. The Android SDK provides standard views
(widgets), e.g., via the Button, TextView, EditText classes. It
also includes complex widgets, for example, ListView.
All views in Android extend the android.view.View class.
This class is relatively large (more than 18 000 lines of code)
and provides a lot of base functionality for subclasses.
The main packages for views are part of the android.view
namespace for all the base classes and android.widget for
the default widgets of the Android platform.
(from http://www.vogella.com/tutorials/Android/article.html)
34
35. Using a layout manager
A layout manager is a subclass of ViewGroup and is
responsible for the layout of itself and its child Views.
Android supports different default layout managers.
As of Android 4.0 the most relevant layout managers are
LinearLayout, FrameLayout, RelativeLayout and
GridLayout.
AbsoluteLayout is deprecated and TableLayout can be
implemented more effectively via GridLayout.
(from http://www.vogella.com/tutorials/Android/article.html)
35
36. Layout attributes
Widgets can uses fixed sizes, e.g., with the dp
definition, for example, 100dp. While dp is a fixed size
it will scale with different device configurations.
The match_parent value tells the application to
maximize the widget in its parent. The wrap_content
value tells the layout to allocate the minimum amount
so that the widget is rendered correctly.
Attribute Description
android:layout_width Defines the width of the widget.
android:layout_height Defines the height of the widget.
(from http://www.vogella.com/tutorials/Android/article.html)
36
37. FrameLayout
FrameLayout is a layout manager which draws all
child elements on top of each other. This allows to
create nice visual effects.
The following screenshot shows the Gmail application
which uses FrameLayout to display several button on
top of another layout.
(from http://www.vogella.com/tutorials/Android/article.html)
37
38. LinearLayout
LinearLayout puts all its child elements into a single column or row depending on the
android:orientation attribute. Possible values for this attribute are horizontal
and vertical while horizontal is the default value.
If horizontal is used, the child elements are layouted as indicated by the following picture.
V V V V
Vertical would result in a layout as depicted in the following picture.
V
V
V
V
LinearLayout can be nested to achieve more complex layouts.
LinearLayout supports assigning a weight to individual children via the
android:layout_weight layout parameter. This value specifies how much of the
extra space in the layout is allocated to the corresponding view. If, for example, you have
two widgets and the first one defines a layout_weight of 1 and the second of 2, the
first will get 1/3 of the available space and the other one 2/3. You can also set the
layout_width to zero to always have a certain ratio.
(from http://www.vogella.com/tutorials/Android/article.html)
38
39. RelativeLayout
RelativeLayout allows positioning the widget relative to each other. This can be used for
complex layouts. RelativeLayout is a complex layout manager and should only be used if such a
complex layout is required, as it performs a resource intensive calculation to layout its children.
A simple usage for RelativeLayout is if you want to center a single component. Just add one
component to the RelativeLayout and set the android:layout_centerInParent attribute
to true.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
/>
</RelativeLayout>
(from http://www.vogella.com/tutorials/Android/article.html)
39
40. GridLayout
GridLayout was introduced with Android 4.0. This layout allows
you to organize a view into a Grid. GridLayout separates its
drawing area into: rows, columns, and cells.
You can specify how many columns you want to define for each
View, in which row and column it should be placed as well as how
many columns and rows it should use. If not specified,
GridLayout uses defaults, e.g., one column, one row and the
position of a view depends on the order of the declaration.
The following layout file defines a layout using GridLayout.
(from http://www.vogella.com/tutorials/Android/article.html)
40
44. ScrollView
The ScrollView or the HorizontalScrollView class is not
a layout manager, but useful to make views available,
even if they do not fit onto the screen. A scroll view
can contain one view, e.g., a layout manager
containing more views. s If the child view is too large,
scroll view allows scrolling the content.
44
45. <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/
android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:orientation="vertical" >
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="8dip"
android:paddingRight="8dip"
android:paddingTop="8dip"
android:text="This is a header"
android:textAppearance="?android:attr/
textAppearanceLarge" >
</TextView>
</ScrollView>
The android:fillViewport="true" attribute ensures that the scrollview is set
to the full screen even if the elements are smaller than one screen.
Scroll View Example
45