Posts

Showing posts from April, 2018

Bottom Sheet Dialog - Android Studio - Kotlin

Image
How to create and show Bottom Sheet Dialog In this tutorial, we will learn how to implement a  Bottom Sheet Dialog  in  Android Studio using Kotlin . Bottom Sheet Dialogs are a modern UI component from  Material Design  that slide up from the bottom of the screen to display additional content or actions without leaving the current screen. Example Use Cases: Share options Quick action menus Simple forms or confirmations >> Check For Java >> Check For Kotlin >> Check For Compose Code: layout_bottom_sheet.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width= "match_parent" android:layout_height= "wrap_content" android:orientation= "vertical" android:padding= "20dp" > <TextView style= "@style/TextAppearance.Material3.TitleMedium" android:layout_width...

Bottom Sheet Dialog - Android Studio - Java

Image
How to create and show Bottom Sheet Dialog In this tutorial, we will learn how to implement a Bottom Sheet Dialog in Android Studio using Java . Bottom Sheet Dialogs are a modern UI component from Material Design that slide up from the bottom of the screen to display additional content or actions without leaving the current screen. Example Use Cases: Share options Quick action menus Simple forms or confirmations >> Check For Java >> Check For Kotlin >> Check For Compose Code: layout_bottom_sheet.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width= "match_parent" android:layout_height= "wrap_content" android:orientation= "vertical" android:padding= "20dp" > <TextView style= "@style/TextAppearance.Material3.TitleMedium" android:layout_width=...

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 ...