Posts

Showing posts from April, 2018

Android Bottom Sheet (Kotlin)

Image
     DESCRIPTION      This tutorial is about:  How to create bottom sheet using Fragment  How to handle bottom sheet item/option clicks      VIDEO           SOURCE CODE      Step 1:  Create a new Project  or  open new project Step 2:  Add following library in build.gradle(Module:app)             implementation  'com.android.support:design:27.1.1' Step 3:  Create a fragment name it as "BottomSheetEx". Step 4: Code build.gradle(Module:app) apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 27 defaultConfig { applicationId "com.blogspot.devofandroid.bottomsheet_kotlin" minSdkVersion 16 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentation...

Android Bottom Sheet

Image
     DESCRIPTION      This tutorial is about:  How to create bottom sheet using Fragment  How to handle bottom sheet item/option clicks      VIDEO           SOURCE CODE      . Step 1:  Create a new project   OR   Open your project Step 2:  Add following library in build.gradle(Module:app)              implementation 'com.android.support:design:27.1.1' Step 3: Create a fragment name it as "BootomSheetEx". Step 4: Code build.gradle(Module:app) apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.blogspot.devofandroid.bottomsheet" minSdkVersion 16 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes {...

PDF reader app - Android Studio Tutorial

Image
     DESCRIPTION      This tutorial is about: ✓Create PDF app. ✓Display Specific or all pages from PDF ✓Display PDF from Assets folder. ✓Add padding between pages ✓Passwords ✓Scroll PDF pages vertically or Swipe horizontally.      VIDEO           SOURCE CODE      Step 1:  Create a new project   OR   Open your project Step 2:  Add following library in build.gradle(Module:app)    implementation 'com.github.barteksc:android-pdf-viewer:3.0.0-beta.5' Step 3: Create Assets folder and place a pdf file in that folder. Step 4: Code build.gradle(Module:app) apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.blogspot.atifsoftwares.pdfapp" minSdkVersion 16 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.su...

AlertDialog with custom layout (Kotlin)

Image
How to create Create AlertDialog With Custom Layout (Kotlin)?      DESCRIPTION      This tutorial will show how to create and show an AlertDialog with C ustom Layout containing views such as EditTexts and Buttons etc. We will show AlertDialog on Button click. Custom layout will contain three EditTexts and two Buttons . When information is entered in EditTexts , Press Login Button , Dialog will be dismissed, and the information will be set to the TextView .      VIDEO           SOURCE CODE      Step 1:  Create a new Project  or  open new project Step 2: Create new Layout Resource file 'login_dialog.xml' under res>layout folder Step 3: Code activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= "http://schemas.android.com/apk/res-auto" xmlns:too...

Book App using SQLite - Android Studio Tutorial

Image
     DESCRIPTION      This tutorial is about creating the Book App using SQLite. I'll use Tabbed Activity, swipe to change the page. Each record in SQLite file contains Id(as page no), Chapter Name, Title, Detail.      VIDEO           SOURCE CODE      Step 1:  Create a new project   OR   Open your project  (Use Tabbed Activity) Step 2: Create assets folder. Place 'mybook' SQLite file in assets folder Step 3: Code Model.java package com . blogspot . devofandroid . bookappusingsqlite ; public class Model { int ids ; String chapters ; String titles ; String details ; //constructor public Model ( int ids , String chapters , String titles , String details ) { this . ids = ids ; this . chapters = chapters ; this . titles = titles ; this . details = details ; } public ...