How to Edit The Setting Component Parameters In The Xml Le and make a signature Online
Start on editing, signing and sharing your Setting Component Parameters In The Xml Le online under the guide of these easy steps:
- Push the Get Form or Get Form Now button on the current page to direct to the PDF editor.
- Wait for a moment before the Setting Component Parameters In The Xml Le is loaded
- Use the tools in the top toolbar to edit the file, and the added content will be saved automatically
- Download your completed file.
The best-rated Tool to Edit and Sign the Setting Component Parameters In The Xml Le


A quick tutorial on editing Setting Component Parameters In The Xml Le Online
It has become quite simple these days to edit your PDF files online, and CocoDoc is the best PDF editor you would like to use to make changes to your file and save it. Follow our simple tutorial to start!
- Click the Get Form or Get Form Now button on the current page to start modifying your PDF
- Add, change or delete your text using the editing tools on the toolbar above.
- Affter altering your content, put on the date and add a signature to complete it.
- Go over it agian your form before you click and download it
How to add a signature on your Setting Component Parameters In The Xml Le
Though most people are adapted to signing paper documents by handwriting, electronic signatures are becoming more normal, follow these steps to finish your document signing for free!
- Click the Get Form or Get Form Now button to begin editing on Setting Component Parameters In The Xml Le in CocoDoc PDF editor.
- Click on the Sign tool in the tool box on the top
- A window will pop up, click Add new signature button and you'll be given three choices—Type, Draw, and Upload. Once you're done, click the Save button.
- Drag, resize and settle the signature inside your PDF file
How to add a textbox on your Setting Component Parameters In The Xml Le
If you have the need to add a text box on your PDF so you can customize your special content, follow the guide to accomplish it.
- Open the PDF file in CocoDoc PDF editor.
- Click Text Box on the top toolbar and move your mouse to position it wherever you want to put it.
- Write in the text you need to insert. After you’ve writed down the text, you can select it and click on the text editing tools to resize, color or bold the text.
- When you're done, click OK to save it. If you’re not happy with the text, click on the trash can icon to delete it and start afresh.
A quick guide to Edit Your Setting Component Parameters In The Xml Le on G Suite
If you are looking about for a solution for PDF editing on G suite, CocoDoc PDF editor is a recommended tool that can be used directly from Google Drive to create or edit files.
- Find CocoDoc PDF editor and install the add-on for google drive.
- Right-click on a PDF document in your Google Drive and select Open With.
- Select CocoDoc PDF on the popup list to open your file with and allow CocoDoc to access your google account.
- Modify PDF documents, adding text, images, editing existing text, highlight important part, erase, or blackout texts in CocoDoc PDF editor before saving and downloading it.
PDF Editor FAQ
Which is the best IDE for full-stack developers?
The work of a developer is complex and time-consuming, but arming yourself with the most sophisticated tools makes the job both quicker and easier. That’s why many developers turn to integrated development environments (IDEs) to manage workflows, access a suite of development tools within a single dashboard, and reduce errors that can have catastrophic consequences if deployed unchecked.IDEs run the gamut from the simple to the incredibly sophisticated, with some aiming for a clutter-free UI in a lightweight tool to maximize speed for smaller-scale tasks and others offering cross-platform, multi-language support in robust environments capable of handling the most complicated development projects.Whether you’re looking for a simple, language-specific IDE or a full-featured platform to manage most or all of your development projects, we’ve put together this list of 51 of the most useful, robust, and feature-rich IDEs to make it easier for busy developers to find the tools they need to streamline their workflows. Note that the following 51 IDEs aren’t ranked or rated in any particular order of importance; rather, we’ve listed them in alphabetical order for the sake of simplicity and easy reference.Amethyst 2Amethyst 2 is an IDE developed by Sapphire Steel Software, founded by Dermot Hogan and Huw Collingbourne in 2006. Amethyst 2 is offered in two editions, including a commercial edition, Amethyst Ultimate, and a free edition, Amethyst Personal. Amethyst Ultimate includes a variety of tools including Amethyst Designer, code refactoring, a debugger, and more.Key Features:Amethyst Personal offers a limited range of editing featuresAmethyst Ultimate:Amethyst DesignerExtensive code refactoring and code navigationPowerful IntelliSenseSuite of debugging toolsMethod and variable renaming with previewDocument navigatorScratchpad to drag-and-drop reusable code snippetsSnippet editor to create custom snippetsEditing and project managementCost:30-day trial access to Amethyst UltimateAmethyst 2 Ultimate: $299Android Studio@AndroidDevThe official IDE for Android, Android Studio provides the fastest tools for building apps across all types of Android devices. A flexible build system and instant build/deploy system enable developers to focus on building feature-rich, high-quality apps and deliver quickly.Key Features:Instant RunIntelligent code editorFeature-rich Android Emulator 2.0Flexible build systemEasily share code among different versions of your appsCode templatesGitHub integrationCost: FREEAnjuta DevStudioAnjuta DevStudio is a GNOME integrated development environment with versatile functionality including project management, source control and version control, debugging, and more in a simple, intuitive user interface.Key Features:Integrated glade for WYSIWYG UI developmentWizards and project templatesIntegrated GDB for onboard debuggingDevHelp integrationSupports C, C++, Java, JavaScript, Python, and ValaCost: FREEAppBuilderOffering a single framework for developing applications for iOS, Android, and Windows Mobile platforms, AppBuilder supports web-standard technologies including HTML, CSS, and JavaScript. Users can build on their choice of five IDEs with full integration, or opt to build within their web browser.Key Features:Single shared JavaScript code base for all mobile platformsCode changes applied instantly and look native on all devicesBuilt-in simulation, debugging, and deployment tools for all platformsBuild from any Windows, Mac or Linux computerSimply click “save” to experience your code changesPlugins for Visual Studio and Sublime TextCommand Line Interface (CLI) works alongside any IDEIntegrates with NativeScript, Angular, Ionic, Kendo UI Mobile, jQuery Mobile and moreDozens of sample appsVerified Cordova/PhoneGap pluginsCost:Developer: $39/user/monthBusiness: $149/user/monthEnterprise: Contact for a quoteAptana Studio 3@AptanaAptana Studio 3 is a powerful, open-source IDE harnessing the power of Eclipse to provide a fast and seamless environment for developing and testing complete web applications from a single environment. Supporting all major browser technology specs, Aptana Studio 3 eliminates compatibility and testing obstacles to enable rapid deployment.Key Features:HTML, CSS, and JavaScript Code Assist to aid authoring of HTML, CSS, JavaScript, PHP, and RubySupports the latest HTML5 specificationsMultiple protocols including FTP, SFTP, FTPS, and CapistranoAutomatically publish Ruby & Rails apps to hosting services like Heroku and Engine YardIntegrated debugger allowing you to set breakpoints, inspect variables, and control executionGit integration; facilitates Git-based deploymentsBuilt-in terminal for quick command line accessCustomization: Extend the core capabilities through scripting of custom commandsCost: FREEArduino IDE@arduinoArduino is an open-source electronics platform offering flexible, easy to use hardware and software. Arduino IDE offers both the browser-based Arduino Web Editor and the downloadable Arduino IDE, enabling you to work how you’re most comfortable.Key Features:Arduino IDE:Easily write code and upload it to the boardRuns on Windows, Mac OS X, and LinuxBased on Processing and other open-source softwareArduino Web Editor:Save your sketches in the cloudAlways have the most up-to-date version of the IDEIncludes all contributed librariesSupport for new Arduino boardsCost: FREEAtom@AtomEditorA free, open-source, futuristic text editor, Atom is “hackable to the core,” meaning you can customize it to do just about anything you want it to. At the same time, you can also use Atom with ease without ever touching a config file. In other words, Atom is totally adaptable to meet your needs.Key Features:Cross-platform editing; works on OS X, Windows, and LinuxBuilt-in package manager – search for and install packages or create your ownSmart autocompletionFind and replaceFile system browser – find and open files, projects, or multiple projects in one windowMultiple panes for easily comparing and editing code across filesPre-installed with four UI and eight syntax themesBuilt with HTML, JavaScript, CSS, and Node.js integrationCost: FREEBlueJDevelop Java programs quickly and easily with BlueJ, a development environment with a smaller, simpler interface designed with teaching in mind, enabling beginners to get started quickly without being overwhelmed with features. BlueJ is part of the Raspbian distribution and is installed by default on the Raspberry Pi image.Key Features:BlueJ is used as a platform for teaching university coursesMany teaching resources available in the BlueJ Educators CommunityInteract with objects to inspect value, call methods on them, pass them as parameters, and other actionsDirectly invoke Java expressions without compiling; BlueJ is a powerful graphical shell/REPL for JavaRuns on Windows, Mac OS X, Linux and other platforms running Java15+ year-old product actively supported and updated by a full-time dev teamOriginal BlueJ features including object bench, code pad, and scope coloringExtensions to enhance base BlueJ functionalityCost: FREEBrackets.ioA modern, open-source text editor that makes designing in the browser easy and seamless, A modern, open source code editor that understands web design is designed for web designers and front-end developers. An Adobe project, Brackets is released under a MIT License. With built-in visual tools, Brackets offers the right amount of help when you need it without disrupting your creative process.Key Features:Inline editorsLive previewPreprocessor supportRobust social community on Twitter, GitHub, Facebook, and moreView backlog on Trello or WaffleCost: FREEC-FreeA free IDE for C and C++ development, C-Free can be used as an editor or as a stand-alone programming environment. You can edit, build, and debug programs with total autonomy, with a single, compatible workflow with integrated tools and features to extend your capabilities.Key Features:Includes MinGW 5 packageSmall, 14MB installation file size; 80MB total unpackaged sizeRapidly make and implement changes in a fraction of the time compared to other IDEsHovering tool tips to boost coding speedDetects and builds changes quickly without makefileSeamlessly integrates with GDB for rapid response of tracingCost: FREECLion@jetbrainsA cross-platform IDE for C and C++, CLion offers native C and C++ support, including C++11 standard, libc++, and Boost to manage routine tasks so you can focus on the most important aspects of development. Loaded with features, CLion is a robust IDE for C and C++ developers.Key Features:Seamless, intuitive navigationSimple keyboard shortcuts for code generationRefactoring, including automated refactoringInstantly identifies potential code issuesData Flow analysisIntegrated debuggerGDB or LLDB available as a backendEmbedded terminalSemantic highlightingNew CMake workflowCost:CLion:$199.00/1st year$159.00 /2nd year$119.00 /3rd year onwardsAll Products Pack:$649.00 /1st year$519.00 /2nd year$389.00 /3rd year onwardsCloud9Powerful and flexible, Cloud9 facilitates public and private workspace collaboration. Work with team members remotely, in real-time, to write, debug, and run code from the cloud. Group editing and chatting functions enable seamless communication for geographically dispersed teams. Coupled with a plethora of useful features and functionality, Cloud9 is a robust IDE with powerful capabilities.Key Features:Deployment options include Heroku, Cloud Foundry, and Windows AzurePowerful collaboration featuresEasy system setup, no maintenanceWorkspaces powered by Docker Ubuntu containersBuilt-in Terminal and RunnersWorkspace cloning to replicate your complete environmentLanguage tools including Code Completion suggestions, Outline view, and Jump to Definition of variables for easy navigationDebuggerSplit view30+ themes that control syntax highlighting and UIRun Panel to run any languageExtensive set of default Runners including Ruby, Python, PHP/Apache, CoffeeScript, Node.jsKey Bindings EditorConfigure Cloud9 to go into VIM, Emacs, or Sublime modeBuilt-in image editor300 browser/OS combinationsCost:FREE – free public workspaces, 1 private workspaceIndividual: $19/month – unlimited private workspaces, 3 hot workspacesTeams: $29/user/month – unlimited team workspaces, 10 hot workspacesEducation: $1/teacher/month – free public workspaces, 1 private workspace/studentCoda2Featuring the same Editor, Terminal, CSS, Files, and other essentials for developing web apps, Coda2 is a dramatic improvement on the original version you already know and love. More than 100 new features extend the capabilities of Coda2 to create a lightweight, simple, yet incredibly powerful code editor (supporting two dozen programming languages) with multiple plugins for extensibility.Key Features:Supports 24 languagesInstant switching between editor and previewCustomizable column guides, color-coded tabs, and other visual editor featuresSite-wide autocomplete of functions, classes, and variablesManage and discover pluginsTrack and publish files modified outside of CodaBuilt-in Terminal and MySQL editorOpen files locally or edit remotely on FTP, SFTP, WebDAV, or Amazon S3 serversCoda for iOS available for your iPadCost: $99Code::BlocksBuilt around a plugin framework, Code::Blocks is designed to be fully extensible and configurable with a consistent look, feel, and operation across platforms. Designed for C, C++ and Fortran, this open-source and flexible IDE is the cross-platform functional tool for developers with demanding needs.Key Features:Compiling and debugging functionality (provided by plugins)Add any functionality by installing or coding a pluginSupports multiple compilersNo makefiles neededSupport for parallel buildsInter-project dependenciesFull breakpoints supportTo-do list management with different usersOpen files list to quickly switch between filesDebuggerMulti-target projectsImports Dev-C++ projectsCost: FREECodefreshA continuous delivery and automation platform for Docker, Codefresh enables you to build, test, and deploy apps, as well as gather feedback on your container-driven applications. Building and testing your containers on every branch or pull request, Codefresh helps you streamline seamless deployments and share with your team or customers for user acceptance testing or to offer feature previews.Key Features:Fastest builds for Docker imagesStore images in a Docker registry of choice or the built-in Codefresh registryMonitor your Git repositoryRuns unit tests with each Docker buildRuns integration, UI, and other tests on running Docker images or compositionStore test results as part of the image’s metadataShare new feature implementations with your team for comments and feedbackCapable of auto-deployment at the end of every build processWorks seamlessly with Docker, Git Hub, Quay, Jenkins, and other toolsCollaboration via Slack/HipchatCodeLiteAn open source, cross-platform IDE for C, C++, PHP, and Node.js coding languages, CodeLite is a lightweight and efficient IDE with the features you need for seamless development including workspaces, folder management with multiple outline view options, debugging, and more.Key Features:Specialized in C, C++, PHP, and JavaScript (primarily for Node.js backend developers)Supports syntax highlighting for other languagesDefault, built-in debuggerWorkspace management with virtual folders for projectsPlugins to extend functionalityCode formatter support for XML filesGit pluginOutline views to change hierarchyAdd external tools that are automatically triggered when a file is savedCost: FREECodenvy@CodenvyHQCodenvy is powered by Eclipse Che, a developer workspace server and cloud-based IDE for instantly-available and instantly-shareable workspaces. A sophisticated offering, Codenvy boasts one-click Docker environments, team onboarding and collaboration, a workspace platform for DevOps, and much more.Key Features:Quick installationMulti-machine workspacesEasily accessible workspaces from any browser or local IDERules and permissions to control access to workspacesSeamless integration with JIRA issue managementScalable workspace management platform for DevOpsCost:Codenvy for Teams: $500 per user per yearCodenvy for Developers: Free up to 3GB RAMEclipseEclipse is an open source community of tools, projects, and collaborative working groups, also offering several popular IDEs including desktop IDEs, cloud IDEs, and IDE platforms including the widely used Eclipse Che and Orion platforms. Whether you’re looking for a desktop IDE, a cloud-based environment, or other tools to support your development work with any language, Eclipse offers a tool that meets your needs. While each IDE offered by Eclipse functions independently, if you’re looking for IDEs from a reputable source for various programming languages, the Eclipse suite is worth a look.Key Features:Desktop IDEs:Java IDEJava EEC/C++ IDEPHP IDECloud IDEs (for Java, JavaScript, CSS, and HTML):OrionEclipse CheDirigibleIDE Platforms:Eclipse PlatformOrionEclipse CheCost: FREEEric Python IDEEric Python IDE is a full-featured IDE written in Python. Based on the cross-platform Qt GUI Toolkit, it integrates Scintilla, a highly flexible editor control. Designed for use as an intuitive, everyday editor as well as a more robust tool for professional project management, Eric also boasts a plugin system for extending its native capabilities.Key Features:Unlimited editorsConfigurable window layout and syntax highlightingSourcecode autocompletion, calltips, and foldingAdvanced search functionality enabling find and replace across a full projectIntegrated version control interface for Mercurial, Subversion, and GitIntegrated chat and shared editor for collaborationIntegrated Python debugger, sourcecode documentation system, profiling and code coverage support, automatic code checkers, task management, and moreInteractive Python shell including syntax highlighting and autocompletionAbility to run external applications within the IDEMany other built-in featuresCost: FREEGeanyGeany is a text editor utilizing the GTK2 toolkit, but it contains most of the essential features of an IDE. Designed to be a simple, small, and fast IDE, it has only a few dependencies from other packages and supports many file types.Key Features:Syntax highlightingCode foldingSymbol name auto-completionAuto-closing XML and HTML tagsCall tipsCode navigationSymbol listsBuild system for compiling and executing codeSimple project managementExtensive list of plugins from the Geany Plugins ProjectCost: FREEIdle IDEIdle IDE was designed for Python but offers several customization options and supports Python, XML, and custom languages. It’s a straightforward and intuitive IDE that’s ideal for developing in custom scripting languages.Key Features:Intuitive file navigation systemMulti-window text editor with syntax highlightingAutocompletionOperates on Windows and UnixBuilt with Python using the tkinter GUI toolkitIntegrated debuggerPython Shell with syntax highlightingCall stack visibilityIntelliJ IDEAIntelliJ IDEA is a Java IDE that supports Java 8 and Java EE 7, offers coding assistance for languages such as Spring, Android, React, AngularJS, and more, and understands a variety of other languages for a comprehensive solution. A comprehensive IDE, IntelliJ IDEA is a robust development environment with wide functionality for all your development needs, and you can extend it even further with IDEA’s robust plugin ecosystem.Key Features:Powerful static code analysisErgonomic designSmart completionChain completionStatic members completion (use static methods or constants)Data flow analysisCoding assistance for selected languagesCross-language refactoringFinds duplicate code fragments on the flyInspects code to detect issues and offer quick-fix solutionsEditor-centric environmentPlenty of shortcutsVersion control and build toolsTest runner and coverageBuilt-in decompiler for Java classesDatabase tools, application server, and DockerExtended coding assistance for Spring, Java EE, Grails, Play, Android, GWT, Vaadin, Thymeleaf, React, AngularJSUnderstands many languages including Groovy, Kotlin, Scala, JavaScript, TypeScript (https://stackify.com/typescript-vs-javascript/) and SQLCost:IntelliJ IDEA Ultimate:$499.00 /1st year$399.00 /2nd year$299.00 /3rd year onwardsAll Products Pack$649.00 /1st year$519.00 /2nd year$389.00 /3rd year onwardsJCreatorJCreator is an IDE for Java, boasting tons of features and functionality in a simple user interface suitable for both beginner and advanced developers. Unlike most Java IDEs (typically written in Java), JCreator is written entirely in C++ to leverage greater speed and agility.Key Features:Fully customizable user interfaceProject managementProject templatesSource code navigationPopup for code snippets and identifiersJSP, Ant, and CVS supportCode-completionFeature-loaded debugger interfaceEditor with syntax highlightingHelpful wizardsAutomatically starts the appropriate tool when a program is runCost:Free: 30-day trialLE: $35 for 1 userPro: $79 for 1 userPro: $359 for 5 usersPro: $1,099 for 20 usersPro: $1,600 for 30 usersKantharos IDE@psychipA rapid and portable IDE for PHP development, Kantharos IDE is designed for offline scripting rather than major web projects. A clean UI coupled with drag-and-drop functionality make Kantharos IDE a truly intuitive environment ideal for developers with offline scripting needs.Key Features:Code execution time analysisCustom database maintenanceManual web page queriesSingle-script orientedBuilt-in debuggerSyntax checkerCode assistance functionsClass and function navigatorKeyboard shortcutsCost: FREEKDevelopKDevelop is a cross-platform IDE supporting popular languages including C, C++, Python, QML and JavaScript, and PHP that’s been in development since 1998. A seamless development for programmers who take on projects of any size, KDevelop combines an advanced editor with semantic code analysis for a dev environment that actually understands your project.Key Features:Supports a range of platforms from Linux, Solaris, FreeBSD, Mac OS X, Microsoft Windows, and other Unix varietiesBased on KDevelop Platform (kdevplatform), the KDE Frameworks and the Qt librariesBasic syntax highlighting and text-based code completion even for non-supported languagesAnnotate border shows who changed a line and whenGUI integration for certain version control systems including Git, Bazaar, Subversion, CVS, Mercurial, and PerforceSupport for CMake, QMake, Custom Makefiles (partial), and generic build systems (no automatic include path detection)Invokes automation tools such as make and ninjaNavigation widget pops up when mousing over itemsCode browser mode for browsing an unknown code baseContext-sensitive, semantic code completionSemantic and rainbow highlightingDocumentation integrationCustomizableCost: FREEKomodoKomodo IDE is a comprehensive IDE for web and mobile app development, featuring a variety of integrations and frameworks in a single, cross-platform polyglot IDE. With support for more than 100 languages, including Python, PHP, Go, Perl, Tcl, Ruby, NodeJS, HTML, CSS, JavaScript, and more, you won’t have a reason to utilize several IDEs for various programming languages.Key Features:Supports 100+ languages on any operating systemSlack sharing for collaborationIntegrates with Gulp, Grunt, NPM and Yarn for easy access to common tasksRun emulators, build targets, and easily interact with Cordova & PhoneGapUse or write tutorials for various languages, including Catalyst, Django, Flask, Pyramid, Rails, and moreDebug web apps without Chrome toolsSupports popular web frameworksCost:Community Edition: FREE – Current version(s), non-production use ONLYBusiness Edition: Starts at $1,200/instance/year – Current versions on production, past versions on production and non-production, and external-facing servers and business critical applicationsEnterprise Edition: Contact for a quote – Required for site-wide licensing and mission-critical applicationsOEM Licensing: Contact for a quote – Required for external redistributionLazarusA Delphi-compatible, cross-platform IDE, Lazarus offers rapid development with a variety of ready-to-use components and a graphical form designer for creating complex graphical user interfaces. Create your own open source or commercial applications from file browsers to image viewers, database applications, graphics editing software, 3D software, games, medical analysis software or any application you can imagine with Lazarus.Key Features:200+ built-in componentsExtendable with add-ons via Lazarus Package Files (LPKs)Written in Pascal for PascalTons of example applications in Lazarus Application GalleryCreate programs with no platform dependencies (some exceptions)Made for writing object-oriented Pascal codeGPL/LGPL licensing for use for commercial projectsOffers a similar programming experience across Windows, Mac OS X, Linux, BSD, Raspberry Pi, and moreCost: FREELight TableA next-generation code editor, Light Table connects you to your project with instant feedback and by displaying data values throughout your code as you work. Light Table offers all the tools you need, easily integrated within your workflow in order to not disrupt your creative process with cumbersome processes.Key Features:Embed anything – graphics, games, running visualizations, etc.Fully customizable to your specific projectsQuickly and easily test new ideasEvaluation, debugging, fuzzy finder for files, commands, and more fit into your workflowElegant, lightweight, and clutter-freeAdd watches to expressions to stream data to Light Table in real-timeInline evaluationCompletely open sourcePlugin manager connects to the central list of plugins – no more searching for the plugins you needPowerful editingCost: FREEMacRabbit EspressoTurbo-charge your workflow with MacRabbit Espresso’s powerful feature set. With built-in CSSEdit 3, Espresso offers award-winning visual tools, efficient coding with live styling, and the flexibility of tabs with smooth integration with your project files.Key Features:CSS3 support for multi-browser gradients, shadows and moreSee how your changes impact your project with X-rayCodeSense, Zen coding, and a drag-and-drop NavigatorSee CSS updates in real-time – no need to save, publish, and reloadSupports HTML5, CSS3, JavaScript and PHP; all-new Ruby, Python, Apache and MarkdownExtendible with XML/JS SugarsProject-wide find and replace, Quick Filter and colorized regexQuick Publish, Server Sync and Browse for server-based workflowsCost:15-day trial$59 (beta offer)Standard cost: $79MariaMoleAn open-source IDE for Arduino, MariaMole offers a simple-yet-advanced interface for coding and uploading to Arduino boards. Choose to automate some parts of the code or opt to create your own code entirely, work with multiple projects simultaneously, and more with MariaMole.Key Features:Use the code pre-processor to automate some parts of the codeWork with several projects simultaneouslyMaintain distinct specifications for each project; upload to different Arduino boardsImport existing Arduino sketches and librariesCreate new projects based on examplesCompiles, links and uploads your programs to your Arduino boardsProject properties wizard for customizing optionsWorks on Windows, Linux and OS X; files created with MariaMole compatible with these same systemsImports and exports your projects to Arduino sketchesCost: FREEMicrosoft Visual Studio IDEMicrosoft’s Visual Studio IDE is available in both Windows and Mac versions for use on either type of machine. Visual Studio for Mac is a mobile-first, cloud-first IDE made for the Mac, while Microsoft Studio 2017 is a full-featured IDE for productive app development. Both offer robust features enabling you to develop, debug, collaborate, and extend with ease. Develop Windows apps and games, native or hybrid apps for Android, iOS, and Windows, Azure apps, web apps, Office apps and tools, cross-platform games, and more.Key Features:Write code accurately and efficiently without losing file contextRefactor, identify, and fix code issuesWrite your own extensionsQuickly find and debug bugs cross languages, locally or remotelyDebug across code historyFind and diagnose performance issues without leaving the debugger workflowPlan, execute, and monitor your entire testing effortQuality metrics, indicators, and test status reportingManage your source code in GitUse Visual Studio Team Services to manage code and bugs and work items for your entire projectVariety of tools, controls, and templates available from Microsoft, partners, and the communityCost:Visual Studio Community: FREEVisual Studio Professional:Standalone License: $499Standard Subscription: $1,199 ($799 to renew)Cloud Subscriptions: $539/year, $45/monthVisual Studio Enterprise: Contact for a quoteMonkey StudioA cross-platform IDE written in C++/Qt 4, Monkey Studio originally intended to support only Qt 4; however, it has evolved to support Qt development and any type of project. It’s a complete, fast, and powerful IDE for Qt 4 that functions on any platform supported by Qt.Key Features:Designer and AssistantFlexible plugin system for infinite expansionReleased under GNU GPLWorks on Windows 98 SE, XP and Vista, Mac OS X 10.3 and up, Mandriva, Suse, Fedora, Frugalware, Gentoo and debian/Ubuntu/KubuntuCustomizable QScintilla-based code editorSyntax highlighting for 22+ languagesAutomatically detects End of Line and indentation modesTemplates wizardCode restylingAutomatic completionSearch and replaceNavigator shows classes, methods, functions, and variablesGNU debuggerCost: FREEMonoDevelopQuickly write desktop and web apps on Linux, Windows, and Mac OS with MonoDevelop, a cross-platform IDE for C#, F#, and more. Maintain a single code base for all platforms while porting .NET applications made with Visual Studio to Mac OS and Linux.Key Features:Code completion support for C#, code templates, code foldingFully customizable window layouts, user defined key bindings, external toolsSupports C#, F#, Visual Basic .NET, C/C++, ValaIntegrated debugger for Mono and native appsEasily build GTK# applications with GTK# Visual DesignerNET with full code completion and test support on XSP, the Mono web serverSource controlMakefile integrationUnit testingPackaging and deploymentLocalizationCost: FREEMyEclipse@GenuitecUnify your development in a single Java IDE with MyEclipse, featuring the must-have tools for every full-stack developer. Create both dynamic front ends and powerful back ends with the same IDE; MyEclipse makes it possible to create quality applications using the latest technologies.Key Features:The latest EclipseBuilt-in libraries and wizardsDatabase tooling and persistenceBuilt-in TomCat serverMaven project managementWebSphere connectors with RAD migrationEnterprise reportingSpring tooling with bean tooling and scaffoldingPopular app server connectorsTypeScript and JavaScript validation and debuggingCode Live with Live PreviewValidation and auto-complete for HTMLAngular 2+ supportCost:Webclipse including the Angular IDE: Starts at $48/seat for commercial licenseEclipse Delivery by SDC: Starts at $100/user, 1-10 usersUnlimited delivery of a single product: $15,000Unlimited usage of a single delivery hub: $25,000Enterprise-wide license: $75,000MyEclipse Enterprise IDE: Starts at $63.55/seat (HTML5, UML and more)Enhanced WebSphere Tooling: Starts at $158.95/seatAdvanced Spring Tooling: Starts at $149.95/seatIncluding license pre-activation and distribution: Starts at $99.95/seatNetBeans IDEDevelop web apps quickly and easily with Java, JavaScript, HTML5, PHP, C/C++ and more. Free and open source, NetBeans boasts a robust community of users and developers worldwide.Key Features:Official IDE for Java 8Quickly update apps to use new Java 8 constructsEditors, code analyzers, and convertersSearch multiple apps simultaneouslyNetBeans Editor indents lines, matches words and bracketsAutomatically highlights code syntactically and semanticallyCode templates, coding tips, and code generatorsSupports Java, C/C++, XML and HTML, to PHP, Groovy, Javadoc, JavaScript and JSPExtensible editor to support other languagesEasy project management with multiple data viewsBuilt-in versioning tools from Subversion, Mercurial, and Git integrationDesign GUIs for Java SE, HTML5, Java EE, PHP, C/C++, and Java ME applicationsVisual debugger for Java SE applicationsCost: FREENuclideBuilt on a single package on top of Atom, Nuclide provides hackability coupled with the support of an active user community. It’s a first-class development environment for React Native, Hack, and Flow projects.Key Features:Built-in debugging for React Native, Hack, Flow and moreRemote development – connect to your remote servers and get full file tree access in NuclideBuilt-in support for FlowFirst IDE with support for HackAutocomplete, jump-to-definition, inline errors, and an omni-search bar for projectsTask Runner for building, running, testing, and debugging Hack, Buck, and Swift projectsWorking Sets reduce noise by narrowing your focus to the subsets you need to focus onMercurial supportCost: FREENuSphere PhpEDPhpED is a world-class IDE for PHP, HTML, CSS, XML, SMARTY, XHTML, and more. An advanced code editor, dbg debugger, a database connectivity client, and secure deployment capabilities combine for a comprehensive IDE solution that meets most development needs.Key Features:Saves up to 75% of development timePhpED 18.0 editing features including highlighting, easy code navigation, and PHP code foldingPowerful PHP debugger for debugging PHP remotely or locallyFind and eliminate bottlenecks in your code with the PHP ProfilerSecure, fast, and flexible deploymentSupports all major protocols including FTP, FTPS, SSH/SFTP, and WebDAVIntegrates with third-party tools such as PHP encoders, formatters, and HTML validatorsPre-configured tools including a PHP documenter, HTML tidy, CVS client, and HTML validatorCost:PhpED Personal: $74 – 1 license for individual developersPhpED Professional: $179 – 1 license for companies and organizationsNuSphere Advantage: $299 – Full stack of tools for development, protection of your code and deployment PhpED Professional, NuCoder and PhpDockPhpED Team4: $537 – 4 licensesPhpStormA lightning-smart IDE for PHP, PhpStorm supports major frameworks including Symfony, Drupal, WordPress, Zend Framework, Laravel, Magento, Joomla!, CakePHP, Yii, and more. A deep understanding of your code and its structure plus support for all PHP language features for both modern and legacy projects make PhpStorm a solid option for PHP developers.Key Features:Supports most front-end technologies including HTML5, CSS, Sass, Less, Stylus, CoffeeScript, TypeScript, Emmet, and JavaScriptVersion Control Systems integrationSupport for remote deploymentFull support for PHP and Databases/SQLCommand-line toolsVagrant, Composer, REST Client, and moreIncludes all features of WebStormIntelligent code assistance; on-the-fly error preventionEasy debugging and testingFast, safe refactoringCode completion and smart code navigationSupport for Docker in remote interpretersCost:PhpStorm:$199.00 /1st year$159.00 /2nd year$119.00 /3rd year onwardsAll Products Pack:$ 649.00 /1st year$519.00 /2nd year$389.00 /3rd year onwardsPyCharmPyCharm is a Python IDE for professional developers, also offering support for avaScript, CoffeeScript, TypeScript, Cython, SQL, HTML/CSS, template languages, AngularJS, Node.js, and more. With a slew of built-in, out-of-the-box tools, PyCharm is a complete solution for Python developers who need an IDE that supports multiple languages.Key Features:Smart code completion, code assistance, error highlighting and quick-fixesAutomated code refactoring and rich navigationSupports modern web development frameworks including Django, Flask, Google App Engine, Pyramid, and web2pyIntegrates with IPython NotebookInteractive Python consoleSupports Anaconda plus scientific packages including matplotlib and NumPyRun, debug, test, and deploy apps on virtual machines and remote hostsIntegrated debugger and test runnerPython profilerBuilt-in terminalIntegration with major VCSBuilt-in Database ToolsCost:PyCharm:$199.00 /1st year$159.00 /2nd year$119.00 /3rd year onwardsAll Products Pack:$ 649.00 /1st year$519.00 /2nd year$389.00 /3rd year onwardsQt CreatorGo beyond the code to design and create with Qt Creator, a cross-platform IDE for creating connected devices, UIs, and applications. Create mobile apps, desktop applications, and connected embedded devices from a single sophisticated console.Key Features:Integrated UI design tools including Qt Widgets and Qt DesignerCreate smooth, quick animations with Qt Quick DesignerExpand your global market with Qt Linguist to speed translationQt Assistant, a configurable and redistributable documentation readerAdd-in for Visual Studio usersSophisticated code editor for C++ and QMLIntegrated with popular version control systemsProject and build managementQuickly switch between build targets with multi-screen and multi-platform supportCost:Free trialContact for a quoteUse this wizard to find the right option for youRubyMineRubyMine is an intelligent IDE for Ruby and Rails development. Loaded with features including options to configure your project environment and seamless integration with third-party tools including Rake Task Runner, Rails Generators, Bundler, RVM/Rbenv, Zeus, and others, RubyMine is a comprehensive IDE for Ruby and Rails developers.Key Features:Support for Ruby and Rails, JavaScript, CoffeeScript, ERB, HAML, CSS, Sass and LESS, and moreLanguage specific-aware syntaxError highlightingCode formatting and code completionQuick documentationSmart search for jumping to any class, file, symbol, IDE action, or tool windowMVC-based project view and modelClass and gem dependencies diagramsCode inspectors for verifying your codeQuick-fix options for on-the-fly improvementsAutomated, safe refactoringRails-aware refactoring for project-wide changesPowerful debuggerGraphical UI for Ruby, JavaScript, and CoffeeScriptCreate and run RSpec, Cucumber, Shoulda, MiniTest, and Test::Unit testsCustomizable color and keyboard schemesUnified UI for working with Git, SVN, Mercurial, and other version control systemsManage your infrastructure with Vagrant, Capistrano, Chef, or PuppetCost:RubyMine:$199.00 /1st year$159.00 /2nd year$119.00 /3rd year onwardsAll Products Pack:$ 649.00 /1st year$519.00 /2nd year$389.00 /3rd year onwardsSapphireSteelSapphireSteel is a professional Ruby development tool for Visual Studio, offering powerful IntelliSense, a fast Cyclon debugger, syntax-sensitive editing, and a visual UI designer for a complete development environment.Key Features:Ultra-fast Cyclon debugger with breakpoints and tracing, hover and drill-down, conditional breakpoints, and moreDrag-and-drop designer for creating visual UIs for Ruby programsCode coloring and code foldingBracket and keyword/end matchingAuto-generate code blocks with snippetsCreate your own snippets without coding with the snippet editorAuto-align code with smart or block indentingAutomatic code formattingFast code completion analyzes code as it’s writtenDrop-down menus with relevant, accurate information on the methods available to objects and classesDocumentation hintsDrop-down navigation bars over the editor to quickly navigate codeSapphire projects are managed from the Visual Studio Solution ExplorerCost:30-day trialSapphire 3: $249ShiftEditShiftEdit is an online, browser-based IDE allowing you to develop websites from the comfort of your browser. Gain access to project files regardless of where they reside (FTP, SFTP, and cloud-based services such as Dropbox or Google Drive), clone repositories from GitHub and Bitbucket, and more.Key Features:Connect to a localhost with the aid of a proxyInvite, chat, and collaborate with other team members in real-timeSophisticated autocomplete, syntax checking, and function definitionsFully functional terminal to connect to a dev environment or ssh serverPreview your changes as you workRevision history with easy step-backCompare files including live diff or two distinct filesCustomizable with snippets, notes, themes, and the ability to import your own CSSGit clientGitHub and Bitbucket integrationDeploy servers with AWS or LinodeCost:Basic: $6/monthBusiness: $15/month – unlimited projects and revisionsSquadA web-based, collaborative IDE, Squad makes it easy to open, edit, and share code in real-time. Invite team members to workspaces to gain feedback or code together on the same projects simultaneously.Key Features:Copy and share workspace URLsAnyone with the URL can access your workspace with no account necessarySyntax highlighting for 16+ languagesSearchable chat historyRemote FTP/SFTP connectionsChat and edit files from anywhere with an Internet connectionConstantly saves workspaces for multi-machine availabilityMaintain control of your filesUse Squad as an IDE or simply for collaborationDocuments who opened and saved which files to help you stay in sync with your teamCost:FREE: 1 userSolo: $3.95/month – 1 userTeam: $49.95/month – 5 users, $8/user/month for additional usersVisual LANSAA low-code, cross-platform development environment, Visual LANSA offers a metadata repository and a high-level programming language for developing and maintaining web, desktop, and mobile applications. The IDE is available on Windows and in the cloud, with deployment platforms including Cloud, Windows, IBM i, and Linux. With prototyping tools in a visual application framework, developers get a kick-start to building powerful applications with Visual LANSA.Key Features:Platform-independent metadata repositoryRDML (Rapid Development and Maintenance Language)Develop web, Windows desktop, and mobile, 5250, and server-based applications from a single code baseSeamless access to IBM i, JDBC, and ODBC-compliant databasesCentralized data definitions, business rules, and algorithmsMake changes in one place to apply them to all apps for streamlined maintenancePoint-and-click to select fields and filesCut and paste to rapidly edit and debugPowerful forms painter to design UIsTest apps on a single Windows system and deploy to a mix of platforms at any timeCost: Contact for a quoteVisual Studio CodeVisual Studio Code is a free, open-source IDE that runs anywhere. With built-in Git, debugging tools, and a variety of extensions to extend its capabilities, plus tons of other features including IntelliSense, Visual Studio Code provides a robust interface packed with features and functionality.Key Features:Debug code right from the editorDebug with break points, call stacks, and an interactive consoleIntelliSense provides smart completions based on variable types, function definitions, and imported modulesBuilt-in Git commandsExtensions for adding themes, languages, debuggers, and moreCost: FREEWebStormA smart JavaScript IDE, WebStorm is both lightweight and powerful as well as equipped for complex client-side and server-side development with Node.js. Intelligent coding assistance and support for the latest technologies make WebStorm a valuable tool for web developers.Key Features:Smart code completion and on-the-fly error detectionPowerful navigation and refactoringSupports JavaScript, CSS, HTML, and Node.jsSupports frameworks including Angular JS, React, Meteor, and moreUnified UI for working with Git, SVN, Mercurial, and moreIntegrates with tools like Grunt task runner, linters, npm, and moreTerminal also available as an IDE tool windowDebugging, tracing, and testingSupport for Flow, TypeScript, and React NativeCost:WebStorm:$129.00 /1st year$103.00 /2nd year$77.00 /3rd year onwardsAll Products Pack:$649.00 /1st year$519.00 /2nd year$389.00 /3rd year onwardsWingwareWingware was founded back in 1999 with the aim of building high-end software solutions for Python developers. Wingware’s Python IDE is an intelligent development environment for serious Python programmers, featuring code assistance, debugging tools, version control and more in a cross-platform solution.Key Features:Autocompletion, error checking, source navigation, and other code assistance toolsAuto-editing, refactoring, code folding, remote editing, and moreSupports test-driven development with Django, nose, pitest, and other testing frameworksFast and powerful debugging featuresFlexible project management with Mercurial, Git, Subversion, Perforce, CVS, and BazaarReview changes before commitRuns on Windows, Linux, and OS XWorks with Python 2.x and 3.x as well as Stackless PythonRemote development (new in Wing 6)Cost:Free 30-day trialCommercial Use: $245/user5-Pack: $1,15010-Pack: $1,995Non-Commercial Use: $95/userThere are also two free versions available: Wing Personal is a free Python IDE that omits some features, and Wing 101 is a very simplified free Python IDE for beginners.Xamarin@xamarinhqXamarin Studio enables you to build better apps with intelligent code completion that unlocks iOS, Android, and OS X APIs, easy and powerful debugging, and availability in 14 languages with support for tvOS, Apple WatchKit, Android Wear, and compatibility with Microsoft Band’s C# SDK.Key Features:Quickly look up methods and typesDiscover API functionalityDebug in a simulator or on a deviceWatch values change in real-timeAvailable in 14 languagesFull support for modern technologiesPackage and distribute apps to the App Store and Google PlayUniversal searchContextual insightsIntelligent refactoringVersion controlFirst-class F# supportCode navigationMore than 22,000 NuGet packagesSmart syntax highlightingiOS and Android DesignersCost:Xamarin Studio Community: FREEXamarin Studio Professional: Contact for a quote (free trial)Xamarin Studio Enterprise: Contact for a quote (free trial)XcodeThe Xcode IDE is “at the center of the Apple development experience.” It integrates with Cocoa and Cocoa Touch frameworks and offers powerful tools for building apps for a range of Apple devices including Mac, iPhone, iPad, Apple Watch, and Apple TV.Key Features:Assistant Editor presents related source code in a split window paneSimply drag the mouse to connect UI controls to implementation codeRobust Interface Builder design canvasVersion editor and source controlApple LLMV compiler technologiesLLDB debuggerAutomatically identifies mistakes and offers quick-fix suggestionsCommunicates with Apple Developer websiteEnable Game Center or Passbook in apps with a single clickCapable of setting up a remote bot for continuously building, analyzing, testing, and packaging your appBundles and submits apps to App StoreCustomizable to match any workflowCost: FREE
Creating an Android project?
This lesson shows you how to create a new Android project with Android Studio and describes some of the files in the project.In Android Studio, create a new project:If you don't have a project opened, in the Welcome to Android Studio window, click Start a new Android Studio project.If you have a project opened, select File > New Project.In the New Project screen, enter the following values:Application Name: "My First App"Company Domain: "Example Domain"Android Studio fills in the package name and project location for you, but you can edit these if you'd like.Click Next.In the Target Android Devices screen, keep the default values and click Next.The Minimum Required SDK is the earliest version of Android that your app supports, which is indicated by the API level. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set. If any feature of your app is possible only on newer versions of Android and it's not critical to the core feature set, enable that feature only when running on the versions that support it (see Supporting Different Platform Versions).In the Add an Activity to Mobile screen, select Empty Activity and click Next.In the Customize the Activity screen, keep the default values and click Finish.After some processing, Android Studio opens and displays a "Hello World" app with default files. You will add functionality to some of these files in the following lessons.Now take a moment to review the most important files. First, be sure that the Project window is open (select View > Tool Windows > Project) and the Android view is selected from the drop-down list at the top. You can then see the following files:app > java > com.example.myfirstapp > MainActivity.javaThis file appears in Android Studio after the New Project wizard finishes. It contains the class definition for the activity you created earlier. When you build and run the app, the Activity starts and loads the layout file that says "Hello World!"app > res > layout > activity_main.xmlThis XML file defines the layout of the activity. It contains a TextView element with the text "Hello world!".app > manifests > AndroidManifest.xmlThe manifest file describes the fundamental characteristics of the app and defines each of its components. You'll revisit this file as you follow these lessons and add more components to your app.Gradle Scripts > build.gradleAndroid Studio uses Gradle to compile and build your app. There is a build.gradle file for each module of your project, as well as a build.gradle file for the entire project. Usually, you're only interested in the build.gradle file for the module. in this case the app or application module. For more information about this file, see Building Your Project with Gradle.Running Your AppIn the previous lesson, you created an Android project that displays "Hello World." You can now run the app on a real device or on an emulator. If you don't have a real device available, skip to Run on an Emulator.Run on a Real DeviceSet up your device as follows:Connect your device to your development machine with a USB cable. If you're developing on Windows, you might need to install the appropriate USB driver for your device. For help installing drivers, see the OEM USB Drivers document.Enable USB debugging on your device by going to Settings > Developer options.Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.Run the app from Android Studio as follows:In Android Studio, select your project and click Run from the toolbar.In the Select Deployment Target window, select your device, and click OK.Android Studio installs the app on your connected device and starts it.Run on an EmulatorBefore you run your app on an emulator, you need to create an Android Virtual Device (AVD) definition. An AVD definition defines the characteristics of an Android phone, tablet, Android Wear, or Android TV device that you want to simulate in the Android Emulator.Create an AVD Definition as follows:Launch the Android Virtual Device Manager by selecting Tools > Android > AVD Manager, or by clicking the AVD Manager icon in the toolbar.In the Your Virtual Devices screen, click Create Virtual Device.In the Select Hardware screen, select a phone device, such as Nexus 6, and then click Next.In the System Image screen, choose the desired system image for the AVD and click Next.If you don't have a particular system image installed, you can get it by clicking the download link.Verify the configuration settings (for your first AVD, leave all the settings as they are), and then click Finish.For more information about using AVDs, see Create and Manage Virtual Devices.Run the app from Android Studio as follows:In Android Studio, select your project and click Run from the toolbar.In the Select Deployment Target window, select your emulator and click OK.It can take a few minutes for the emulator to start. You may have to unlock the screen. When you do, My First App appears on the emulator screen.That's how you build and run your Android app on the emulator! To start developing, continue to the next lesson.Building a Simple User InterfaceIn this lesson, you create a layout in XML that includes a text field and a button. In the next lesson, your app responds when the button is pressed by sending the content of the text field to another activity.The graphical user interface for an Android app is built using a hierarchy of View and ViewGroupobjects. View objects are usually UI widgets such as buttons or text fields. ViewGroup objects are invisible view containers that define how the child views are laid out, such as in a grid or a vertical list.Android provides an XML vocabulary that corresponds to the subclasses of View and ViewGroup so you can define your UI in XML using a hierarchy of UI elements.Layouts are subclasses of the ViewGroup. In this exercise, you'll work with a LinearLayout.Figure 1. Illustration of how ViewGroup objects form branches in the layout and contain other View objects.Create a Linear LayoutIn Android Studio's Project window, open app > res > layout > activity_main.xml.This XML file defines the layout of your activity. It contains the default "Hello World" text view.When you open a layout file, you’re first shown the design editor in the Layout Editor. For this lesson, you work directly with the XML, so click the Texttab at the bottom of the window to switch to the text editor.Delete everything and insert the following XML:<?xml version="1.0" encoding="utf-8"?><LinearLayoutxmlns: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:orientation="horizontal"></LinearLayout>LinearLayout is a view group (a subclass of ViewGroup) that lays out child views in either a vertical or horizontal orientation, as specified by the android:orientation attribute. Each child of a LinearLayout appears on the screen in the order in which it appears in the XML.Two other attributes, android:layout_width and android:layout_height, are required for all views in order to specify their size.Because the LinearLayout is the root view in the layout, it should fill the entire screen area that's available to the app by setting the width and height to"match_parent". This value declares that the view should expand its width or height to match the width or height of the parent view.For more information about layout properties, see the Layout guide.Add a Text FieldIn the activity_main.xml file, within the <LinearLayout> element, add the following <EditText> element:<LinearLayout 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:orientation="horizontal"> <EditText android:id="@+id/edit_message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:hint="@string/edit_message" /></LinearLayout> Don't worry about the error that appears for @string/edit_message; you'll fix that soon.Here is a description of the attributes in the <EditText> you added:android:idThis provides a unique identifier for the view, which you can use to reference the object from your app code, such as to read and manipulate the object (you'll see this in the next lesson).The at sign (@) is required when you're referring to any resource object from XML. It is followed by the resource type (id in this case), a slash, then the resource name (edit_message).The plus sign (+) before the resource type is needed only when you're defining a resource ID for the first time. When you compile the app, the SDK tools use the ID name to create a new resource ID in your project's R.java file that refers to the EditText element. With the resource ID declared once this way, other references to the ID do not need the plus sign. Using the plus sign is necessary only when specifying a new resource ID and not needed for concrete resources such as strings or layouts. See the sidebox for more information about resource objects.android:layout_width and android:layout_heightInstead of using specific sizes for the width and height, the "wrap_content" value specifies that the view should be only as big as needed to fit the contents of the view. If you were to instead use "match_parent", then the EditText element would fill the screen, because it would match the size of the parent LinearLayout. For more information, see the Layouts guide.android:hintThis is a default string to display when the text field is empty. Instead of using a hard-coded string as the value, the "@string/edit_message" value refers to a string resource defined in a separate file. Because this refers to a concrete resource (not just an identifier), it does not need the plus sign. However, because you haven't defined the string resource yet, you’ll see a compiler error at first. You'll fix this in the next section by defining the string.Note: This string resource has the same name as the element ID: edit_message. However, references to resources are always scoped by the resource type (such as id or string), so using the same name does not cause collisions.Add String ResourcesBy default, your Android project includes a string resource file at res > values > strings.xml. Here, you'll add two new strings.From the Project window, open res > values > strings.xml.Add two strings so that your file looks like this:<?xml version="1.0" encoding="utf-8"?><resources><string name="app_name">My First App</string><string name="edit_message">Enter a message</string><string name="button_send">Send</string></resources>For text in the user interface, always specify each string as a resource. String resources allow you to manage all UI text in a single location, which makes the text easier to find and update. Externalizing the strings also allows you to localize your app to different languages by providing alternative definitions for each string resource.For more information about using string resources to localize your app for other languages, see the Supporting Different Devices class.Add a ButtonGo back to the activity_main.xml file and add a button after the <EditText>. Your file should look like this:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <EditText android:id="@+id/edit_message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:hint="@string/edit_message" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_send" /></LinearLayout> Note: This button doesn't need the android:id attribute, because it won't be referenced from the activity code.The layout is currently designed so that both the EditText and Button widgets are only as big as necessary to fit their content, as figure 2 shows.Figure 2. The EditText and Button widgets have their widths set to "wrap_content".This works fine for the button, but not as well for the text field, because the user might type something longer. It would be nice to fill the unused screen width with the text field. You can do this inside a LinearLayout with the weight property, which you can specify using the android:layout_weightattribute.The weight value is a number that specifies the amount of remaining space each view should consume, relative to the amount consumed by sibling views. This works kind of like the amount of ingredients in a drink recipe: "2 parts soda, 1 part syrup" means two-thirds of the drink is soda. For example, if you give one view a weight of 2 and another one a weight of 1, the sum is 3, so the first view fills 2/3 of the remaining space and the second view fills the rest. If you add a third view and give it a weight of 1, then the first view (with weight of 2) now gets 1/2 the remaining space, while the remaining two each get 1/4.The default weight for all views is 0, so if you specify any weight value greater than 0 to only one view, then that view fills whatever space remains after all views are given the space they require.Make the Input Box Fill in the Screen WidthIn activity_main.xml, modify the <EditText> so that the attributes look like this:<EditText android:id="@+id/edit_message" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content" android:hint="@string/edit_message" /> Setting the width to zero (0dp) improves layout performance because using "wrap_content" as the width requires the system to calculate a width that is ultimately irrelevant because the weight value requires another width calculation to fill the remaining space.Figure 3. The EditText widget is given all the layout weight, so it fills the remaining space in the LinearLayout.Here’s how your complete activity_main.xmllayout file should now look:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> <EditText android:id="@+id/edit_message" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content" android:hint="@string/edit_message" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/button_send" /></LinearLayout> Run Your AppTo see how the app now looks on your device or emulator, click Runin the toolbar.To add app behaviors such as responding to a button and starting another activity, continue to the next lesson.Starting Another ActivityAfter completing the previous lesson, you have an app that shows an activity (a single screen) with a text field and a button. In this lesson, you’ll add some code to MainActivitythat starts a new activity when the user clicks the Send button.Respond to the Send ButtonIn the file res > layout > activity_main.xml, add the android:onClick attribute to the <Button>element as shown below:<Buttonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="@string/button_send"android:onClick="sendMessage" />This attribute tells the system to call the sendMessage() method in your activity whenever a user clicks on the button.In the file java > com.example.myfirstapp > MainActivity.java, add the sendMessage() method stub as shown below:public class MainActivity extends AppCompatActivity {@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);}/** Called when the user clicks the Send button */public void sendMessage(View view) {// Do something in response to button}}In order for the system to match this method to the method name given to android:onClick, the signature must be exactly as shown. Specifically, the method must:Be publicHave a void return valueHave a View as the only parameter (this will be the View that was clicked)Next, you’ll fill in this method to read the contents of the text field and deliver that text to another activity.Build an IntentAn Intent is an object that provides runtime binding between separate components (such as two activities). The Intent represents an app’s "intent to do something." You can use intents for a wide variety of tasks, but in this lesson, your intent starts another activity.In MainActivity.java, add the code shown below to sendMessage():public class MainActivity extends AppCompatActivity { public final static String EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } /** Called when the user clicks the Send button */ public void sendMessage(View view) { Intent intent = new Intent(this, DisplayMessageActivity.class); EditText editText = (EditText) findViewById(R.id.edit_message); String message = editText.getText().toString(); intent.putExtra(EXTRA_MESSAGE, message); startActivity(intent); }} Android Studio will display Cannot resolve symbol errors because this code references classes that are not imported. You can solve some of these with Android Studio's "import class" functionality by pressing Alt + Enter (or Option + Return on Mac). Your imports should end up as the following:import android.content.Intent;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.view.View;import android.widget.EditText; An error remains for DisplayMessageActivity, but that's okay; you'll fix that in the next section.There’s a lot going on in sendMessage(), so let’s explain what's going on.The Intent constructor takes two parameters:A Context as its first parameter (this is used because the Activity class is a subclass of Context)The Class of the app component to which the system should deliver the Intent (in this case, the activity that should be started).Note: The reference to DisplayMessageActivity will raise an error in Android Studio because the class doesn’t exist yet. Ignore the error for now; you’ll create the class soon.The putExtra() method adds the EditText's value to the intent. An Intent can carry data types as key-value pairs called extras. Your key is a public constant EXTRA_MESSAGE because the next activity uses the key to retrive the text value. It's a good practice to define keys for intent extras using your app's package name as a prefix. This ensures the keys are unique, in case your app interacts with other apps.The startActivity() method starts an instance of the DisplayMessageActivity specified by the Intent. Now you need to create the class.Create the Second ActivityIn the Project window, right-click the app folder and select New > Activity > Empty Activity.In the Configure Activity window, enter "DisplayMessageActivity" for Activity Name and click FinishAndroid Studio automatically does three things:Creates the class DisplayMessageActivity.java with an implementation of the required onCreate() method.Creates the corresponding layout file activity_display_message.xmlAdds the required <activity> element in AndroidManifest.xml.If you run the app and click the Send button on the first activity, the second activity starts but is empty. This is because the second activity uses the default empty layout provided by the template.Display the MessageNow you will modify the second activity to display the message that was passed by the first activity.In DisplayMessageActivity.java, add the following code to the onCreate() method:@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_display_message);Intent intent = getIntent();String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);TextView textView = new TextView(this);textView.setTextSize(40);textView.setText(message);ViewGroup layout = (ViewGroup) findViewById(http://R.id.activity_display_message);layout.addView(textView);}Press Alt + Enter (or Option + Return on Mac) to import missing classes. Your imports should end up as the following:import android.content.Intent;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.view.ViewGroup;import android.widget.TextView;There’s a lot going on here, so let’s explain:The call getIntent() grabs the intent that started the activity. Every Activity is invoked by an Intent, regardless of how the user navigated there. The call getStringExtra() retrieves the data from the first activity.You programmatically create a TextView and set its size and message.You add the TextView to the layout identified by R.id.activity_display_message. You cast the layout to ViewGroup because it is the superclass of all layouts and contains the addView() method.Note: The XML layout generated by previous versions of Android Studio might not include the android:id attribute. The call findViewById() will fail if the layout does not have the android:id attribute. If this is the case, open activity_display_message.xml and add the attributeandroid:id="@+id/activity_display_message" to the layout element.You can now run the app. When it opens, type a message in the text field, and click Send. The second activity replaces the first one on the screen, showing the message you entered in the first activity.That's it, you've built your first Android app!To learn more, follow the link below to the next class.Supporting Different DevicesAndroid devices come in many shapes and sizes all around the world. With a wide range of device types, you have an opportunity to reach a huge audience with your app. In order to be as successful as possible on Android, your app needs to adapt to various device configurations. Some of the important variations that you should consider include different languages, screen sizes, and versions of the Android platform.This class teaches you how to use basic platform features that leverage alternative resources and other features so your app can provide an optimized user experience on a variety of Android-compatible devices, using a single application package (APK).LessonsSupporting Different LanguagesLearn how to support multiple languages with alternative string resources.Supporting Different ScreensLearn how to optimize the user experience for different screen sizes and densities.Supporting Different Platform VersionsLearn how to use APIs available in new versions of Android while continuing to support older versions of Android.Supporting Different LanguagesIt’s always a good practice to extract UI strings from your app code and keep them in an external file. Android makes this easy with a resources directory in each Android project.If you created your project using the Android SDK Tools (read Creating an Android Project), the tools create a res/ directory in the top level of the project. Within this res/ directory are subdirectories for various resource types. There are also a few default files such as res/values/strings.xml, which holds your string values.Create Locale Directories and String FilesTo add support for more languages, create additional values directories inside res/ that include a hyphen and the ISO language code at the end of the directory name. For example, values-es/ is the directory containing simple resources for the Locales with the language code "es". Android loads the appropriate resources according to the locale settings of the device at run time. For more information, see Providing Alternative Resources.Once you’ve decided on the languages you will support, create the resource subdirectories and string resource files. For example:MyProject/ res/ values/ strings.xml values-es/ strings.xml values-fr/ strings.xml Add the string values for each locale into the appropriate file.At runtime, the Android system uses the appropriate set of string resources based on the locale currently set for the user's device.For example, the following are some different string resource files for different languages.English (default locale), /values/strings.xml:<?xml version="1.0" encoding="utf-8"?><resources> <string name="title">My Application</string> <string name="hello_world">Hello World!</string></resources> Spanish, /values-es/strings.xml:<?xml version="1.0" encoding="utf-8"?><resources> <string name="title">Mi Aplicación</string> <string name="hello_world">Hola Mundo!</string></resources> French, /values-fr/strings.xml:<?xml version="1.0" encoding="utf-8"?><resources> <string name="title">Mon Application</string> <string name="hello_world">Bonjour le monde !</string></resources> Note: You can use the locale qualifier (or any configuration qualifer) on any resource type, such as if you want to provide localized versions of your bitmap drawable. For more information, see Localization.Use the String ResourcesYou can reference your string resources in your source code and other XML files using the resource name defined by the <string> element's nameattribute.In your source code, you can refer to a string resource with the syntax R.string.<string_name>. There are a variety of methods that accept a string resource this way.For example:// Get a string resource from your app's ResourcesString hello = getResources().getString(R.string.hello_world);// Or supply a string resource to a method that requires a stringTextView textView = new TextView(this);textView.setText(R.string.hello_world); In other XML files, you can refer to a string resource with the syntax @string/<string_name> whenever the XML attribute accepts a string value.For example:<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> Supporting Different ScreensAndroid categorizes device screens using two general properties: size and density. You should expect that your app will be installed on devices with screens that range in both size and density. As such, you should include some alternative resources that optimize your app’s appearance for different screen sizes and densities.There are four generalized sizes: small, normal, large, xlargeAnd four generalized densities: low (ldpi), medium (mdpi), high (hdpi), extra high (xhdpi)To declare different layouts and bitmaps you'd like to use for different screens, you must place these alternative resources in separate directories, similar to how you do for different language strings.Also be aware that the screens orientation (landscape or portrait) is considered a variation of screen size, so many apps should revise the layout to optimize the user experience in each orientation.Create Different LayoutsTo optimize your user experience on different screen sizes, you should create a unique layout XML file for each screen size you want to support. Each layout should be saved into the appropriate resources directory, named with a -<screen_size> suffix. For example, a unique layout for large screens should be saved under res/layout-large/.Note: Android automatically scales your layout in order to properly fit the screen. Thus, your layouts for different screen sizes don't need to worry about the absolute size of UI elements but instead focus on the layout structure that affects the user experience (such as the size or position of important views relative to sibling views).For example, this project includes a default layout and an alternative layout for large screens:MyProject/ res/ layout/ main.xml layout-large/ main.xml The file names must be exactly the same, but their contents are different in order to provide an optimized UI for the corresponding screen size.Simply reference the layout file in your app as usual:@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);} The system loads the layout file from the appropriate layout directory based on screen size of the device on which your app is running. More information about how Android selects the appropriate resource is available in the Providing Resources guide.As another example, here's a project with an alternative layout for landscape orientation:MyProject/ res/ layout/ main.xml layout-land/ main.xml By default, the layout/main.xml file is used for portrait orientation.If you want to provide a special layout for landscape, including while on large screens, then you need to use both the large and land qualifier:MyProject/ res/ layout/ # default (portrait) main.xml layout-land/ # landscape main.xml layout-large/ # large (portrait) main.xml layout-large-land/ # large landscape main.xml Note: Android 3.2 and above supports an advanced method of defining screen sizes that allows you to specify resources for screen sizes based on the minimum width and height in terms of density-independent pixels. This lesson does not cover this new technique. For more information, read Designing for Multiple Screens.Create Different BitmapsYou should always provide bitmap resources that are properly scaled to each of the generalized density buckets: low, medium, high and extra-high density. This helps you achieve good graphical quality and performance on all screen densities.To generate these images, you should start with your raw resource in vector format and generate the images for each density using the following size scale:xhdpi: 2.0hdpi: 1.5mdpi: 1.0 (baseline)ldpi: 0.75This means that if you generate a 200x200 image for xhdpi devices, you should generate the same resource in 150x150 for hdpi, 100x100 for mdpi, and 75x75 for ldpi devices.Then, place the files in the appropriate drawable resource directory:MyProject/ res/ drawable-xhdpi/ awesomeimage.png drawable-hdpi/ awesomeimage.png drawable-mdpi/ awesomeimage.png drawable-ldpi/ awesomeimage.png Any time you reference @drawable/awesomeimage, the system selects the appropriate bitmap based on the screen's density.Note: Low-density (ldpi) resources aren’t always necessary. When you provide hdpi assets, the system scales them down by one half to properly fit ldpi screens.For more tips and guidelines about creating icon assets for your app, see the Iconography design guide.Supporting Different Platform VersionsWhile the latest versions of Android often provide great APIs for your app, you should continue to support older versions of Android until more devices get updated. This lesson shows you how to take advantage of the latest APIs while continuing to support older versions as well.The dashboard for Platform Versions is updated regularly to show the distribution of active devices running each version of Android, based on the number of devices that visit the Google Play Store. Generally, it’s a good practice to support about 90% of the active devices, while targeting your app to the latest version.Tip: In order to provide the best features and functionality across several Android versions, you should use the Android Support Library in your app, which allows you to use several recent platform APIs on older versions.Specify Minimum and Target API LevelsThe AndroidManifest.xml file describes details about your app and identifies which versions of Android it supports. Specifically, the minSdkVersion and targetSdkVersion attributes for the <uses-sdk> element identify the lowest API level with which your app is compatible and the highest API level against which you’ve designed and tested your app.For example:<manifest xmlns:android="http://schemas.android.com/apk/res/android" ... > <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15" /> ...</manifest> As new versions of Android are released, some style and behaviors may change. To allow your app to take advantage of these changes and ensure that your app fits the style of each user's device, you should set the targetSdkVersion value to match the latest Android version available.Check System Version at RuntimeAndroid provides a unique code for each platform version in the Build constants class. Use these codes within your app to build conditions that ensure the code that depends on higher API levels is executed only when those APIs are available on the system.private void setUpActionBar() { // Make sure we're running on Honeycomb or higher to use ActionBar APIs if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); }} Note: When parsing XML resources, Android ignores XML attributes that aren’t supported by the current device. So you can safely use XML attributes that are only supported by newer versions without worrying about older versions breaking when they encounter that code. For example, if you set the targetSdkVersion="11", your app includes the ActionBar by default on Android 3.0 and higher. To then add menu items to the action bar, you need to set android:showAsAction="ifRoom" in your menu resource XML. It's safe to do this in a cross-version XML file, because the older versions of Android simply ignore the showAsAction attribute (that is, you do not need a separate version in res/menu-v11/).Use Platform Styles and ThemesAndroid provides user experience themes that give apps the look and feel of the underlying operating system. These themes can be applied to your app within the manifest file. By using these built in styles and themes, your app will naturally follow the latest look and feel of Android with each new release.To make your activity look like a dialog box:<activity android:theme="@android:style/Theme.Dialog"> To make your activity have a transparent background:<activity android:theme="@android:style/Theme.Translucent"> To apply your own custom theme defined in /res/values/styles.xml:<activity android:theme="@style/CustomTheme"> To apply a theme to your entire app (all activities), add the android:theme attribute to the <application> element:<application android:theme="@style/CustomTheme"> For more about creating and using themes, read the Styles and Themes guide.Managing the Activity LifecycleAs a user navigates through, out of, and back to your app, the Activity instances in your app transition between different states in their lifecycle. For instance, when your activity starts for the first time, it comes to the foreground of the system and receives user focus. During this process, the Android system calls a series of lifecycle methods on the activity in which you set up the user interface and other components. If the user performs an action that starts another activity or switches to another app, the system calls another set of lifecycle methods on your activity as it moves into the background (where the activity is no longer visible, but the instance and its state remains intact).Within the lifecycle callback methods, you can declare how your activity behaves when the user leaves and re-enters the activity. For example, if you're building a streaming video player, you might pause the video and terminate the network connection when the user switches to another app. When the user returns, you can reconnect to the network and allow the user to resume the video from the same spot.This class explains important lifecycle callback methods that each Activity instance receives and how you can use them so your activity does what the user expects and does not consume system resources when your activity doesn't need them.LessonsStarting an ActivityLearn the basics about the activity lifecycle, how the user can launch your app, and how to perform basic activity creation.Pausing and Resuming an ActivityLearn what happens when your activity is paused (partially obscured) and resumed and what you should do during these state changes.Stopping and Restarting an ActivityLearn what happens when the user completely leaves your activity and returns to it.Recreating an ActivityLearn what happens when your activity is destroyed and how you can rebuild the activity state when necessary.Starting an ActivityUnlike other programming paradigms in which apps are launched with a main() method, the Android system initiates code in an Activity instance by invoking specific callback methods that correspond to specific stages of its lifecycle. There is a sequence of callback methods that start up an activity and a sequence of callback methods that tear down an activity.This lesson provides an overview of the most important lifecycle methods and shows you how to handle the first lifecycle callback that creates a new instance of your activity.Understand the Lifecycle CallbacksDuring the life of an activity, the system calls a core set of lifecycle methods in a sequence similar to a step pyramid. That is, each stage of the activity lifecycle is a separate step on the pyramid. As the system creates a new activity instance, each callback method moves the activity state one step toward the top. The top of the pyramid is the point at which the activity is running in the foreground and the user can interact with it.As the user begins to leave the activity, the system calls other methods that move the activity state back down the pyramid in order to dismantle the activity. In some cases, the activity will move only part way down the pyramid and wait (such as when the user switches to another app), from which point the activity can move back to the top (if the user returns to the activity) and resume where the user left off.Figure 1. A simplified illustration of the Activity lifecycle, expressed as a step pyramid. This shows how, for every callback used to take the activity a step toward the Resumed state at the top, there's a callback method that takes the activity a step down. The activity can also return to the resumed state from the Paused and Stopped state.Depending on the complexity of your activity, you probably don't need to implement all the lifecycle methods. However, it's important that you understand each one and implement those that ensure your app behaves the way users expect. Implementing your activity lifecycle methods properly ensures your app behaves well in several ways, including that it:Does not crash if the user receives a phone call or switches to another app while using your app.Does not consume valuable system resources when the user is not actively using it.Does not lose the user's progress if they leave your app and return to it at a later time.Does not crash or lose the user's progress when the screen rotates between landscape and portrait orientation.As you'll learn in the following lessons, there are several situations in which an activity transitions between different states that are illustrated in figure 1. However, only three of these states can be static. That is, the activity can exist in one of only three states for an extended period of time:ResumedIn this state, the activity is in the foreground and the user can interact with it. (Also sometimes referred to as the "running" state.)PausedIn this state, the activity is partially obscured by another activity—the other activity that's in the foreground is semi-transparent or doesn't cover the entire screen. The paused activity does not receive user input and cannot execute any code.StoppedIn this state, the activity is completely hidden and not visible to the user; it is considered to be in the background. While stopped, the activity instance and all its state information such as member variables is retained, but it cannot execute any code.The other states (Created and Started) are transient and the system quickly moves from them to the next state by calling the next lifecycle callback method. That is, after the system calls onCreate(), it quickly calls onStart(), which is quickly followed by onResume().That's it for the basic activity lifecycle. Now you'll start learning about some of the specific lifecycle behaviors.Specify Your App's Launcher ActivityWhen the user selects your app icon from the Home screen, the system calls the onCreate() method for the Activity in your app that you've declared to be the "launcher" (or "main") activity. This is the activity that serves as the main entry point to your app's user interface.You can define which activity to use as the main activity in the Android manifest file, AndroidManifest.xml, which is at the root of your project directory.The main activity for your app must be declared in the manifest with an <intent-filter> that includes the MAIN action and LAUNCHER category. For example:<activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter></activity> Note: When you create a new Android project with the Android SDK tools, the default project files include an Activity class that's declared in the manifest with this filter.If either the MAIN action or LAUNCHER category are not declared for one of your activities, then your app icon will not appear in the Home screen's list of apps.Create a New InstanceMost apps include several different activities that allow the user to perform different actions. Whether an activity is the main activity that's created when the user clicks your app icon or a different activity that your app starts in response to a user action, the system creates every new instance of Activityby calling its onCreate() method.You must implement the onCreate() method to perform basic application startup logic that should happen only once for the entire life of the activity. For example, your implementation of onCreate() should define the user interface and possibly instantiate some class-scope variables.For example, the following example of the onCreate() method shows some code that performs some fundamental setup for the activity, such as declaring the user interface (defined in an XML layout file), defining member variables, and configuring some of the UI.TextView mTextView; // Member variable for text view in the layout@Overridepublic void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set the user interface layout for this Activity // The layout file is defined in the project res/layout/main_activity.xml file setContentView(R.layout.main_activity); // Initialize member TextView so we can manipulate it later mTextView = (TextView) findViewById(R.id.text_message); // Make sure we're running on Honeycomb or higher to use ActionBar APIs if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { // For the main activity, make sure the app icon in the action bar // does not behave as a button ActionBar actionBar = getActionBar(); actionBar.setHomeButtonEnabled(false); }} Caution: Using the SDK_INT to prevent older systems from executing new APIs works in this way on Android 2.0 (API level 5) and higher only. Older versions will encounter a runtime exception.Once the onCreate() finishes execution, the system calls the onStart() and onResume() methods in quick succession. Your activity never resides in the Created or Started states. Technically, the activity becomes visible to the user when onStart() is called, but onResume() quickly follows and the activity remains in the Resumed state until something occurs to change that, such as when a phone call is received, the user navigates to another activity, or the device screen turns off.In the other lessons that follow, you'll see how the other start up methods, onStart() and onResume(), are useful during your activity's lifecycle when used to resume the activity from the Paused or Stopped states.Note: The onCreate() method includes a parameter called savedInstanceState that's discussed in the latter lesson about Recreating an Activity.Figure 2. Another illustration of the activity lifecycle structure with an emphasis on the three main callbacks that the system calls in sequence when creating a new instance of the activity: onCreate(), onStart(), and onResume(). Once this sequence of callbacks complete, the activity reaches the Resumed state where users can interact with the activity until they switch to a different activity.Destroy the ActivityWhile the activity's first lifecycle callback is onCreate(), its very last callback is onDestroy(). The system calls this method on your activity as the final signal that your activity instance is being completely removed from the system memory.Most apps don't need to implement this method because local class references are destroyed with the activity and your activity should perform most cleanup during onPause() and onStop(). However, if your activity includes background threads that you created during onCreate() or other long-running resources that could potentially leak memory if not properly closed, you should kill them during onDestroy().@Overridepublic void onDestroy() { super.onDestroy(); // Always call the superclass // Stop method tracing that the activity started during onCreate() android.os.Debug.stopMethodTracing();} Note: The system calls onDestroy() after it has already called onPause() and onStop() in all situations except one: when you call finish() from within the onCreate() method. In some cases, such as when your activity operates as a temporary decision maker to launch another activity, you might call finish() from within onCreate() to destroy the activity. In this case, the system immediately calls onDestroy() without calling any of the other lifecycle methods.Pausing and Resuming an ActivityDuring normal app use, the app sometimes loses focus, causing the activity to pause. For example, when apps run in multi-window mode, only one of the apps has the focus at any time; the system pauses all other apps. Similarly, when a semi-transparent activity opens (such as one in the style of a dialog), the previous activity pauses. As long as the activity is still partially visible but currently not the activity in focus, it remains paused.However, once the activity is fully-obstructed and not visible, it stops (which is discussed in the next lesson).As your activity enters the paused state, the system calls the onPause() method on your Activity, which allows you to stop ongoing actions that should not continue while paused or persist any information that should be permanently saved in case the user continues to leave your app. If the user returns to your activity from the paused state, the system resumes it and calls the onResume() method.Note: When the system calls your activity's onPause() method, the system may be signaling that the activity will be paused for a moment and the user may return focus to your activity, or that the app is running in multi-window mode. However, this method call may also be the first indication that the user is leaving your activity.Figure 1. When a semi-transparent activity obscures your activity, the system calls onPause() and the activity waits in the Paused state (1). If the user returns to the activity while it's still paused, the system calls onResume() (2).Pause Your ActivityWhen the system calls onPause() for your activity, it technically means your activity is still partially visible, but most often is an indication that the user is leaving the activity and it will soon enter the Stopped state. You should usually use the onPause() callback to:Check if the activity is visible; if it is not, stop animations or other ongoing actions that could consume CPU. Remember, beginning with Android 7.0, a paused app might be running in multi-window mode. In this case, you would not want to stop animations or video playback.Commit unsaved changes, but only if users expect such changes to be permanently saved when they leave (such as a draft email).Release system resources, such as broadcast receivers, handles to sensors (like GPS), or any resources that may affect battery life while your activity is paused and the user does not need them.For example, if your application uses the Camera, the onPause() method is a good place to release it.@Overridepublic void onPause() { super.onPause(); // Always call the superclass method first // Release the Camera because we don't need it when paused // and other activities might need to use it. if (mCamera != null) { mCamera.release(); mCamera = null; }} Generally, you should not use onPause() to store user changes (such as personal information entered into a form) to permanent storage. The only time you should persist user changes to permanent storage within onPause() is when you're certain users expect the changes to be auto-saved (such as when drafting an email). However, you should avoid performing CPU-intensive work during onPause(), such as writing to a database, because it can slow the visible transition to the next activity (you should instead perform heavy-load shutdown operations during onStop()).You should keep the amount of operations done in the onPause() method relatively simple in order to allow for a speedy transition to the user's next destination if your activity is actually being stopped.Note: When your activity is paused, the Activity instance is kept resident in memory and is recalled when the activity resumes. You don’t need to re-initialize components that were created during any of the callback methods leading up to the Resumed state.Resume Your ActivityWhen the user resumes your activity from the Paused state, the system calls the onResume() method.Be aware that the system calls this method every time your activity comes into the foreground, including when it's created for the first time. As such, you should implement onResume() to initialize components that you release during onPause() and perform any other initializations that must occur each time the activity enters the Resumed state (such as begin animations and initialize components only used while the activity has user focus).The following example of onResume() is the counterpart to the onPause() example above, so it initializes the camera that's released when the activity pauses.@Overridepublic void onResume() { super.onResume(); // Always call the superclass method first // Get the Camera instance as the activity achieves full user focus if (mCamera == null) { initializeCamera(); // Local method to handle camera init }} Stopping and Restarting an ActivityProperly stopping and restarting your activity is an important process in the activity lifecycle that ensures your users perceive that your app is always alive and doesn't lose their progress. There are a few of key scenarios in which your activity is stopped and restarted:The user opens the Recent Apps window and switches from your app to another app. The activity in your app that's currently in the foreground is stopped. If the user returns to your app from the Home screen launcher icon or the Recent Apps window, the activity restarts.The user performs an action in your app that starts a new activity. The current activity is stopped when the second activity is created. If the user then presses the Back button, the first activity is restarted.The user receives a phone call while using your app on his or her phone.The Activity class provides two lifecycle methods, onStop() and onRestart(), which allow you to specifically handle how your activity handles being stopped and restarted. Unlike the paused state, which identifies a partial UI obstruction, the stopped state guarantees that the UI is no longer visible and the user's focus is in a separate activity (or an entirely separate app).Note: Because the system retains your Activity instance in system memory when it is stopped, it's possible that you don't need to implement theonStop() and onRestart() (or even onStart() methods at all. For most activities that are relatively simple, the activity will stop and restart just fine and you might only need to use onPause() to pause ongoing actions and disconnect from system resources.Figure 1. When the user leaves your activity, the system calls onStop() to stop the activity (1). If the user returns while the activity is stopped, the system calls onRestart() (2), quickly followed by onStart() (3) and onResume() (4). Notice that no matter what scenario causes the activity to stop, the system always calls onPause() before calling onStop().Stop Your ActivityWhen your activity receives a call to the onStop() method, it's no longer visible and should release almost all resources that aren't needed while the user is not using it. Once your activity is stopped, the system might destroy the instance if it needs to recover system memory. In extreme cases, the system might simply kill your app process without calling the activity's final onDestroy() callback, so it's important you use onStop() to release resources that might leak memory.Although the onPause() method is called before onStop(), you should use onStop() to perform larger, more CPU intensive shut-down operations, such as writing information to a database.For example, here's an implementation of onStop() that saves the contents of a draft note to persistent storage:@Overrideprotected void onStop() { super.onStop(); // Always call the superclass method first // Save the note's current draft, because the activity is stopping // and we want to be sure the current note progress isn't lost. ContentValues values = new ContentValues(); values.put(NotePad.Notes.COLUMN_NAME_NOTE, getCurrentNoteText()); values.put(NotePad.Notes.COLUMN_NAME_TITLE, getCurrentNoteTitle()); getContentResolver().update( mUri, // The URI for the note to update. values, // The map of column names and new values to apply to them. null, // No SELECT criteria are used. null // No WHERE columns are used. );} When your activity is stopped, the Activity object is kept resident in memory and is recalled when the activity resumes. You don’t need to re-initialize components that were created during any of the callback methods leading up to the Resumed state. The system also keeps track of the current state for each View in the layout, so if the user entered text into an EditText widget, that content is retained so you don't need to save and restore it.Note: Even if the system destroys your activity while it's stopped, it still retains the state of the View objects (such as text in an EditText) in a Bundle(a blob of key-value pairs) and restores them if the user navigates back to the same instance of the activity (the next lesson talks more about using a Bundle to save other state data in case your activity is destroyed and recreated).Start/Restart Your ActivityWhen your activity comes back to the foreground from the stopped state, it receives a call to onRestart(). The system also calls the onStart() method, which happens every time your activity becomes visible (whether being restarted or created for the first time). The onRestart() method, however, is called only when the activity resumes from the stopped state, so you can use it to perform special restoration work that might be necessary only if the activity was previously stopped, but not destroyed.It's uncommon that an app needs to use onRestart() to restore the activity's state, so there aren't any guidelines for this method that apply to the general population of apps. However, because your onStop() method should essentially clean up all your activity's resources, you'll need to re-instantiate them when the activity restarts. Yet, you also need to instantiate them when your activity is created for the first time (when there's no existing instance of the activity). For this reason, you should usually use the onStart() callback method as the counterpart to the onStop() method, because the system calls onStart() both when it creates your activity and when it restarts the activity from the stopped state.For example, because the user might have been away from your app for a long time before coming back it, the onStart() method is a good place to verify that required system features are enabled:@Overrideprotected void onStart() { super.onStart(); // Always call the superclass method first // The activity is either being restarted or started for the first time // so this is where we should make sure that GPS is enabled LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); boolean gpsEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); if (!gpsEnabled) { // Create a dialog here that requests the user to enable GPS, and use an intent // with the android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS action // to take the user to the Settings screen to enable GPS when they click "OK" }}@Overrideprotected void onRestart() { super.onRestart(); // Always call the superclass method first // Activity being restarted from stopped state} When the system destroys your activity, it calls the onDestroy() method for your Activity. Because you should generally have released most of your resources with onStop(), by the time you receive a call to onDestroy(), there's not much that most apps need to do. This method is your last chance to clean out resources that could lead to a memory leak, so you should be sure that additional threads are destroyed and other long-running actions like method tracing are also stopped.Recreating an ActivityThere are a few scenarios in which your activity is destroyed due to normal app behavior, such as when the user presses the Back button or your activity signals its own destruction by calling finish(). The system may also destroy your activity if it's currently stopped and hasn't been used in a long time or the foreground activity requires more resources so the system must shut down background processes to recover memory.When your activity is destroyed because the user presses Back or the activity finishes itself, the system's concept of that Activity instance is gone forever because the behavior indicates the activity is no longer needed. However, if the system destroys the activity due to system constraints (rather than normal app behavior), then although the actual Activity instance is gone, the system remembers that it existed such that if the user navigates back to it, the system creates a new instance of the activity using a set of saved data that describes the state of the activity when it was destroyed. The saved data that the system uses to restore the previous state is called the "instance state" and is a collection of key-value pairs stored in a Bundle object.Caution: Your activity will be destroyed and recreated each time the user rotates the screen. When the screen changes orientation, the system destroys and recreates the foreground activity because the screen configuration has changed and your activity might need to load alternative resources (such as the layout).By default, the system uses the Bundle instance state to save information about each View object in your activity layout (such as the text value entered into an EditText object). So, if your activity instance is destroyed and recreated, the state of the layout is restored to its previous state with no code required by you. However, your activity might have more state information that you'd like to restore, such as member variables that track the user's progress in the activity.Note: In order for the Android system to restore the state of the views in your activity, each view must have a unique ID, supplied by the android:idattribute.To save additional data about the activity state, you must override the onSaveInstanceState() callback method. The system calls this method when the user is leaving your activity and passes it the Bundle object that will be saved in the event that your activity is destroyed unexpectedly. If the system must recreate the activity instance later, it passes the same Bundle object to both the onRestoreInstanceState() and onCreate() methods.Figure 2. As the system begins to stop your activity, it calls onSaveInstanceState() (1) so you can specify additional state data you'd like to save in case the Activity instance must be recreated. If the activity is destroyed and the same instance must be recreated, the system passes the state data defined at (1) to both the onCreate() method (2) and the onRestoreInstanceState() method (3).Save Your Activity StateAs your activity begins to stop, the system calls onSaveInstanceState() so your activity can save state information with a collection of key-value pairs. The default implementation of this method saves information about the state of the activity's view hierarchy, such as the text in an EditText widget or the scroll position of a ListView.To save additional state information for your activity, you must implement onSaveInstanceState() and add key-value pairs to the Bundle object. For example:static final String STATE_SCORE = "playerScore";static final String STATE_LEVEL = "playerLevel";...@Overridepublic void onSaveInstanceState(Bundle savedInstanceState) { // Save the user's current game state savedInstanceState.putInt(STATE_SCORE, mCurrentScore); savedInstanceState.putInt(STATE_LEVEL, mCurrentLevel); // Always call the superclass so it can save the view hierarchy state super.onSaveInstanceState(savedInstanceState);} Caution: Always call the superclass implementation of onSaveInstanceState() so the default implementation can save the state of the view hierarchy.Restore Your Activity StateWhen your activity is recreated after it was previously destroyed, you can recover your saved state from the Bundle that the system passes your activity. Both the onCreate() and onRestoreInstanceState() callback methods receive the same Bundle that contains the instance state information.Because the onCreate() method is called whether the system is creating a new instance of your activity or recreating a previous one, you must check whether the state Bundle is null before you attempt to read it. If it is null, then the system is creating a new instance of the activity, instead of restoring a previous one that was destroyed.For example, here's how you can restore some state data in onCreate():@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Always call the superclass first // Check whether we're recreating a previously destroyed instance if (savedInstanceState != null) { // Restore value of members from saved state mCurrentScore = savedInstanceState.getInt(STATE_SCORE); mCurrentLevel = savedInstanceState.getInt(STATE_LEVEL); } else { // Probably initialize members with default values for a new instance } ...} Instead of restoring the state during onCreate() you may choose to implement onRestoreInstanceState(), which the system calls after the onStart()method. The system calls onRestoreInstanceState() only if there is a saved state to restore, so you do not need to check whether the Bundle is null:public void onRestoreInstanceState(Bundle savedInstanceState) { // Always call the superclass so it can restore the view hierarchy super.onRestoreInstanceState(savedInstanceState); // Restore state members from saved instance mCurrentScore = savedInstanceState.getInt(STATE_SCORE); mCurrentLevel = savedInstanceState.getInt(STATE_LEVEL);} Caution: Always call the superclass implementation of onRestoreInstanceState() so the default implementation can restore the state of the view hierarchy.To learn more about recreating your activity due to a restart event at runtime (such as when the screen rotates), read Handling Runtime Changes.Building a Dynamic UI with FragmentsTo create a dynamic and multi-pane user interface on Android, you need to encapsulate UI components and activity behaviors into modules that you can swap into and out of your activities. You can create these modules with the Fragment class, which behaves somewhat like a nested activity that can define its own layout and manage its own lifecycle.When a fragment specifies its own layout, it can be configured in different combinations with other fragments inside an activity to modify your layout configuration for different screen sizes (a small screen might show one fragment at a time, but a large screen can show two or more).This class shows you how to create a dynamic user experience with fragments and optimize your app's user experience for devices with different screen sizes, all while continuing to support devices running versions as old as Android 1.6.LessonsCreating a FragmentLearn how to build a fragment and implement basic behaviors within its callback methods.Building a Flexible UILearn how to build your app with layouts that provide different fragment configurations for different screens.Communicating with Other FragmentsLearn how to set up communication paths from a fragment to the activity and other fragments.Creating a FragmentWelcome to Training for Android developers. Here you'll find training classes that describe how to accomplish a specific task with code samples you can re-use in your app. Classes are organized into several groups you can see at the top-level of the left navigation.The first training guides below teach you the essentials for Android app development. If you're a new Android app developer, you should complete each of these classes in order.Various online video courses are also available if you'd prefer an interactive video experience.
- Home >
- Catalog >
- Miscellaneous >
- Evaluation Form >
- Peer Evaluation >
- peer evaluation form middle school >
- Setting Component Parameters In The Xml Le