The Busy Coders Guide to Android Development最终版2019

所需积分/C币:9 2019-03-22 09:17:51 76.17MB PDF
收藏 收藏
举报

The Table of Contents Each bullet shown below represents a chapter. Use the search field in the nav bar to search all of the CommonsWare books to see what they hold! Key Android Concepts Choosing Your Development Toolchain Tutorial #1 - Installing the Tools Android and Projects Tutorial #2 - Creati
The busy Coders guide to Android development by mark L. murphy Copyright C 2008-2019 Commons Ware, LLC. All Rights Reserved Printed in the United States of amer g hist February 2019 FINAL Version ISBN: 978-0-9816780-0-9 The Commons Ware name and logo, Busy Coder's guide, and related trade dress are trademarks of Commons Ware LLC All other trademarks referenced in this book are trademarks of their respective firms. The publisher and author(s)assume no responsibility for errors or omissions or for damages resulting from the use of the information contained herein Table of contents Headings formatted in bold-italic have changed since the last version · Preface Welcome to the book!∴ ·音p非···,··市非鲁非音····非音音音非。自音·章··。音 First-Generation book …lii The book's structure li The trails 非·音·音·非音··非 XIV About the updates ·鲁鲁非·着非·非 about the apk edition wwwwww I Source code and its license 中····:·································· Creative Commons and the four-to- Free(42F)Guarantee.....li Acknowledgments Key android Concepts o Android Applications Android devices ·着非非垂··看 Dont be scared ·····.·,···········:····· 10 Choosing Your development Toolchain Android studio E cllpse....................... 、着音·鲁垂看音音看 IntelliJ IDEA ··············:·······················:····:···················:·············· Command-Line builds via gradle .......12 Yet Other alternatives 12 IDEs. And This book What We are not Covering 看·音·····着非非·非鲁非音非·音非自鲁非自着音非·非非·非着非·非音非音音·非着非 1 Tutorial #1-Installing the Tools But first, Some notes about androids emulator……………5 Step#1: Checking Your Hardware 16 Step #2: Setting Up Java and 32-Bit Linux Support Step#3: Install android studio……… Step#4: Install the SdKs and add-Ons ····:··········:· In Our Next episode Android and Proiects Projects and android studio ····:···:·.·· 29 Tutorial #2-Creating a Stub Project o About Our tutorial Project .............37 About the rest of the tutorials about our tools 8 0Step井1: Importing the project………… ep#2: Get ready for the x86 Emula 43 Step井3: Set Up the avd……..…..….….….…....44 Step#4: Set Up the device……… 5 Step#5: Running the project f6 In Our next ey isode 8 Getting around android studio Navigating The Project Explorer …59 ° Running projects………………… ·非·。非着非自 6 Viewing Output ················· Accessing Android Tools…… 6 Android Studio and release channels .................................66 Visit the trails 68 Contents of Android Proiects What You get. in genera More about the directory structure What You get out of lt 74 Introducing gradle and the manifest Gradle: The Big Q 75 Obtaining gradle………..........,y7 o Versions of gradle and the android gradle plugin.........79 Gradle environment variables Examining the gradle Files 80 Introducing the manifest ········ 8 Things In Common Between the manifest and gradle ............84 Other gradle Items of note 86 Wheres the gui? 7 The Rest of the manifest Learning More About gradle.......89 Visit the trails Tutorial #3-Manifest Changes o Some notes about relative paths . Step#1 Supporting Screens Step#2: Blocking Backups 2 Step #3: Ignoring Lint 2 In Our next episode 94 Some words about resources String Theory…… ·················:······················· ∴95 Got the picture o Dimensions ···,····丰·, ····· 10 The Resource That Shall not Be Named.Yet..........107 · Icons App Icons. And Everything else I0 Creating an app icon with the asset studio... Creating Other Icons with the Asset studio………,,…,…,…,…,,…, Tutorial #4-Adjusting Our resources Step#1: Changing the Name 7 o Step#2: Changing the Icon.................... 118 Step# 3: Running the result In Our Next Episode The Theory of widgets What Are widgets? 5 Size, margins, and padding 127 What are containers? ·音看鲁看····音·音 ……127 0 The absolute Positioning Anti- Pattern……… 128 The Theme of this section: Themes 着鲁音非鲁 12Q The Android User Interface The activit 135 Dissecting the Activity 6 Using XMl-Based layouts Basic widgets ° Common Concepts………,…,…,…,,…,,,,…,,……,141 Introducing the graphical Layout Editor 144 And now, Some Notes about the books sample projects…………53 o Assigning labels ...154 A Commanding button ……………………………159 o Fleeting Images ... 16 Fields of green Or Other colors 168 More common concepts …………………171 Visit the trails! 174 Debugging Your App o Get Thee To a Stack Trace ..........176 The Case of the Confounding Class Cast Point break ··············:·.·.:···········:·· 78 The Classic Container classes Introducing the Sampler App…… 79 RTL and Your layouts 180 Linear layout and the box model ....................................181 All Things are relative ··················:·.···········:···4···:·中· 2O7 Tabula rasa……….....…....…,2i7 o Hey, What about Constraint Layout?......... 223 Turning Back to RTL 音。音音。音。番音 。音·音。音。非鲁 ……224 Other Common Widgets and Containers Just a Box to Check ……………………………………………227 Dont like Checkboxes? How about Toggles or Switches?....231 o Turn the radio up.... 235 o Scrollwork Making Progress with Progress Bars 12 framing the Scene 春··垂看非音·D着。·非 …………………242 Visit the trails! D看···着···非看·看,··非。·非 43 Tutorial #s-Creating a Layout Step#: Creating a New Layout Resource…………………….245 Step #2: Defining the UI 246 In Our next episode 音。,。自。音着非。自音音音音非非自。音音。音。音。 250 GUI Building, Continued Making your selection o Including Includes 25 Preview of Coming Attractions………………… 254 Adapter Views and Adapters o Adapting to the Circumstances.... 6 Lists of Naughty and Nice Clicks versus selections…….….……26o Spin control…..,,… 6 Grid Your lions( Or Something Like That)…… 26 o Fields: Now With35% Less typing!…………………… 272 Customizing the adapter……… ········ 着·非·非鲁 Visit the trai 28 The Web view Widget Role of web view 7 Daddy, Where do webⅤ iews come fron?…88 Adding the widget 288 Loading Content via a URL 非···非非· 289 Links and redirects o Supporting javaScript.........291 o Alternatives for Loading Content ..............292 Listening for Events 93 Addressing the link/ Redirect behavior…… 296 Opting Out of Google Monitoring 20 8 Visit the trails 299 Defining and Using Styles Styles: DIY drY o Elements of style ·「·「··「·· Themes: Would a Style by any Other Name …306 What Happens If You Have No Theme 春非·非音·非看非非··非非音 ……….306 Android studios theme editor 307 Dependencies What's a Dependency?… :···中··············:··:·.·中.·:··中···· Dependency Scopes 314 Depending on a local jar ……………315 What's an artifact? 春··垂看非音·D着。·非 Artifacts and Repositories 着D垂··非·着看鲁非着·鲁·非着·垂着非看非音音着非着垂 316 Major Library Families from Google 316 Requesting Dependencies 317 The Android Support Library ……………320 Tutorial#6- Adding a Library Step#: Getting Rid of Existing(ruft………… 325 Step#2: Requesting New Dependencies ………,326 In Our next episode ….328 Introducing ConstraintLayout Why Another Container? 329 Comparing with the classics ………331 Getting ConstraintLayout ………………331 o Using Widgets and Containers from Libraries.......332 Using a constraintlayout 332 Converting Existing Layouts 346 Visit the trails ………………34 8 Recycler view Adapter View and its Discontents………………….349 o Enter recycler view.... 350 A Trivial list 35 Divider options ……………359 Handling Click Events 3 66 Visit the trails The Action bar Bar Hopping 375 Yet Another History L esson 非···非非·着·非 8 Your Action Bar options 8 Setting the target ……384 Defining the resource 386 Applying the resource 88 Responding to events………….….....…...388 The Rest of the Sample Activ 8 o MEnu Key, We Hardly Knew Ye 39 Action Bars, Live in Living Color 397 Visit the trails ·.···:·.········:····:·.··:a···申 407 Vector drawables Getting the Artwork 400 VectorDrawable compat 414 Tutorial # -Setting Up the action Bar Step#1: Adding Some Icons 4 21 o Step #2: Defining Some Options ....4 Step# 3: Loading and responding to Our Options 426 Step#4: Supporting Older Devices………………………………47 tep #5: Trying It Out 429 In Our Next episode 430 Androids process model When Processes are created………….…41 o BACK. HOME, and Your Process...... …432 0 Termination................433 Foreground Means" I Love You…....,…,434 You and Your Heap……… ……………434 Activities and Their Lifecycles Creating your Second (and Third and... Activity y .436 Warning! Contains Explicit Intents!…………440 Using Implicit Intents 鲁垂 442 Extra! Extra 44 Pondering parcelable ………450 Asynchronicity and results......….…….451 Schroedinger' s Activity………………......45 Life, Death, and your activ 45 When activities die… …454 Walking Through the lifecycle ………………………455 Recycling Activities……… 458 Application: Transcending the Activity……………………959 The Case of the Invisible Activity 460 Tutorial #8-Setting Up An activity Step#1: Creating the Stub activity Class and manifest entry ......463 Step#2: Launching Our activity…………… 465 In our next e isode 466 The Tactics of Fragments The Six Questions 4 6 7 Where You get Your Fragments From……………….,…………,470 Your First Fragment 47 The fragment Lifecycle methods 475 Your First dynamic fragment 477 Fragments and the Action bar 非···非非· 8 I#o-Starting ou g F1 UT Fragments Step#1: Create a Simple Content fragment 483 Sep#2: Examining Simple Content Fragment……………485 In Our Next episode 486 Swiping with viewPager o Pieces of a Pager.......487 Paging fragments… D看·着····非·看非看·着非非 488 Paging Other Stuff 493 o Indicators 中中···· 494 Revisiting the Containers sampler ……………497 Tutorial #10- Rigging Up a view Pager Step#: Add a view Pager to the layout…… 505 Step#2: Creating a Contents Adapter……… ………1506 Step#3: Setting Up the view Pager…… In Our Next episode... 中.·····.············ 510 Resource Sets and Configurations What's a Configuration? And how do they change? 511 Configurations and Resource Sets Screen size and orientation…………….13 Coping with Complexit 鲁垂 ° Choosing The right resource……………….…..1i7 APi-Versioned resources Default Change Behavior……...,.1523 StatcSavingScenarios….......,.,.,., Your Options for Configuration Changes…………….526 Blocking rotations 540 And now, a Word From the android Project View……………….141 Confis 1g aration Challens ges 543 Material design basics Your App, in Technicolor ……549 Dealing with thread The main ap plication thread p …………………555 Getting to the Background 557 Syncing Feeling… …557 Alternatives to asyncTask 4· And now The Caveats 5 6 Event buses 569 Visit the trails!∴……………………………578 Requesting permissions frequently-Asked Questions about Permissions 80

