Categories
Studio

Room Persistence Library: Insert, Save, Delete

Previously, we got to know how to setup and implement Room library into our project. In this article, we’ll get to know how to insert, save and delete objects or populate or SQLite tables. In MainActivity, I’ll first define the app database. private AppDatabase appDatabase;@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); appDatabase = AppDatabase.getDatabase(this);} Insert First […]

Categories
Studio

Room Persistence Library: Implementation

After fiddling with Room library for two days, Finally, I learned to implement it the right way. Google’s Codelabs is not a friendly way to learn new things rather you can read those tutorials after leaning a new thing. I got to learn to implement this library with the help of these sources: Youtube (This guys tutorials are such simple) Mindorks […]

Categories
Studio

How to Create and Publish a Library for Android using Jitpack(Public)

If you use a module (can be a utility class) in more than two projects, you should consider creating a library and use it for your future projects and also share it to the world to make Android community a better place. Today, I will explain how to create a public library for Android and […]

Categories
Studio

Solution to “Cannot resolve symbol GlideApp” – Glide Library v4 error

I have been using Glide library for displaying images for my projects since 2015. This library saves too much of code and efforts. But this is not what it used to be back then. To use the advanced features like placeholder(), centerCrop(), etc. you have to use GlideApp. Glide v4 requires you to GlideApp use […]

Categories
Studio

Facebook Rebound with RecyclerView Items – The Best Spring Animation

If you see Facebook’s profile on Github, you’ll find quite a lot of libraries from them. One of them is Rebound. Facebook explains this library as: Rebound spring models can be used to create animations that feel natural by introducing real world physics to your application. To get my hands on this library, I implemented […]

Categories
Studio

How to change git directory in Android Studio

I recently created a new project in Android Studio and started working on it. After writing some activity classes I added git integration to my project. But to my surprise when I pushed the project, It pushed one directory higher than my project’s root dir. It contained all the projects I had worked on. I […]

Categories
Studio

RecyclerView Swipe to Delete – Weekly Series (Day5)

Welcome to the day 5 of RecyclerView weekly series. Today we’ll learn how to implement swipe to delete functionality to your app’s RecyclerView (or CardView). We are following SSCCE guidelines to write short, self-contained, correct (compatible) example. All you need to do is initialize ItemTouchHelper.SimpleCallBack. This callback has two parameters: dragDirs and swipeDirs. We will […]

Categories
Studio

Endless Scrolling in RecyclerView (with JSON)- Weekly Series (Day4)

Those who are working with JSON and RecyclerView need endless scrolling for their app. It’s better to load the data automatically then showing pagination to the user, UX you know. Actually, this thing is very easy to implement. You just need to add a scroll listener to your RecyclerView so that we can know when […]

Categories
Studio

RecyclerView with Multiple View Types – Weekly Series (Day3)

The day3 post is here and as mentioned in the day1 post that I’ll cover a complex layout very soon, so here it is. In this tutorial, we will see how to add multiple view types to a single item in RecyclerView. The simplest example had only one item in RecyclerView viz. String. In case […]

Categories
Studio

How to set Click Listener to RecyclerView – Easy Approach (Weekly Series – Day2)

This post was initially written on Medium, But since I have started my development guide series on this blog itself, I have moved this post here. Thanks, everyone at Medium for ‘clapping’ and appreciating my writing. I have read many complex posts on how to set onClickListener to RecyclerView before settling for this easy solution. […]