Skip to main content

Posts

Showing posts from 2017

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

PDF Creator using iTextG Library

In this tutorial we will discuss, how to create pdf document in Android using the iTextG library. iTextG is a very popular multiplatform library for creating and manipulating PDF documents programmatically. It is available for Java, .Net, Android androidd other platforms. We will create a simple android pdf creater app, where you can add some text and create a pdf for that text. To keep this simple, we will use only text for creation of pdf in this tutorial, in later tutorials we will have a more thorough discussion involving images, tables and fonts. The following sample will give you clear picture to create PDF 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 :nam

Multi-Language Supported Application by Localization

To build multilingual Android apps we need to put bit effort in translating the content of the App and putting them in the appropriate folders. While localizing, you should consider using appropriate text, audio, currency, numbers and graphics depending upon the region or country. But this tutorial only covers localizing strings i.e supporting multiple languages.  Localizing with Resources  explains about other things should be considered when localizing your app. 1. How String Localization Works  By default android considers English as primary language and loads the string resources from res ⇒ values ⇒ strings.xml. When you want to add support for another language, you need to create a values folder by appending an Hyphen and the ISO language code. For example if you want to add support for French, you should create a values folder named values-fr and keep a strings.xml file in it with all the strings translated into French language. In brief the localization works as fo