...展开详情
试读 127P The Busy Coders Guide to Android Development最终版2019
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    抢沙发
    一个资源只可评论一次,评论内容不能少于5个字
    img
    • 分享达人

      成功上传6个资源即可获取

    关注 私信 TA的资源

    上传资源赚积分,得勋章
    最新推荐
    The Busy Coders Guide to Android Development最终版2019 9积分/C币 立即下载
    1/127
    The Busy Coders Guide to Android Development最终版2019第1页
    The Busy Coders Guide to Android Development最终版2019第2页
    The Busy Coders Guide to Android Development最终版2019第3页
    The Busy Coders Guide to Android Development最终版2019第4页
    The Busy Coders Guide to Android Development最终版2019第5页
    The Busy Coders Guide to Android Development最终版2019第6页
    The Busy Coders Guide to Android Development最终版2019第7页
    The Busy Coders Guide to Android Development最终版2019第8页
    The Busy Coders Guide to Android Development最终版2019第9页
    The Busy Coders Guide to Android Development最终版2019第10页
    The Busy Coders Guide to Android Development最终版2019第11页
    The Busy Coders Guide to Android Development最终版2019第12页
    The Busy Coders Guide to Android Development最终版2019第13页
    The Busy Coders Guide to Android Development最终版2019第14页
    The Busy Coders Guide to Android Development最终版2019第15页
    The Busy Coders Guide to Android Development最终版2019第16页
    The Busy Coders Guide to Android Development最终版2019第17页
    The Busy Coders Guide to Android Development最终版2019第18页
    The Busy Coders Guide to Android Development最终版2019第19页
    The Busy Coders Guide to Android Development最终版2019第20页

    试读已结束,剩余107页未读...

    9积分/C币 立即下载 >