Hey, friends here is an CRUD Operations using Jetpack Components: Data Binding, Navigation and Room Database demo app. You may already know that we have SQLite database in android that we can use as a local SQL Database for our android application but now there is one more that is ROOM Database which is a part of Android Jetpack.

⭐Bonus In this application is that you will also get to know how to add welcome screens and splash screen in an application.

Android Jetpack Components which is used in this application are:

1. Data Binding
2. Drawer Navigation.
3. Room Database.











Read More

Ripple touch effect was introduced with material design in Android 5.0 (API level 21).
Touch feedback in material design provides an instantaneous visual confirmation at the point of contact when users interact fwith UI elements. For example, buttons now display a ripple effect when they are touched - this is the default touch feedback animation in Android 5.0. Ripple animation is implemented by the new RippleDrawable class. The ripple effect can be configured to end at the bounds of the view or extend beyond the bounds of the view. For example, the following sequence of screenshots illustrates the ripple effect in a button during touch animation:
touch
Initial touch contact with the button occurs in the first image on the left, while the remaining sequence (from left to right) illustrates how the ripple effect spreads out to the edge of the button. When the ripple animation ends, the view returns to its original appearance. The default ripple animation takes place in a fraction of a second, but the length of the animation can be customized for longer or shorter lengths of time.
Note that the ripples will only show up on devices running Lollipop, and will fall back to a static highlight on previous versions.












Read More

The RecyclerView class supports the display of a collection of data.
It is a modernized version of the ListView and the GridView classes provided by the Android framework. Recycler view addresses several issues that the existing widgets have. It enforced a programming style that results in good performance. It also comes with default animations for removing and adding elements.
RecyclerView allow to use different layout managers for positioning items.
Recycler view uses a ViewHolder to store references to the views for one entry in the recycler view. A ViewHolder class is a static inner class in your adapter which holds references to the relevant views. With these references your code can avoid the time-consuming findViewById() method to update the widgets with new data.

Components of a RecyclerView

LayoutManagers

RecyclerView needs to have a layout manager and an adapter to be instantiated. A layout manager positions item views inside a RecyclerView and determines when to reuse item views that are no longer visible to the user.
RecyclerView provides these built-in layout managers:
  • LinearLayoutManager shows items in a vertical or horizontal scrolling list.
  • GridLayoutManager shows items in a grid.
  • StaggeredGridLayoutManager shows items in a staggered grid.
To create a custom layout manager, extend the RecyclerView.LayoutManager class.
Here is Dave Smith's talk on the custom layout manager
Notes: In the recent version of the Support Library, if you don't explicitly set the LayoutManager, the RecyclerView will not show! There is a Logcat error though E/RecyclerView: No layout manager attached; skipping layout

RecyclerView.Adapter

RecyclerView includes a new kind of adapter. It’s a similar approach to the ones you already used, but with some peculiarities, such as a required ViewHolder. You will have to override two main methods: one to inflate the view and its view holder, and another one to bind data to the view. The good thing about this is that the first method is called only when we really need to create a new view. No need to check if it’s being recycled.

ItemAnimator

RecyclerView.ItemAnimator will animate ViewGroup modifications such as add/delete/select that are notified to the adapter. DefaultItemAnimator can be used for basic default animations and works quite well. See the section of this guide for more information.

Using the RecyclerView

Using a RecyclerView has the following key steps:
  1. Add RecyclerView AndroidX library to the Gradle build file
  2. Define a model class to use as the data source
  3. Add a RecyclerView to your activity to display the items
  4. Create a custom row layout XML file to visualize the item
  5. Create a RecyclerView.Adapter and ViewHolder to render the item
  6. Bind the adapter to the data source to populate the RecyclerView
The steps are explained in more detail below.

Installation

Make sure the RecyclerView AndroidX library is listed as a dependency in your app/build.gradle:
dependencies {
    ...
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
Click on "Sync Project with Gradle files" to let your IDE download the appropriate resources












Read More

About the project :
This is Shopping Cart Application using PHP and MySQL includes JSON, POST methods and RESTful API. Also used POST method and RESTful APIs. This whole project has only one concept, that is to provide the wide range of products to their customers. You can select any type of product you want to buy. Here, when you run the project you can see the welcome screen (animation) of this project.
In order to run the project, first, install Android Studio and XAMPP server to make your laptop/computer as your local server. Here, in this project, you can select different types of products like clothes, car, mobiles, music and much more items. Then from those options, you can select any type of product you want to buy.
Features of the project:
  • E-Commerce app using .
  • Use of Animation on starting.
  • Added Option Menu.
  • Added Context Menu.
  • Shared Preference for Registration and Login (If you are already a user then you won't have to login again and again whenever activity start).
  • Logout Function from App.
  • Custom Drawer.
  • Custom ListView.
  • Add to card option.
  • Add and Decrease quantity to buy products.
  • Cart view from any activity.
Steps and Requirements :
1) Install Android Studio and XAMPP server.
2) Download php file here
  1. After installing you'll have a xampp folder in C: drive if you installed it there.
  2. In xampp there will be a htdocs folder
  3. Extract the zip file and place the php code in htdocs folder.
3) Run XAMPP.

4) Open http://localhost/phpmyadmin/ in your browser. 

5) Create the database by the name of Shopee.

6) Create tables in PhpMyAdmin.
    This is how its look like.

7) For registration create user_info name table with 4 columns( name, email, pass, confirmpass) .


8) Now create categories table with 2 columns(catname and catsubname).
9) Now create the remaining table mentioned in point 6 with 3 columns (name, price description).
example: Datebase name mobile.
10) Take a deep look and do not change the keywords as shown in image. 

11) Your server setup is ready now download the source code (Rename zip file to Shopee) and run on Android Studio (May be you need to update plugins).

12) Give internet permissions in AndroidManifest.xml
























IMPORTANT - PHP Files


NOTE- Extract the zip file and place the php code in htdocs folder on your C: drive











Read More

About Me

My photo
I work as an Analyst in HCL Technologies. Android App Development is my hobby. As a passionate technology lover, you need to keep yourself updated with trending technologies. The best way to learn and stay up to date is simply to do something creative. I’ve a number of small personal app projects and each one have been rewarding and useful in one way or the other.