دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش:
نویسندگان: John Horton
سری:
ISBN (شابک) : 1789538505, 9781789538502
ناشر: Packt Publishing
سال نشر: 2018
تعداد صفحات: 767
زبان: English
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود)
حجم فایل: 11 مگابایت
در صورت تبدیل فایل کتاب Android Programming for Beginners: Build in-depth, full-featured Android 9 Pie apps starting from zero programming experience, 2nd Edition به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب برنامه نویسی اندروید برای مبتدیان: ساخت اپلیکیشن های عمیق و با امکانات کامل اندروید 9 پای با شروع تجربه برنامه نویسی صفر، نسخه دوم نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
تمام مهارتهای جاوا و اندروید را که برای شروع ساخت برنامههای موبایل قدرتمند با مراحل عملی و عملی نیاز دارید، بیاموزید
آیا سعی می کنید برای شروع حرفه ای در برنامه نویسی، اما راه درست را پیدا نکرده اید؟ آیا ایده خوبی برای یک اپلیکیشن دارید، اما نمی دانید چگونه آن را به واقعیت تبدیل کنید؟ یا شاید شما فقط ناامید شده اید که برای یادگیری اندروید، باید جاوا را بدانید. اگر این چنین است، پس این کتاب برای شما است.
این نسخه دوم جدید و توسعه یافته برنامه نویسی اندروید برای مبتدیان همراه شما برای ایجاد برنامه های Android Pie از ابتدا خواهد بود. ما شما را با تمام مفاهیم اساسی برنامه نویسی در زمینه اندروید، از اصول جاوا گرفته تا کار با API اندروید آشنا می کنیم. همه نمونهها از کلاسهای بهروز API استفاده میکنند و از داخل Android Studio، محیط رسمی توسعه Android که به افزایش فرآیند توسعه برنامه شما کمک میکند، ایجاد شدهاند.
بعد از این دوره خرابی، ما عمیقتر به برنامهنویسی اندروید خواهیم پرداخت و نحوه ایجاد برنامههای کاربردی با رابط کاربری استاندارد حرفهای از طریق قطعات و ذخیره دادههای کاربر خود با SQLite را یاد خواهید گرفت. علاوه بر این، خواهید دید که چگونه برنامه های خود را چند زبانه کنید، با انگشت روی صفحه بکشید و با گرافیک، صدا و انیمیشن ها نیز کار کنید.
در پایان این کتاب، شما آماده خواهید بود که برنامه های کاربردی سفارشی خود را در اندروید و جاوا شروع کنید.
اگر کاملاً با جاوا، اندروید یا برنامه نویسی آشنا هستید و می خواهید برنامه های اندرویدی بسازید، این کتاب برای شما مناسب است. این کتاب همچنین به عنوان یک تجدید کننده برای کسانی است که قبلاً تجربه استفاده از جاوا در اندروید را دارند تا دانش خود را ارتقا دهند و در پروژه های اولیه پیشرفت سریع داشته باشند.
(ن.ب. لطفاً از گزینه Look Inside برای مشاهده فصل های بیشتر استفاده کنید)
Learn all the Java and Android skills you need to start making powerful mobile applications with practical and actionable steps
Are you trying to start a career in programming, but haven't found the right way in? Do you have a great idea for an app, but don't know how to make it a reality? Or maybe you're just frustrated that in order to learn Android, you must know Java. If so, then this book is for you.
This new and expanded second edition of Android Programming for Beginners will be your companion to create Android Pie applications from scratch. We will introduce you to all the fundamental concepts of programming in an Android context, from the basics of Java to working with the Android API. All examples use the up-to-date API classes, and are created from within Android Studio, the official Android development environment that helps supercharge your application development process.
After this crash course, we'll dive deeper into Android programming and you'll learn how to create applications with a professional-standard UI through fragments and store your user's data with SQLite. In addition, you'll see how to make your apps multilingual, draw to the screen with a finger, and work with graphics, sound, and animations too.
By the end of this book, you'll be ready to start building your own custom applications in Android and Java.
This book is for you if you are completely new to Java, Android, or programming and want to make Android applications. This book also acts as a refresher for those who already have experience of using Java on Android to advance their knowledge and make fast progress through the early projects.
(N.B. Please use the Look Inside option to see further chapters)
Cover Copyright Packt Upsell Contributors Table of Contents Preface Chapter 1: Beginning Android and Java What's new in the second edition? Why Java and Android? The beginner's first stumbling block How Java and Android work together The Android API Java is object-oriented Run that by me again – What exactly is Android? Android Studio Setting up Android Studio Final step – for now What makes an Android app? Android resources The structure of Android's Java code Packages Classes Methods Our first Android app Extra step 1 Extra step 2 Deploying the app so far Running and debugging the app on an Android emulator Running the app on a real device Frequently asked questions Summary Chapter 2: First Contact – Java, XML, and the UI Designer Examining the log output Filtering the logcat output A note for early adopters of this book Exploring the project's Java code and the main layout's XML code Examining the HelloWorldActivity.java file Code folding (hiding) in Android Studio The package declaration Importing classes The class Methods inside the class Summary of the Java code so far Examining the main layout file UI layout elements UI text elements Adding buttons to the main layout file Adding a button via the visual designer Editing the button's attributes Examining the XML code for the new button Adding a button by editing the XML code Giving the buttons unique id attributes Positioning the two buttons in the layout Making the buttons call different methods Leaving comments in our Java code Coding messages to the user and the developer Writing our first Java code Adding message code to the onCreate method Examining the output Writing our own Java methods Examining the output Frequently asked questions Summary Chapter 3: Exploring Android Studio and the Project Structure A quick guided tour of Android Studio Project Explorer and project anatomy The Empty Activity project Exploring the Empty Activity project The manifests folder The java folder The res folder The res/drawable folder The res/layout folder The res/mipmap res/values The Basic Activity project Exploring the Basic Activity project The MainActivity.java file The activity_main.xml file The extra methods in MainActivity.java The content_main.xml file Exploring the Android emulator Emulator control panel Using the emulator as a real device Accessing the app drawer Viewing active apps and switching between apps Summary Chapter 4: Getting Started with Layouts and Material Design Material design Exploring Android UI design Layouts Creating the Exploring Layouts project Building a menu with LinearLayout Adding a LinearLayout to the project Preparing your workspace Examining the generated XML Adding a TextView to the UI Adding a multi-line TextView to the UI Wiring up the UI with the Java code (part 1) Adding layouts within layouts Making the layout look pretty Wiring up the UI with the Java code (part 2) Building a precise UI with ConstraintLayout Adding a CalenderView Resizing a view in a ConstraintLayout Using the Component Tree window Adding constraints manually Adding and constraining more UI elements Making the text clickable Laying out data with TableLayout Adding a TableRow to TableLayout Using the Component Tree when the visual designer won't do Organizing the table columns Linking back to the main menu Summary Chapter 5: Beautiful Layouts with CardView and ScrollView Attributes quick summary Sizing using dp Sizing fonts using sp Determining size with wrap or match Using padding and margin Using the layout_weight property Using Gravity Building a UI with CardView and ScrollView Setting the view with Java code Adding image resources Creating the content for the cards Defining dimensions for CardViews Adding CardViews to our layout Including layout files inside another layout Themes and material design Using the Android Studio theme designer Creating a tablet emulator Frequently asked questions Summary Chapter 6: The Android Lifecycle The life and times of an Android app How Android interacts with our apps A simplified explanation of the Android lifecycle The lifecycle phases demystified How we handle the lifecycle phases Lifecycle demo app Coding the lifecycle demo app Running the lifecycle demo app Examining the Lifecycle Demo app output Some other overridden methods The structure of Java code – revisited Summary Chapter 7: Java Variables, Operators, and Expressions Java is everywhere Syntax and jargon More code comments Storing and using data with variables Types of variables Primitive types Reference types Using variables Variable declaration Variable initialization Changing values in variables with operators The assignment operator The addition operator The subtraction operator The division operator The multiplication operator The increment operator The decrement operator Expressions Expressing yourself demo app Summary Chapter 8: Java Decisions and Loops Making decisions in Java Indenting code for clarity More operators The comparison operator The logical NOT operator The NOT equal operator The greater than operator The less than operator The greater than or equal to operator The less than or equal to operator The logical AND operator The logical OR operator How to use all of these operators to test variables Using the Java if keyword Switching to make decisions Switch Demo app Repeating code with loops While loops Breaking out of a loop The continue keyword Do while loops For loops Loops demo app Summary Chapter 9: Java Methods Methods revisited What exactly are Java methods? Method structure Modifier Return type Name of a method Parameters The body Using methods demo apps Real world methods Discovering variable scope Exploring method overloading Scope and variables revisited Frequently asked questions Further reading Summary Chapter 10: Object-Oriented programming Important memory management warning Object-oriented programming What is OOP exactly Encapsulation Polymorphism Inheritance Why do it like this? Class recap Looking at the code for a class Class implementation Declaring, initializing, and using an object of the class Basic classes app More things that we can do with our first class Frequently asked questions Chapter 11: More Object-Oriented Programming Remember that encapsulation thing? Controlling class use with access modifiers Class access modifiers Class access in summary Controlling variable use with access modifiers Variable access modifiers Variable access summary Methods have access modifiers too Method access modifiers Method access summary Accessing private variables with getters and setters Setting up our objects with constructors Static methods Encapsulation and static methods mini-app OOP and inheritance Inheritance example app Polymorphism Abstract classes Interfaces Frequently asked questions Summary Chapter 12: The Stack, the Heap, and the Garbage Collector All the Android UI elements are classes too Re-introducing references A quick break to throw out the trash Seven facts about the Stack and the Heap So how does this Heap thing help me? Using Buttons and TextView widgets from our layout The Inner and Anonymous classes Frequently asked questions Summary Chapter 13: Anonymous Classes – Bringing Android Widgets to Life Declaring and initializing the objects Creating UI widgets from pure Java without XML Exploring the palette – part 1 The EditText widget The ImageView widget Radio button and group Anonymous classes Exploring the palette – Part 2, and more anonymous classes Switch CheckBox TextClock Widget exploration app Setting up the widget exploration project and UI Coding the widget exploration app Getting a reference to the parts of the UI Coding the checkboxes Coding the RadioButtons Using an anonymous class for a regular button Coding the Switch Running the Widget Exploration app Converting layouts to ConstraintLayout Summary Chapter 14: Android Dialog Windows Dialog windows Creating the Dialog Demo project Coding a DialogFragment class Using chaining to configure the DialogFragment Using the DialogFragment class The Note to self app Using naming conventions and String resources How to get the code files for the Note to self app The completed app Building the project Preparing the String resources Coding the Note class Implementing the Dialog designs Coding the dialog boxes Coding the DialogNewNote class Coding the DialogShowNote class Showing our new dialogs Coding the floating action button Summary Chapter 15: Arrays, ArrayList, Map and Random Numbers A random diversion Handling large amounts of data with arrays Arrays are objects Simple array example mini-app Getting dynamic with arrays Dynamic array example Entering the nth dimension with Arrays Multidimensional Array mini app Array out of bounds exceptions ArrayLists The enhanced for loop Arrays and ArrayLists are polymorphic More Java Collections – Meet Java Hashmap The Note to Self app Frequently asked questions Summary Chapter 16: Adapters and Recyclers RecyclerView and RecyclerAdapter The problem with displaying lots of widgets The solution to the problem with displaying lots of widgets How to use RecyclerView and RecyclerAdapter What we will do to set up RecyclerView with RecyclerAdapter and an ArrayList of notes Adding RecyclerView, RecyclerAdapter, and ArrayList to the Note to Self project Removing the temporary Show Note button and adding the RecyclerView Creating a list item for the RecyclerView Coding the RecyclerAdapter class Coding the NoteAdapter constructor Coding the onCreateViewHolder method Coding the onBindViewHolder method Coding getItemCount Coding the ListItemHolder inner class Coding MainActivity to use the RecyclerView and RecyclerAdapter classes Adding code to onCreate Modifying the addNote method Coding the showNote method Running the app Frequently asked questions Summary Chapter 17: Data Persistence and Sharing Android Intents Switching Activity Passing data between Activities Adding a settings page to Note to Self Creating the SettingsActivity Designing the Settings screen layout Enabling the user to switch to the settings screen Persisting data with SharedPreferences Reloading data with SharedPreferences Making the Note to Self settings persist Coding the SettingsActivity class Coding the MainActivity class More advanced persistence What is JSON? Java exceptions – try, catch, and finally Backing up user data in Note to Self Frequently asked questions Summary Chapter 18: Localization Making the Note to Self app for Spanish, English, and German speakers Adding Spanish support Adding German support Adding the string resources Running Note to Self in German or Spanish Making the translations work in Java code Summary Chapter 19: Animations and Interpolations Animations in Android Designing cool animations in XML Fading in and out Move it, move it Scaling or stretching Controlling the duration Rotate animations Repeating animations Combining animation's properties with Set Instantiating animations and controlling them with Java code More animation features Listeners Animation interpolators Animations Demo App – introducing SeekBar Laying out the animation demo Coding the XML Animations Wiring up the Animation Demo app in Java Frequently asked questions Summary Chapter 20: Drawing Graphics Understanding the Canvas class Getting started drawing with Bitmap, Canvas, and ImageView Canvas and Bitmap Paint ImageView and Activity Canvas, Bitmap, Paint, and ImageView – quick summary Using the Canvas class Preparing the instances of the required classes Initializing the objects Setting the Activity content The Canvas Demo app Creating a new project Coding the Canvas demo app Drawing on the screen Android coordinate system Plotting and drawing Creating Bitmaps Manipulating Bitmaps What is a Bitmap exactly? The Matrix class Inverting a bitmap to face the opposite direction Rotating the bitmap to face up and down Bitmap manipulation demo app Add the graphic to the project Frequently asked question Summary Chapter 21: Threads, and Starting the Live Drawing App Creating the Live Drawing project Looking ahead at the Live Drawing app Coding the LiveDrawingActivity class Coding the LiveDrawingView class Coding the LiveDrawingView class Adding the member variables Coding the LiveDrawingView constructor Coding the draw method Adding the printDebuggingText method Understanding the draw method and the SurfaceView class The game loop Threads Problems with threads Implementing the game loop with a thread Implementing Runnable and providing the run method Coding the thread Starting and stopping the thread Using the Activity lifecycle to start and stop the thread Coding the run method Running the app Summary Chapter 22: Particle Systems and Handling Screen Touches Adding custom buttons to the screen Implementing a particle system effect Coding the Particle class Coding the ParticleSystem class Spawning particle systems in the LiveDrawingView class Handling touches Coding the onTouchEvent method Finishing the HUD Running the app Summary Chapter 23: Supporting Different Versions of Android, Sound Effects, and the Spinner Widget Handling different versions of Android Detecting the current Android version The Soundpool class Initializing SoundPool the new way Initializing SoundPool the old way Loading sound files into memory Playing a sound Stopping a sound Sound demo app introducing Spinner widget Making sound FX Laying out the sound demo Coding the Sound demo Summary Chapter 24: Design Patterns, Multiple Layouts, and Fragments Introducing the model-view-controller pattern Model View Controller Android design guidelines Real-world apps Device detection mini-app Coding the MainActivity class Unlocking the screen orientation Running the app Configuration qualifiers The limitation of configuration qualifiers Fragments Fragments have a lifecycle too onCreate onCreateView onAttach and onDetach onStart, onPause, and onStop Managing Fragments with FragmentManager Our first Fragment app Fragment reality check Frequently asked question Summary Chapter 25: Advanced UI with Paging and Swiping Angry birds classic swipe menu Building an image gallery/slider app Implementing the layout Coding the PagerAdapter class Coding the MainActivity class Running the gallery app Building a Fragment Pager/slider app Coding the SimpleFragment class The fragment_layout Coding the MainActivity class The activity_main layout Running the fragment slider app Summary Chapter 26: Advanced UI with Navigation Drawer and Fragment Introducing the NavigationView Examining the Simple Database app Insert Delete Search Results Starting the Simple Database project Exploring the auto-generated code and assets Coding the Fragment classes and their layouts Creating the empty files for the classes and layouts Coding the classes Designing the layouts Designing content_insert.xml Designing content_delete.xml Designing content_search.xml Designing content_results.xml Using the Fragment classes and their layouts Editing the Navigation Drawer menu Adding a holder to the main layout Coding the MainActivity.java Summary Chapter 27: Android Databases Database 101 What is a database What is SQL What is SQLite SQL syntax primer SQLite example code Creating a table Inserting data into the database Retrieving data from the database Updating the database structure Android SQLite API SQLiteOpenHelper and SQLiteDatabase Building and executing queries Database cursors Coding the database class Coding the Fragment classes to use the DataManager Running the Age Database app Summary Chapter 28: Coding a Snake Game Using Everything We Have Learned So Far How to play Getting started with the Snake game Make the app full screen and landscape Adding some empty classes Coding SnakeActivity Adding the sound effects Coding the game engine Coding the members Coding the constructor Coding the newGame method Coding the run method Coding the updateRequired method Coding the update method Coding the draw method Coding onTouchEvent Coding pause and resume Running the game Adding the graphics Coding the apple The Apple constructor Using the apple Running the game Summary Chapter 29: Enumerations and Finishing the Snake Game Enumerations Add the sound to the project Coding the Snake class Coding the constructor Coding the reset method Coding the move method Coding the detectDeath method Coding the checkDinner method Coding the draw method Coding the switchHeading method Using the snake class and finishing the game Running the completed game Summary Chapter 30: A Quick Chat Before You Go Publishing Making an app! Carrying on learning Carrying on reading GitHub StackOverflow Android user forums Higher-level study My other channels Goodbye and thank you Other Books You May Enjoy Index