Developing Android on Android

Similar documents
Pragmatic Guide to Sass

Programming Clojure. Extracted from: Second Edition. The Pragmatic Bookshelf

Distributed and Parallel Computing with Ruby

Node.js the Right Way

Practical Programming, 2nd Edition

Java by Comparison. Extracted from: Become a Java Craftsman in 70 Examples. The Pragmatic Bookshelf

Practical Programming, Third Edition

Automate with Grunt. Extracted from: The Build Tool for JavaScript. The Pragmatic Bookshelf

Pragmatic Guide to Git

Dart for Hipsters. Extracted from: The Pragmatic Bookshelf

Agile Web Development with Rails 5

Agile Web Development with Rails 5.1

Complex Network Analysis in Python

Java By Comparison. Extracted from: Become a Java Craftsman in 70 Examples. The Pragmatic Bookshelf

Modern Vim. Extracted from: Craft Your Development Environment with Vim 8 and Neovim. The Pragmatic Bookshelf

Reactive Programming with RxJS 5

Node.js 8 the Right Way

Build ios Games with Sprite Kit

Learn Functional Programming with Elixir

Practical Vim, Second Edition

Reactive Programming with RxJS

SQL Antipatterns. Extracted from: Avoiding the Pitfalls of Database Programming. The Pragmatic Bookshelf

Build Database Apps in Elixir for Scalability and Performance

Copyright 2009 The Pragmatic Programmers, LLC.

Practical Vim, Second Edition

Deploying with JRuby 9k

Agile Web Development with Rails 5

Build Safe and Maintainable Front-End Applications

Beginning Mac Programming

Pragmatic Guide to Sass 3

Web Design for Developers A Programmer s Guide to Design Tools and Techniques

Programming Clojure, Third Edition

Cocoa Programming A Quick-Start Guide for Developers

Effective Testing with RSpec 3

iphone SDK Development

ios 9 SDK Development

ios 8 SDK Development

Programming Google Glass, Second Edition

Build Reactive Websites with RxJS

Design It! Extracted from: From Programmer to Software Architect. The Pragmatic Bookshelf

Programming Kotlin. Extracted from: Creating Elegant, Expressive, and Performant JVM and Android Applications. The Pragmatic Bookshelf

Mastering Clojure Macros

Web Design for Developers A Programmer s Guide to Design Tools and Techniques

ios 8 SDK Development

Release It! Second Edition

Getting Started with Processing by Casey Reas and Ben Fry

Mac Kung Fu. Extracted from: Over 400 Tips, Tricks, Hints, and Hacks for Apple OS X. The Pragmatic Bookshelf

Docker for Rails Developers

Complex Network Analysis in Python

Python Companion to Data Science

Real World Kanban Do Less Accomplish More With Lean Thinking

Things You Should Know

Worldox Integration with Canon imageformula DR-C225 Scanner. Version 1.0

Quick Start Guide. English Android 5.1.1, Lollipop

How to Make a Book Interior File

The ThoughtWorks Anthology 2

Just Do This: Back Up!

Installation Guide - Windows

Version June 2016

JAZZ HARMONY User Manual

Functional Programming in Java

Word 2007/10/13 1 Introduction

INTERNET BASICS. GETTING STARTED PAGE 02 Prerequisites What You Will Learn

Everyday Scripting With Ruby: For Teams, Testers, And You By Brian Marick READ ONLINE

Getting Started with everydayhero

Chromebooks boot in seconds, and resume instantly. When you turn on a Chromebook and sign in, you can get online fast.

crm-now/ps Outlook Plugin Manual Version 5.0


Installing and Running the Google App Engine On a Macintosh System

Act! Marketing Automation

Your Own Virtual Playground. CS 1585 :: Doug McGeehan

ADOBE DRIVE 4.2 USER GUIDE

Interface-Oriented Design

A new clients guide to: Activating a new Studio 3.0 Account Creating a Photo Album Starting a Project Submitting a Project Publishing Tips

All-In-One E-Sticker Installation and User Guide (Mac Versions)

OneNote vs. Evernote: A personal take on two great note-taking apps

