售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Learning Android Application Development
Learning Android Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Android Development
Setting up Android Studio
Getting the right version of Android Studio
Installing Android Studio
First run
Creating a sample project
Starting a new project
Running your project
Resource configuration qualifiers
Additional elements
Resources
Modules
Android Manifest
Gradle build system
ProGuard
Summary
2. Activities and Fragments - The Backbone of Your App
Activities
Android design guidelines
The Activity context and scope
Activity lifecycle
Activity states
Activity lifecycle callbacks
Activity states and callbacks
The activity stack
Creating activities
Defining your activity
Editing the app manifest
Creating our Activity class
Building the sample application
Setting up your device for debugging
Running the application
Fragments
When to use fragments
Fragment lifecycle
Fragment context
Activity - fragment lifecycles
Fragment lifecycle callbacks
Creating fragments
Creating our own fragment
Creating a static fragment constructor
Using values from the static factory implementation
Adding a fragment to an activity
Running the application
Adding multiple fragments to a single activity
Adding multiple fragments to an activity
Adding two fragments in a single FragmentTransaction
Running the application
Navigating through an app
Activity navigation
Summary
3. Working with Views – Interacting with Your App
Views and ViewGroups
Common views
TextView
Common operations
EditText
Common operations
ImageView
Common operations
Button
Common operations
ImageButton
Common operations
Switch and CheckBox
Common operations
WebView
Common operations
Common ViewGroups
FrameLayout
Common operations
CardView
Common operations
LinearLayout
Common operations
RelativeLayout
Common operations
ScrollView
Common operations
ListView
Common operations
GridView
Common operations
RecyclerView
Common operations
ConstraintLayout
Common operations
Building a user interface using views and ViewGroups
Creating interfaces using layout files
Creating a basic layout
Adding a TextView
Previewing the layout
Using your layout file
Styling the TextView
Testing the layout
Creating user interfaces programmatically
Creating custom views
The first custom view example
Custom drawing
Drawing on a Canvas
Hooking up the CustomView
Adding the custom view programmatically
Adding the custom view using a layout file
Testing the CustomView
The second custom view example
Creating the CustomTextView class
Adding on-click behavior
Testing the CustomTextView
Overriding the onTouchEvent method
Additional user interface components
Toasts
Dialogs
Summary
4. Lists and Adapters
ListView and ListActivity
ListView
ListActivity
Customizing the item view
Adapters
ArrayAdapter
Performance considerations
BaseAdapter
RecyclerView
Replacing ListView with RecyclerView
CardView
ItemAnimator
ItemDecoration
StaggeredGridLayoutManager
Summary
5. Remote Data
Permissions
Android M permission mechanism
Permission groups
Background processing
Java threads
AsyncTask
IntentService
Network code
Android standard libraries
Volley
Gson
Retrofit
Real case scenario
Summary
6. Image Management
Caching remote data
Memory caches
Disk caches
Handling configuration changes
Loading images
Memory
Handling large images
Different image types
Vector drawables
Images in a RecyclerView
Widely used third-party libraries
Glide
UIL
Picasso
Fresco
Summary
7. Permanent Data
Storing preferences
Initialization
Basic use
Additional features
Files
Internal storage
External storage
Additional methods
SQLite
Schema and contract definition
Helper implementation
Third-party libraries
Realm
Summary
8. Testing Your Application
Testing logic
Simple calculator application
Unit tests
Discovering and fixing issues by creating tests
Instrumentation tests
Testing integrations
Mocking Android dependencies
Testing the UI
Setup
Creating UI tests
Simplifying UI test creation
Putting it all together
Summary
9. Publishing Your Application
Preparation steps
Application signing
Account creation
Publishing your application on Google Play
Adding a new application
Preparing the Store Listing
Uploading the application APK
Summary
10. Monetization – Make Money with Your App
Paid apps
Creating a paid app
Finance tracking
In-app purchases
Initial setup
Adding in-app products
Application code setup
Purchasing in-app products from our application
Consuming purchases
In-app advertising
Integrating with the Google Mobile Ads SDK
Summary
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