Home Page Icon
Home Page
Table of Contents for
Cover
Close
Cover
by Budi Kurniawan
Java for Android, Second Edition
Introduction
Java, the Language and the Technology
An Overview of Object-Oriented Programming
About This Book
Downloading Program Examples
Chapter 1: Getting Started with Java
Downloading and Installing Java
Your First Java Program
Java Code Conventions
Integrated Development Environments (IDEs)
Summary
Chapter 2: Language Fundamentals
ASCII and Unicode
Separators
Primitives
Variables
Constants
Literals
Primitive Conversions
Operators
Comments
Summary
Chapter 3: Statements
Overview
The if Statement
The while Statement
The do-while Statement
The for Statement
The break Statement
The continue Statement
The switch Statement
Summary
Chapter 4: Objects and Classes
What Is An Object?
Java Classes
Creating An Object
The null Keyword
Memory Allocation for Objects
Java Packages
Encapsulation and Access Control
The this Keyword
Using Other Classes
Final Variables
Static Members
Static Final Variables
Static import
Variable Scope
Method Overloading
Static Factory Methods
By Value or By Reference?
Loading, Linking, and Initialization
Object Creation Initialization
The Garbage Collector
Summary
Chapter 5: Core Classes
java.lang.Object
java.lang.String
java.lang.StringBuffer and java.lang.StringBuilder
Primitive Wrappers
java.lang.Class
java.lang.System
java.util.Scanner
Summary
Chapter 6: Arrays
Overview
Iterating over an Array
The java.util.Arrays Class
Changing an Array Size
Searching An Array
Passing a String Array to main
Multidimensional Arrays
Summary
Chapter 7: Inheritance
Overview
Accessibility
Method Overriding
Calling the Constructors of the Superclass
Calling the Hidden Members of the Superclass
Type Casting
Final Classes
The instanceof Operator
Summary
Chapter 8: Error Handling
Catching Exceptions
try without catch
Catching Multiple Exceptions
The try-with-resources Statement
The java.lang.Exception Class
Throwing an Exception from a Method
User-Defined Exceptions
Note on Exception Handling
Summary
Chapter 9: Working with Numbers
Boxing and Unboxing
Number Parsing
Number Formatting
Number Parsing with java.text.NumberFormat
The java.lang.Math Class
Working with Money
Generating Random Numbers
Summary
Chapter 10: Interfaces and Abstract Classes
The Concept of Interface
The Interface, Technically Speaking
Default Methods
Static Methods
Base Classes
Abstract Classes
Summary
Chapter 11: Polymorphism
Overview
Polymorphism in Action
Polymorphism and Reflection
Summary
Chapter 12: Enums
Overview
Enums in a Class
The java.lang.Enum Class
Iterating Enumerated Values
Switching on Enum
Enum Members
Summary
Chapter 13: Working with Dates and Times
Overview
The Instant Class
LocalDate
Period
LocalDateTime
Time Zones
ZonedDateTime
Duration
Formatting A Date-Time
Parsing A Date-Time
Using the Old Date and Time API
Summary
Chapter 14: The Collections Framework
An Overview of the Collections Framework
The Collection Interface
List and ArrayList
Iterating Over a Collection with Iterator and for
Set and HashSet
Queue and LinkedList
Collection Conversion
Map and HashMap
Making Objects Comparable and Sortable
Summary
Chapter 15: Generics
Life without Generics
Generic Types
Using Generic Types without Type Parameters
Using the ? Wildcard
Using Bounded Wildcards in Methods
Generic Methods
Writing Generic Types
Summary
Chapter 16: Input/Output
File Systems and Paths
File and Directory Handling and Manipulation
Input/Output Streams
Reading Binary Data
Writing Binary Data
Writing Text (Characters)
Reading Text (Characters)
Logging with PrintStream
Random Access Files
Object Serialization
Summary
Chapter 17: Annotations
Overview
Standard Annotations
Common Annotations
Standard Meta-Annotations
Custom Annotation Types
Summary
Chapter 18: Nested and Inner Classes
An Overview of Nested Classes
Static Nested Classes
Member Inner Classes
Local Inner Classes
Anonymous Inner Classes
Behind Nested and Inner Classes
Summary
Chapter 19: Java Threads
Introduction to Java Threads
Creating A Thread
Working with Multiple Threads
Thread Priority
Stopping a Thread
Synchronization
Visibility
Thread Coordination
Using Timers
Summary
Chapter 20: Concurrency Utilities
Atomic Variables
Executor and ExecutorService
Callable and Future
Locks
Summary
Chapter 21: Internationalization
Locales
Internationalizing Applications
An Internationalized Swing Application
Summary
Chapter 22: Java Networking
An Overview of Networking
The Hypertext Transfer Protocol (HTTP)
java.net.URL
java.net.URLConnection
java.net.Socket
java.net.ServerSocket
A Web Server Application
Summary
Chapter 23: Introduction to Android
Overview
Application Development in Brief
Android Versions
Online Reference
Which Java Versions Can I Use?
Chapter 24: Getting Started with Android
Downloading and Installing Android Studio
Creating An Application
Running the Application on the Emulator
The Application Structure
Debuging Your Application
The Android SDK Manager
Creating An Android Virtual Device
Running An Application on A Physical Device
Opening A Project in Android Studio
Using Java 8
Getting Rid of the Support Library
Summary
Chapter 25: Activities
The Activity Lifecycle
ActivityDemo Example
Changing the Application Icon
Using Android Resources
Starting Another Activity
Activity-Related Intents
Summary
Chapter 26: UI Components
Overview
Using the Android Studio UI Tool
Using Basic Components
Toast
AlertDialog
Notifications
Summary
Chapter 27: Layouts
Overview
LinearLayout
RelativeLayout
FrameLayout
TableLayout
Grid Layout
Creating A Layout Programmatically
Summary
Chapter 28: Listeners
Overview
Using the onClick Attribute
Implementing A Listener
Summary
Chapter 29: The Action Bar
Overview
Adding Action Items
Adding Dropdown Navigation
Going Back Up
Summary
Chapter 30: Menus
Overview
The Menu File
The Options Menu
The Context Menu
The Popup Menu
Summary
Chapter 31: ListView
Overview
Creating A ListAdapter
Using A ListView
Extending ListActivity and Writing A Custom Adapter
Styling the Selected Item
Summary
Chapter 32: GridView
Overview
Using the GridView
Summary
Chapter 33: Styles and Themes
Overview
Using Styles
Using Themes
Summary
Chapter 34: Bitmap Processing
Overview
Bitmap Processing
Summary
Chapter 35: Graphics and Custom Views
Overview
Hardware Acceleration
Creating A Custom View
Drawing Basic Shapes
Drawing Text
Transparency
Shaders
Clipping
Using Paths
The CanvasDemo Application
Summary
Chapter 36: Fragments
The Fragment Lifecycle
Fragment Management
Using A Fragment
Extending ListFragment and Using FragmentManager
Summary
Chapter 37: Multi-Pane Layouts
Overview
A Multi-Pane Example
Summary
Chapter 38: Animation
Overview
Property Animation
An Animation Project
Summary
Chapter 39: Preferences
SharedPreferences
The Preference API
Using Preferences
Summary
Chapter 40: Working with Files
Overview
Creating a Notes Application
Accessing the Public Storage
Summary
Chapter 41: Working with the Database
Overview
The Database API
Example
Summary
Chapter 42: Taking Pictures
Overview
Using Camera
The Camera API
Using the Camera API
Summary
Chapter 43: Making Videos
Using the Built-in Intent
MediaRecorder
Using MediaRecorder
Summary
Chapter 44: The Sound Recorder
The MediaRecorder Class
Example
Summary
Chapter 45: Handling the Handler
Overview
Example
Summary
Chapter 46: Asynchronous Tasks
Overview
Example
Summary
Chapter 47: Services
Overview
The Service API
Declaring A Service
A Service Example
Summary
Chapter 48: Broadcast Receivers
Overview
BroadcastReceiver-based Clock
Canceling A Notification
Summary
Chapter 49: The Alarm Service
Overview
Example
Summary
Chapter 50: Content Providers
Overview
The ContentProvider Class
Creating A Content Provider
Consuming A Content Provider
Summary
Appendix A: javac
Options
Command Line Argument Files
Appendix B: java
Options
Appendix C: jar
Syntax
Options
Examples
Setting an Application Entry Point
Appendix D: NetBeans
Download and Installation
Creating a Project
Creating a Class
Running a Java Class
Adding Libraries
Debugging Code
Appendix E: Eclipse
Download and Installation
Adding A JRE
Creating a Java Project
Creating a Class
Running a Java Class
Adding Libraries
Debugging Code
Useful Shortcuts
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
title
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset