Search In Blog
Want to donate?
Recent Posts: My Android Solutions
Under src/main add new directory named “assets“. Inside this directory add your json file. Create a Utils class to add the method that will read your json file from assets. Now in your activity you can parse the json file like this: A concrete example is this: json file
In this tutorial I will create a simple Sectioned RecyclerView that will show 2 sections and a few items in each section and how to move an item from one section to another. Note: For RecyclerView I used androidx imports and not android.support.v7.widget.RecyclerView build.gradle First let’s add the code for xmls: activity_main.xml Below we will…
Recently, I had to add a perfect square CardView and I wanted to achieve this without hardcoding its width and height. I happily discovered the power of ConstraintLayout and this is how I managed to create a perfect square which should work on every dimension. In my project I created a RecyclerView with 2 columns,…