How To Launch Your App In Just 16 hrs - Android Development
4.7 (468 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,766 students enrolled
Wishlisted Wishlist

Please confirm that you want to add How To Launch Your App In Just 16 hrs - Android Development to your Wishlist.

Add to Wishlist

How To Launch Your App In Just 16 hrs - Android Development

Learn Both Design with Photoshop and Code with Android Studio to publish your first app on the Playstore in just 16 HRS!
4.7 (468 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,766 students enrolled
Last updated 3/2016
Current price: $10 Original price: $80 Discount: 88% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 16.5 hours on-demand video
  • 1 Article
  • 33 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Understand how to use Photoshop for app UI design
  • Create simple, yet effective logos for app projects.
  • Understand the basics of coding in Java and using Android Studio
  • Design and develop a full, production-ready app from scratch.
View Curriculum
  • Android Studio
  • Adobe Photoshop CC (if you're following the design portion).
  • Adobe Illustrator CC (if you're following the design portion).

Have you ever seen a beautiful screen and wondered how it was designed or read a hundred lines of neatly formatted code and wondered how it works? This course aspires to seamlessly blend app design with android development giving you the complete picture. Learn how to design and code a fully working, professionally designed Android app from Photoshop to Playstore under 16 hours.

We build an app called BucketDrops in the series which lets you keep track of life goals. The course begins with app design instructed by Gary and covers the following:

  1. Photoshop basics
  2. Illustrator basics
  3. Principles of Logo Design
  4. Process to design the app mockup screens

We then dive into Android Programming using Android Studio instructed by Vivek Ramesh "Vivz" which covers the following topics

  1. Basic components of Android (Activities, Services, Intents, Fragments, and BroadcastReceivers
  2. Drawables and selectors
  3. Efficient Image Loading With Glide
  4. Fragments, FragmentManager and FragmentTransaction
  5. Realm database and queries
  6. RecyclerView, sections, animation and swipe to delete
  7. Styles and themes
  8. Custom Widgets and Views
  9. Running periodic tasks with IntentService, AlarmManager and BootReceiver
  10. Reverse engineering an APK file
  11. Proguard
  12. Publishing on Google Play

Follow along as Gary Simon and Vivek Ramesh "Vivz" walk you through the entire process of designing and coding a production-ready android app.


  1. You have Photoshop and Illustrator installed on your system.
  2. You know a bit of Object Oriented Programming (Any language will do but Java is preferable)

Materials included

  1. Assets wherever appropriate
  2. Presentations, keynotes and slides wherever appropriate
  3. Document containing GitHub code links attached on lecture 39
  4. Videos are enabled for offline access

Who are these guys?

Gary Simon has been a professional designer for over 15 years and has dealt with over a thousand clients on a variety of design and development projects. He owns a popular design business, along with its associated youtube presence which is one of the most popular design channels with almost 100,000 subscribers.

Vivz has been a java developer for nearly a decade and is the founder of a channel called slidenerd that deals with mobile programming on YouTube with almost 100,000 subscribers

Between the two, millions upon millions of aspiring designers and coders alike have benefited from their instructions.

Who should take this course?

Anyone that's interested in designing and developing apps for android. You can be an absolute beginner and follow along. You can also be an intermediate/advanced designer or coder and still gain valuable insights.

So if you're ready to start designing and coding amazing android apps, let's get started!

Who is the target audience?
  • Anyone who has an interest in designing and coding apps.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
110 Lectures
2 Lectures 01:34

Project Files
Introduction to Photoshop for UI Design
4 Lectures 31:19

In this lesson, we're going to overview all of the properties that are important when creating new documents and artboards within Photoshop. From the document type, width/height values, resolution, color modes, and background contents. We will also discuss artboards, which is a relatively new feature within Adobe Photoshop that allows you to create multiple canvases (called Artboards) within a single document. We will also discuss how you can work with the artboard tools and properties.

Creating New Documents and Artboard Documents

In this lesson, we will discuss how exactly layers work from a very basic understanding, to a more comprehensive understanding. You will learn how to create layers, add layer styles, blend modes, raster vs. shape layers, and more.

Understanding Layers

In this lesson, we're going to create a new document for the purposes of demonstrating how to design a very basic UI header. We'll start by creating a new document, and then creating a shape layer for holding a navigation. We'll then use the type tool to create the navigation links, and then add a hover state. Then to wrap it up, we will add a modal popup for displaying a checkmark.

Tools and Techniques Specific to UI Design

In this lesson we'll discuss how to export our assets within Adobe Photoshop. We'll discuss how you can quickly select layers through "Auto-Select" by clicking within the design as opposed to manually navigating through the layers menu, and then we will discuss how you can export assets quickly and efficiently.

Exporting Assets
Introduction to Adobe Illustrator for Logo & Icon Design
3 Lectures 17:43

In this lesson, we will overview exactly how to create documents within Adobe Illustrator, along with all of the necessary properties that are important to note when creating new documents. We'll cover profiles, artboard numbers, size, units, width x height, bleed and advanced properties. We'll also discuss how we can quickly adjust the canvas size after we've created the document.

Creating New Documents

In this lesson, we will discuss all of the properties that are important when dealing with layers within Illustrator. There are several differences when it concerns layers in Photoshop vs. layers in Illustrators.

Working with Layers

Tools and Techniques
BucketDrops: Designing the Logo & Icon in Illustrator
3 Lectures 21:48
Creating the Basic Bucket Shape

Adding the Drop Inside the Bucket

Finishing the Logo & Icon
BucketDrops: Designing the Mockups in Photoshop
8 Lectures 01:01:30
Beginning the Initial Add a Drop Mockup

Finishing the Add a Drop Mockup

Designing the Action Bar

Designing the Bucket Drop Rows Container

Designing the Add a Drop Overlay

Finishing up the Mockup Designs

Exporting the Assets

Organizing the Assets
Introduction To Coding
17 Lectures 03:18:19
This video shows you how to setup Java JDK on the Mac. Java JDK is needed for compiling Android applications. The process to setup the JDK is highly similar on both Mac and Windows. Check if Java is already installed in the first step by running the ‘java’ command or ‘java -version’ on your terminal in the Mac or Command Prompt on Windows. If the command interpreter says it does not recognise the Java command, download it in the first step from Oracle’s official website and install the JDK by following simple steps, check if the installation was successful from the command line. At the end of this video, you’ll be able to get JDK up and running.
Setup Java

Android Studio is the core software needed for making Android applications. Eclipse was used earlier but now Google officially recommends Android Studio. Download Studio from their official site, decide which Android versions you would require and download each required version using the Android SDK manager. The Android emulator lets you run your Android apps on a virtual device that runs inside your computer. Download and setup the Android emulator to test your apps. At the end of this video, you’ll be able to run Android Studio on your computer.
Setup Android Studio

This video shows you how to setup a simple Hello World App in Android. Start Android Studio, check if you have the latest version along with all the updates, select ‘Start a new Android Studio project’. Specify the name of the application, company domain that is used to identify all that apps that you will build in the future, project location which lets you store project files to a particular directory. Decide whether you want to target only phones or tablets, wear, TV and auto in addition to glass. Use one of the standard templates provided by Android Studio that control how many screens are created for you initially. Specify the name of your main screen or main activity along with a name for its XML layout file that simply controls what the user sees on that screen. Edit the styles.xml file to specify that we want to display our main screen without the horizontal bar at the top which is called as the app bar or action bar or Toolbar in Android. This video also shows you how to fix errors and bugs using Google and Stack Overflow. At the end of this video, you’ll be able to run a simple hello world app in Android in the standard emulator that Android Studio provides.
Hello World Using Android Studio

This video shows you how to run your Android app on a custom emulator by Genymotion. In the first step, download and install Virtual Box from Oracle which is free and necessary for running Genymotion. In the next step, create an account on Genymotion which is free, login with the credentials and download Genymotion. Once done, start the Genymotion app on Windows or Mac, add a new virtual device which is basically the Android device running inside your computer on which you would like to test your apps. Once you add a few devices, start Android Studio , navigate to its settings and download the Genymotion Plugin which integrates running Genymotion directly from android studio instead of launching it as a standalone application. Restart Android Studio and now you can use the virtual devices added via Genymotion to run your apps.
Setup Genymotion Custom Android Emulator

This video explains what is a version control system, especially what is Git and what is GitHub, how you can use Git to organise, maintain and track changes in code made either by a single person or a group of people working on a project together at the same time. It starts by showing you the issues you are likely to encounter without a VCS. Then it discusses the difference between a Centralised Version Control System or Client Server Version Control System and a Distributed Version Control System and discusses the issues faced in both. It introduces you to the Working Directory, Staging Area and Repository of Git and finally talks about what GitHub actually does.
Preview 09:28

This video shows how to upload code to GitHub directly from Android Studio. We need to have Git installed for this to happen which we can easily check by opening the Terminal or Command Prompt and typing the Git command. If Git is actually installed, it will show you the version number of Git when you type ‘git —version’ in the Terminal or Command Prompt. If Git is not installed, download it for your platform, install it like any other tool. Create an account on GitHub which is free with public repositories. Open Android Studio and simply select the option ‘Share Project On GitHub’ which lets you login to GitHub from Android Studio, select all the files which you want to commit and push the files to the remote origin.

Share Project On GitHub From Android Studio

This video explores the Settings area in Android Studio to uncover how to change fonts for the editor, the console, text color and size. How to use keyboard shortcuts in Android Studio. How to download, install and use plugins in android studio. How to use version control features such as GitHub. How to control compiler settings and cradle versions along with instant run that lets you run an app instantly by changing a line of code. How to use live templates and smart code insertions to reduce typing time. How to change the settings for third party plugins such as Genymotion which is used to run our Android emulator.
Android Studio Settings Overview

This video explains the units of measurements in Android. It takes a simple Image to illustrate that pixels cannot be used to specify sizes in Android has different Android devices can fit different number of pixels on screen. The idea also called screen density determines how crisp an Android screen can be. A screen with higher density takes lesser space to display the same content whereas its the opposite for screens with lower density values. Pixels, Millimetres, Inches, Points, Density Independent Pixels, Scaled Pixels are some of the units of measurement in Android. Every device having its own density, you often target a range of devices with a particular density instead of specific values. These range values are called density buckets. Finally the video illustrates the difference between sp and dp and shows why sp is to be used for font sizes.
What is Dp, Sp, Px in Android?

This video explores the project structure in Android Studio to make you understand the different parts and where to store what type of data. The drawable folders are good for storing images, the mipmap folders are good and very specific to storing launcher icons, the layout folder contains XML user interface definitions for all the screen elements, the values folder contains colour definitions, text definitions and dimension definitions which can be used to specify widths heights etc. and the styles file contains appearance descriptions of each UI control or widget should exactly look like on screen. All these values have a unique ID generated automatically for them by Android which is placed inside a file called The code files are placed inside the java folder whereas the AndroidManifest file contains a list of all android components used. The gradle build files describe the list of dependencies or libraries that our app requires to work properly.

Android Studio Project Structure

This video starts by talking about what is a View and a ViewGroup. A View is a rectangular area on the screen that can handle touch by the user. A ViewGroup or a Layout is a way of arranging views on the screen. The LinearLayout is a special type of ViewGroup that lets you add items either horizontally or vertically. To create a tabular structure, you can nest a LinearLayout within another one which is also demonstrated in this video.
Introduction To Views and Linear Layout

This video shows you how you can size the Views inside the LinearLayout by specifying 2 special values. The match_parent value indicates that the View should take up all the available width inside the ViewGroup in which it is currently placed. The wrap_content value indicates that the View should take up only the amount of space it requires to display the content inside it or no space if the View has no content which is applicable to certain Views. Weights let you control the ratio of space taken by Views with respect to each other. In a horizontal LinearLayout, weights control how much percentage of the screen width is occupied by each View when we specify a layout weight for that View. A value of 1 for every View indicates that all Views take up equal space inside the LinearLayout. In a vertical LinearLayout, weights control how much percentage of the screen height is occupied by each View when we specify a layout weight for that View
Weights in Linear Layout

This video illustrates two concepts- gravity that controls where the content appears within the View, left, right, top, bottom, centre, middle or a combination of all and layout gravity that controls where the View itself appears within its ViewGroup or layout and the same options apply as gravity.

Gravity vs. Layout Gravity

This video shows another layout called RelativeLayout in action. This layout stacks items on top of each other by default. We can specify whether the View should stick to the left, right, top, bottom of the parent ViewGroup inside which it is contained or whether it should be centred horizontally or vertically with respect to the ViewGroup. The View can also specify a combination of the attributes and its size may be modified to respect the constraints in that case. The RelativeLayout also lets you specify placement of Views with respect to each other and provides options where a View can be placed above, below or beside another View and can start or end to imitate the other View’s bounds.
Introduction To The Relative Layout

This video illustrates the difference between padding and margin. Padding controls the spacing between the content inside the View and the boundaries of the View. Margin controls the spacing between the View and boundaries of the ViewGroup inside which the View is placed. Padding and Margin values can be specified in either XML or code.
Preview 07:50

This video demonstrates the different ways to handle clicks on a button using a simple login form. The first method uses an onClick attribute in XML where you specify the name of a method from java code that should be called when the Button is Clicked. Ensure that the method exists and takes a View argument as input parameter. The second way is to have your Activity implement the OnClickListener which has a single method called onClick that tells you which View was clicked in the form of its parameter. Initialise the Button in code and don’t forget to set the OnClickListener for it.
Event Handling In Layouts

This video discusses how an Activity works in Android and what are the methods that an Activity class provide and how and when the Android system calls these methods. It then illustrates the recent activities running on the phone and the Activity back stack which is basically the list of screens that the person is navigating through. The currently active screen is at the top of the stack and when you press the back button, it is removed from the top and destroyed bring the last Activity the user was engaging with to the top of the stack. Finally the video introduces the methods involved in the Activity lifecycle which you need to use as a developer in your apps to handle certain situations.

Introduction To Activity Lifecycle

This video demonstrates how the Activity lifecycle methods are called by the Android system. When the app starts, onCreate, onStart, onResume are called which together constitute the Activity creation cycle. onCreate is called once per Activity creation and you can initialise Views and objects inside this method. When you move away from the Activity onPause and onStop are called. If you press back or rotate the screen the Activity is first destroyed which involves calling onPause, onStop, onDestroy and the Activity is created once again with the creation cycle. The onSaveInstanceState is called when the values of the relevant objects inside the activity is saved prior to destroying it. The onRestoreInstanceState is called giving the developer a chance to reload values into those objects whose state was saved in the onSaveInstanceState after the Activity was built from scratch.
Example Of Activity Lifecycle
Bucket Drops Project Setup
6 Lectures 41:46
This video shows how the bucket drops app works on the Genymotion emulator. The app has a home screen that contains a button which when clicked opens a dialog that lets you add a goal that you want to accomplish in the near future. You set the date, the goal itself and when you click add it, you are taken to the home screen which now shows the list of all items that you added. You can sort items by ascending or descending order of dates, you can also mark an item as complete by clicking on the item which opens another dialog letting you mark items. The app also runs a background service which checks your approaching deadlines and alerts you if you have unfinished goals.
Preview 04:39

This video shows the list of topics that we plan to cover in the full series along with links on how to get the code for each video. We start with an introduction to android programming that deals with basic topics, then we cover how to setup Bucket Drops in Android Studio. We move to the part now where we code the home screen with a background image which is loaded using the Glide library. We explain the concept of Fragments and Dialogs in the next section and move to our database product Realm which is a replacement for SQLite. We then cover the Recycler View in absolute detail and move to styles and themes and implementation for swipe to delete. The next part focuses on Custom Views and Widgets in Android and how you can use them to match your UI/UX needs. We finally talk about Broadcast Receivers, Services and how to publish the app on the play store.

The Index and How to get the code

This video demonstrates the basics of the various components involved in building Android apps.An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View).A Fragment represents a behaviour or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running.A Service is an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and it will continue to run in the background even if the user switches to another application. A BroadcastReceiver is an Android app component that responds to system-wide broadcast announcements. An intent is an abstract description of an operation to be performed. An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities.
What is an Activity, Fragment, Service, Receiver and Intent

This video talks about what is context in Android. Context allows access to application-specific resources and classes, as well as calls for application-level operations such as launching activities, broadcasting and receiving intents, etc. Context in Android is an interface to global information about an application environment. There are 4 different Context objects in existence, the Activity itself, the Application Context, the Base Context and the raw Context object that the device manufacturer has implemented.
What is Context?

This video illustrates the structure of each screen in our Bucket Drops app, the UI widgets involved and the arrangement of Views on the screen
Bucket Drops Screen Structure

This video shows how to setup the Bucket Drops app in Android Studio. Start Android Studio and click on Start a new Android Studio Project, You are taken to the Configure your new project screen, give the application name as Bucket Drops, specify a package name and save the code to a certain folder on your PC or Mac. Select the devices that you wish to target and select a template where we will choose Empty Activity. Give a name for the Activity that android studio must create for you and then specify the name of the layout file appropriately. And you are all set to code.

Setup BucketDrops in Android Studio
Coding the Main Screen
6 Lectures 01:07:21
This video shows you how to create the empty screen which is shown to the user when there are no items to display in the bucket list. The logo of the app can be displayed with the help of Image View whereas the other widget will be a Button that says Add a Drop which the user can click and launch a Dialog letting them fill details about the drop to be added. Both the widgets are added inside a Relative Layout and the necessary logo mage is copied to the drawable folder.
Adding the Logo and Button

This video shows how to make a selector in Android. A selector is basically a collection of drawables where each drawable is displayed when the widget using the selector is in a particular state and as a developer you have to specify which states of the selector correspond to which drawables. When the button is pressed, it selects the first colour in our case and when the button is not pressed, it selects the second colour from the selector for our Button when we apply a selector to the text colour of our Button. Instead of using images as selector items, we can also use shapes like rectangle where we specify the solid colour and the stroke colour that must be applied at each state of the selector.

Adding a selector to the Button

This video illustrates the different scale types supported by widgets that are capable of displaying Images in Android. Centre displays the image centred in the view with no scaling. centerCrop scales the image such that both the x and y dimensions are greater than or equal to the view, while maintaining the image aspect ratio; crops any part of the image that exceeds the size of the view; centres the image in the view. centerInside scales the image to fit inside the view, while maintaining the image aspect ratio. If the image is already smaller than the view, then this is the same as centre. fitCenter scales the image to fit inside the view, while maintaining the image aspect ratio. At least one axis will exactly match the view, and the result is centred inside the view. fitStart same as fitCenter but aligned to the top left of the view. fitEnd same as fitCenter but aligned to the bottom right of the view. itXY scales the x and y dimensions to exactly match the view size; does not maintain the image aspect ratio. matrix scales the image using a supplied Matrix class. The matrix can be supplied using the setImageMatrix method. A Matrix class can be used to apply transformations such as rotations to an image.
Image View Scale Type Illustrated

This video shows how to add a Toolbar in XML to the main screen. A Toolbar is a generalisation of action bars for use within application layouts. While an action bar is traditionally part of an Activity's opaque window decor controlled by the framework, a Toolbar may be placed at any arbitrary level of nesting within a view hierarchy. An application may choose to designate a Toolbar as the action bar for an Activity using the setActionBar() method. Use the Toolbar from the support package which is capable of running on the older devices as well.
Adding a Toolbar to XML

This video shows how to avoid Out Of Memory Errors while loading larges images inside an Image View by using a special library called Glide. Displaying Bitmaps efficiently can be done with standard Android techniques discussed in the official Android website or using third party libraries such as Picasso, Glide, Fresco and Universal Image Loader.
Display Bitmaps Efficiently With Glide

This video shows how to handle Button clicks in Android. There are 5 different ways for doing this. Use the android:onClick attribute in XML and give some method name as the value of this attribute. Define this method inside the Activity and ensure it takes a View argument. As an alternative you can let your Activity or Fragment implement the View.OnClickListener which is an interface with a single method called onClick. Set this listener on the Button by saying setOnClickListener. The other methods revolve around the different ways of doing this which would involve either implementing the Listener directly in the Activity or Fragment or using anonymous inner classes.
Event Handling For Button
Introduction To Fragments
9 Lectures 01:11:46
This video talks about Fragments in Android. Fragments are like mini-activities that can be used to display chunks of the UI. On a smaller device like a phone, the Fragments may be displayed one per Activity. On a larger device like a tablet, the Fragments may be displayed right beside each other. Fragments have their own lifecycle which runs in parallel with the Activity’s lifecycle. The onAttach, onCreate, onCreateView, onActivityCreated, onStart, onResume, onPause, onStop, onDestroyView, onDetach are some of the methods in the lifecycle of a Fragment.
Introduction to Fragments

This video shows an example of Fragment lifecycle in Android by printing the different methods to Log-cat as they are called by the Android system. The example simply adds a Fragment to an Activity and tries doing several things such as starting the app, exiting from the app by minimising it, exiting from the app by pressing the back button, rotating the screen and so on. The methods onAttach, onCreate, onCreateView, onActivityCreated, onStart, onResume, onPause, onStop, onDestroyView, onDestroy, onDetach are called at different times depending on what the user is doing with the app.
Fragment Lifecycle Demo

This video illustrates the lifecycle of a Fragment in conjunction with the lifecycle of an Activity. The Log-cat shows the sequence of method calls from both the Activity and the Fragment at the same time. The Fragment methods include onCreate, onCreateView, onViewCreated, onActivityCreated, onStart, onRestart, onResume, onPause, onStop, onDestroy, onDestroyView and onDetach whereas the activity methods include onCreate, onStart, onResume, onPause, onStop and onDestroy
Fragment Activity Combined Lifecycle

This video shows how to add a Fragment to XML directly. In the first step, create an activity and its layout file. Create a class that extends the or and override the onCreateView method. Define a layout for the fragment that contains all the UI widgets which you want to display inside the Fragment. Link this layout inside onCreateView using a Layout Inflater. Create the fragment tag in the XML layout of the Activity and specify the class attribute to point to the Java class file of the Fragment that you created earlier.

Preview 10:06

This video talks about FragmentManager which is an interface for interacting with Fragment objects inside of an Activity and FragmentTransaction which is an API for performing a set of Fragment operations. FragmentManager tracks a list of Fragments in the current Activity. Each Fragment can be assigned an ID or a TAG which can be used by the FragmentManager later to find it using the findFragmentById or findFragmentByTag methods. FragmentTransactions let you add, remove, replace or hide Fragments in Activities programmatically.

Introduction to Fragment Manager and Fragment Transactions

In this video we show you how to add a Fragment to an activity programmatically with the help of the FragmentManager and FragmentTransaction. Create two Fragment classes and their layout in XML. Go to the Activity where you need to add the Fragments. To get an instance of the support FragmentManager call getSupportFragmentManager. We simply call beginTransaction using the object of the FragmentManager which we just retrieved. Now we add or replace Fragments by creating their objects in code and assigning an ID or TAG so that we can retrieve them later using the findFragmentById or findFragmentByTag methods.
Adding Fragments Through Code

This video talks about a fragment that displays a dialog window, floating on top of its activity's window called a DialogFragment in Android. This fragment contains a Dialog object, which it displays as appropriate based on the fragment's state. Control of the dialog (deciding when to show, hide, dismiss it) should be done through the API here, not with direct calls on the dialog. You can implement one either using the Fragment approach in which case you use the onCreateView method or the Dialog approach in which case you use the onCreateDialog approach. Create an XML layout of the Dialog that you want to display. Create a class that extends from DialogFragment. Override the onCreateView method or the onCreateDialog method depending on your chosen approach. Construct the object of a DialogFragment inside your activity and simply call the show method to display the Dialog or dismiss method to destroy the Dialog.

Introduction to Dialog Fragments

This video shows how to create the XML layout for the Dialog responsible for adding items in our Bucket Drops app. In the first step we create the layout file with a RelativeLayout as the root element, it has a TextView that displays “Add a Drop” followed by an ImageButton to let the user close the Dialog. We have an EditText below to let the person enter their drop or goal and a custom Date Picker that lets them set the Date below this followed finally by the Button that lets you add a drop. We use the Android Studio Drawable Importer plugin to add the necessary icons.
Setup Dialog Add in XML

This video shows how to add the DialogFragment in code for adding drops to our database. In the first step, we create a class that extends DialogFragment, in the next step we override the onCreateView method and link the XML layout which we created in the last video. We create an on click listener inside our Activity which will be triggered when the users tries to add a new drop. Then we create an object of our DialogFragment class and call the show method that accepts a FragmentManager or a FragmentTransaction. We filter the input entered by the user using an inputType and finally add another ClickListener inside the Dialog to dismiss it when the person tries to close the Dialog.

Setup Dialog Add in Java
Saving Data With Realm
4 Lectures 41:33
This video talks about Realm database which is a replacement for SQLite & Core Data. Realm is not an ORM on top of SQLite. Instead it uses its own persistence engine, built for simplicity (& speed). Thanks to its zero-copy design, Realm is much faster than an ORM, and is often faster than raw SQLite as well. Realm supports iOS & OS X (Objective-C & Swift) & Android. You can share Realm files across platforms, use the same high-level models for Java, Swift & Objective-C, and write similar business logic on all platforms. Realm supports advanced features like Encryption, graph queries, and easy migrations. We discuss realm data types such as boolean, short, int, long, float, double, data and so on. Extend the RealmObject add private fields and public getter and setter methods to let Realm use your object as a Table where data can be inserted or retrieved. Realm supports transactions where you can write objects to realm and then commit the transaction or rollback if something failed. Realm transactions are either synchronous which is the default behaviour or they can be asynchronous if you supply a callback to the executeTransaction method. Realm supports 1 to 1, 1 to many and many to many relationships easily with the help of the model itself. Use a RealmList to model many objects in a relationship.
Preview 11:42

This video talks about realm queries in Android. Get an instance of the RealmObject for your class, call the where method to specify the name of the class or table to fetch results from, the equalTo method to specify conditions on instance variables of the class, find method or its variants to get a list of objects from the realm database that satisfy the given query which returns a RealmResults object. If you use the findAsync method, the query will be executed asynchronously and our RealmResults object will need a registered RealmChangeListener which has a single method called onChange which is called when the results are loaded. To sort results, you can use allObjects and allObjectsSorted variations, to compare values you can use methods such as between, greaterThan, lessThan, greaterThanOrEqualTo and lessThanOrEqualTo, equalTo, notEqualTo method. Use the sum, min, max and average methods to work with numerical results as a collection. To remove objects, begin a transaction and simply call removeFromRealm on a single object or clear on a RealmList or RealmResults object and commit the transaction.
Realm Queries

This video talks about the advanced parts of realm android. The realm database file is located by default in the data/data/files/ directory and you get an instance of the default database by saying getInstance. You can create your own Realm database file for which you need to supply a RealmConfiguration object. It controls several aspects such as whether you want to perform encryption, your database version and so on. We set the default configuration after creating it by calling Realm.setDefaultConfiguration. RealmList or RealmResults or RealmObjects cannot be passed across different threads. To get the same results across threads, query the same results again. When you are done using Realm, don’t forget to close Realm instances. To directly load JSON object into the database, use createObjectFromJson method and to load a JSON array into the database directly, use the createAllFromJson method. When realm model is edited, don’t forget to change the schema number of the database or write a custom migration which basically enables realm to maintain data in the new table’s format. Realm provides a RealmBaseAdapter that lets you integrate the database directly with ListView or GridView
Advanced Realm Concepts

This video shows how to insert data into android realm database. Create a model class that extends from RealmObject, define a list of instance variables that will act as columns in the table the class will act as the table itself, add a few getter and setter methods that are needed to read and update values to the Realm database. Add the dependency for Realm in build.grade file and hit sync now. Simply create a plain object of the model class, set the required values using the model setter or constructors, get an instance of realm, begin a transaction, write the values and commit the transaction. To see if the data was successfully saved, use the Realm Browser to view the database file with the help of the Android Monitor.
Add Drop to Realm Database
7 More Sections
About the Instructor
Vivek Ramesh
4.4 Average rating
1,965 Reviews
41,739 Students
3 Courses
Founder of slidenerd

Once upon a time, my teacher asked me to write a program to check if the input is leap year. I went to my teacher and asked him "Sir, can you please explain why you wrote if(i%4==0)?". He told me to get lost saying "I ll never learn programming" 

Are you like me whose teacher writes code and never explains why? You have finally come to the right instructor on Udemy who teaches you now just how to code but also why

I have taught 100000+ people so far on my channel slidenerd which is rated as one of the topmost sources in the world to learn Android or IOS and other aspects of mobile development and general programming by several online blogs and forums. I have made several hundred videos on YouTube over the years and many of them are at the top of the search results on YouTube and Google.

I have real world teaching experience and a degree in IT Engineering. with more than 10 years of coding experience. I have won several coding challenges in the meantime. What do you say? we learn the how, what, why behind everything together?

Gary Simon
4.4 Average rating
3,149 Reviews
48,621 Students
11 Courses
Professional Freelance Designer & Course Instructor

Gary Simon is a professional freelance graphics and web designer with well over a decade of experience. Having served over a thousand clients, Gary understands many facets of the design industry.

He has also been a course instructor for several of the top online education websites, teaching a wide range of topics including:

  • Web Design
  • Graphic Design
  • Mobile / GUI Design
  • 3D
  • Motion Graphics

Gary began designing websites in 2000, and just a few years later started focusing on identity design. From that point on, Gary grew a large clientele that allowed him to fully develop skills that extend beyond design alone.

The following is a list of web technologies in which Gary is proficient:

  • HTML & CSS (Responsive)
  • JavaScript & jQuery
  • XML
  • PHP
  • MySQL

He is also an expert with the following software:

  • Adobe Photoshop
  • Adobe Illustrator
  • Adobe After Effects

Gary began teaching his skills to others after releasing a single logo design tutorial, which has since garnered over a million views. In 7 years, Gary has released over 200 video tutorials and 20+ video courses. On his Youtube channel alone, his videos receive a half million views monthly. He enjoys connecting with students and helping them develop their skills on an on-going and frequent basis.