Skip to main content

Posts

Recyclerview Sample

Android RecyclerView is more advanced version of ListView with improved performance and other benefits. Using RecyclerView and CardView together, both lists and grids can be created very easily. Here is the complete information about RecyclerView and other examples. In this tutorial we are going to learn how to render a simple RecyclerView with a custom layout. We’ll also learn writing a adapter class, adding list divider and row click listener.  Before you start, make sure that you updated your Android Studio to latest version. Currently my Android Studio is updated to Android Studio 3.0. 1. Creating New Project  1. In Android Studio, go to File ⇒ New Project and fill all the details required to create a new project. When it prompts to select a default activity, select Blank Activity and proceed. 2. Open build.gradle and add recycler view dependency. com.android.support:recyclerview-v7:26.1.0 and rebuild the project. apply plugin : 'com.android.appli

Android Sliding Menu using Navigation Drawer(Only Activity)

In this tutorial we’ll implement a Navigation Drawer using only Activity in our android application. Android navigation drawer is a sliding menu and it’s an important UI component. Android Navigation Drawer Android Navigation Drawer is a sliding left menu that is used to display the important links in the application. Navigation drawer makes it easy to navigate between those links. It’s not visible by default and it needs to opened either by sliding from left or clicking its icon in the ActionBar. In broader terms, Navigation Drawer is an overlay panel, which is a replacement of an activity screen which was specifically dedicated to show all the options and links in the application. Example This sample will explain how to do a Navigation Drawer using only Activities To implement the Navigation Drawer we first need to add android.support.v4.widget.DrawerLayout as the root of the activity layout as shown below. navigation_drawer.xml <android.support.v4.widget.Drawe

Create PDF using iTextG with Table Design

In previous tutorial  PDF Creator using iTextG Library  we discussed hoe to create PDF using iTextG library. In this tutorial we will see how to design a PDF in Table format Before going to this tutorial make sure how to create a PDF using iTextG Library  PDF Creator using iTextG Library The following sample will give you clear picture to create PDF in Table format Create a New project Add dependencies and permissions for Writing Local Storage Add the to your apps Gradle file: build.gradle compile 'com.itextpdf:itextg:5.5.10' To create a Pdf file, our app will need the some permissions, open your project’s AndroidManifest.xml and add the following permission. AndroidManifest.xml < uses-permission android :name= "android.permission.WRITE_EXTERNAL_STORAGE" /> < uses-permission android :name= "android.permission.READ_EXTERNAL_STORAGE" /> activity_main.xml <?xml version="1.0" encoding="utf-8"?> <Line