Welcome Installation Authorization The T-Pain Engine: Quick Start Interface Sound Check... 10

Online Banking Experience Guide

Seven Databases In Seven Weeks 2e

Search Engine Optimization and Placement:

EDGE, MICROSOFT S BROWSER

Thunderbolt 3 (USB-C) Charge MacBook Pro and connect external storage or an external display

Disclaimer. The names of actual companies and products mentioned herein may be the trademarks of their respective owners TOPS Software

ibooks Author: An Instructional Guide for Educators

Version March 7, 2012

crm-now/ps Webforms Webdesigner Manual Second Edition

INTRODUCTION TO CLOUD STORAGE

BIG BOOK OF. Windows Hacks. Preston Gralla. Tips & Tools for unlocking the power of your Windows PC

Running the Vortex Demo

Chapter 2: Android Device Basics

PART ONE Setting up your new site Begin by signing in to the Google Sites page by directing your browser to

Organizing Screens with Mission Control

SmartTheme Manual 1 Last update: 2017/07/29 OptimizePress

Marketing Insider... 3 Section 1 Your List... 4 AWeber Basics... 4 Create your Account... 5 Exploring AWeber s Members Area...

What's New in QuarkXPress 10.1

Scorebook Navigator. Stage 1 Independent Review User Manual Version

FREEWAY SIGNAGE series 9. user manual

Testing your TLS version

Mac Brightness Control

RESOURCES GUIDE, VOLUME ONE Copyright, Disclaimer, and Legal Notices

Transcription:

Extracted from: Developing Android on Android Automate Your Device with Scripts and Tasks This PDF file contains pages extracted from Developing Android on Android, published by the Pragmatic Bookshelf. For more information or to purchase a paperback or PDF copy, please visit http://www.pragprog.com. Note: This extract contains some colored text (particularly in code listing). This is available only in online versions of the books. The printed versions are black and white. Pagination might vary between the online and printed versions; the content is otherwise identical. Copyright 2013 The Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. The Pragmatic Bookshelf Dallas, Texas Raleigh, North Carolina

Developing Android on Android Automate Your Device with Scripts and Tasks Mike Riley The Pragmatic Bookshelf Dallas, Texas Raleigh, North Carolina

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf, PragProg and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://pragprog.com. The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. The team that produced this book includes: Jacquelyn Carter (editor) Potomac Indexing, LLC (indexer) Molly McBeath (copyeditor) David J Kelly (typesetter) Janet Furlow (producer) Juliet Benda (rights) Ellie Callahan (support) Copyright 2013 The Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN-13: 978-1-937785-54-3 Encoded using the finest acid-free high-entropy binary digits. Book version: P1.0 November 2013

This book is dedicated to my three favorite M s: Marinette, Marielle, and Mitchell.

2.4 Home Screen Customization Part of the fun of having the level of customization that Android allows is to re-create familiar computing metaphors. We re going to do just that with a quick walk-through of applying themes, widgets, and floaters to emulate the look and feel of an alternative mobile OS platform. The other will be the recreation of a prevalent desktop operating system. Let s begin by emulating Microsoft Windows Phone. Emulating the Windows Phone Look Our first emulated home screen will be that of a Microsoft Windows Phone. Like many themes available for free download from Google Play, the GO Launcher EX Windows Phone 7 pays homage to the clean interface that the Windows Phone user interface offers. 18 While this theme doesn t completely redefine your Android s phone behavior to emulate a Windows Phone, it does provide a way to dress up the background and icons to give the appearance of a Windows Phone inspired home screen. If you re using the GO Launcher EX as your launcher of choice, installing this theme is a breeze. Simply download it from Google Play and select it from the list of themes in the Go Launcher preferences screen. On the other hand, if, like me, you ve opted to use TeslaCoil s Nova Launcher Prime as your preferred Android launcher replacement, there are a few more steps you need to take to incorporate the graphical elements contained in this Windows Phone theme. Configuring Nova Launcher Prime After the theme has been downloaded, open Nova Launcher Prime s settings. Before you replace anything or alter your existing launcher settings, make a backup of your existing Nova Launcher Prime configuration by selecting the Backup and Import option. This will display the Backup and Import screen, as shown in Figure 10, Nova Launcher Prime's Backup and Import screen, on page 6. Select the Backup label and name your backup or accept the default name of a date stamp for your backup file. Now if something unexpected should happen during the import of a new theme or you don t like the way the new theme looks, you can easily restore your current launcher layout and behavior. With a backup made, select the Import label from the Backup and Import screen. Nova Launcher Prime will remind you that your existing launcher 18. https://play.google.com/store/apps/details?id=com.gau.go.launcherex.theme.wpsevenstyle Click HERE to purchase this book now. discuss

6 settings will be replaced by the theme being imported. You know, the one you were supposed to make a backup of, right? Since you do have a backup of your current configuration, return to the Nova Settings screen and select the Look and Feel option. From there, choose the Icon Theme option. The list of the various themes installed on your Android device will be displayed, as shown in Figure 11, A selection of installed icon themes. Figure 10 Nova Launcher Prime s Backup and Import screen Figure 11 A selection of installed icon themes Now we re going to use Nova Launcher Prime s ability to import icons from other launcher application themes. In this case, we will borrow some Windows Phone like icons from a Windows 7 GO Launcher theme. Choose the GO Launcher EX Windows Phone 7 theme from the list. This will replace icons for standard Android programs such as Browser, Email, and Settings with a Windows Phone icon lookalike. Arrange your choice of applications on your home screen accordingly. Press and hold on the home-screen background to either change it to a solid color or incorporate a matching Android wallpaper. I prefer the live wallpaper that is installed with the Moon Phase Pro program. Tinker with the layout until you achieve the look and feel you re comfortable Click HERE to purchase this book now. discuss

Home Screen Customization 7 with. When you re done, it may look similar to the one shown in Figure 12, A Windows Phone theme. In the next example, we will use a free theme originally designed for ADW.Launcher and pull in its icon assets to reflect a popular desktop OS. Emulating the OS X Desktop For this next theme, you can either use the launcher it was initially designed for (ADW.Launcher) or use the icon import capability of Nova Launcher Prime, as we did in the previous example. And as before, it s always a good idea to make a backup of your existing settings in case something goes wrong or you want to return to your original launcher settings. Install the ADW Theme MacOS Theme from Google Play. 19 Then, just as we did for the Windows Phone theme, go into Nova Launcher Prime s settings screen. Select the Look and feel option followed by the Icon Theme option. This will display a list of compatible themes that Nova Launcher Prime can use. Select the Figure 12 A Windows Phone theme ADW MacOS theme from the list. Doing so will replace some of the standard Android program icons with facsimiles of popular Mac OS X icons. Next, replace the home screen s background wallpaper with a Mac desktop wallpaper. Launch the default Android or Google Chrome browser, search Google Images for Mac desktop wallpaper, 20 and select any of the ones that appeal to you. Set the image to your wallpaper by long-pressing the image of choice. A pop-up menu will appear, as shown in Figure 13, Setting background wallpaper using an image from the Web, on page 8. Select the Set as wallpaper option. This will download the selected image, save it locally to your Android file storage, and set the image as the default home-screen background. 19. https://play.google.com/store/apps/details?id=akglo.themes.macos 20. https://images.google.com Click HERE to purchase this book now. discuss

8 With the background wallpaper set, create shortcuts to popular Android programs such as Browser, Email, and Settings on the home screen. Complete the effect by running a floater application like Stick it! to give the home screen the look and feel of a mini OS X desktop computer, as shown in Figure 14, Recreation of the OS X desktop, on page 9. Making Your Own Home Screen Now that you have an idea how to apply existing themes to re-create familiar desktop platforms, try making your own themes using a similar approach. Go retro and re-create a Commodore Amiga or Atari ST desktop on your Android. How about blending several desktop metaphors into your own unique creation? Depending on how artistic you are, you can even create your own background and icon images based on a favorite interest or hobby. Android allows you to explore and apply your ideas at your leisure. Figure 13 Setting background wallpaper using an image from the Web Click HERE to purchase this book now. discuss

Home Screen Customization 9 Figure 14 Re-creation of the OS X desktop Click HERE to purchase this book now. discuss