Loading Imagefile to imageview using Bitmap

This is the simple way to load file into the imageview without using any Lib.

To load file into imageview you need file path

File imgFile = new  File("/sdcard/Images/test_image.jpg");if(imgFile.exists()){
Bitmap myBitmap=BitmapFactory.decodeFile(imgFile.getAbsolutePath());
myImageView.setImageBitmap(myBitmap);
}

Loading With Glide

Glide is a fast and efficient open…

The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite. In particular, Room provides the following benefits:

  • Compile-time verification of SQL queries.
  • Convenience annotations that minimise repetitive and error-prone boilerplate code.
  • Streamlined database migration paths.

Setup

To use Room…

There are so many pattern you can follow in android app development for designing Architecture of your application like MVVM,MVC,MVP.

MVP pattern overcomes the challenges of MVC and provides an easy way to structure the project codes. The reason why MVP is widely accepted is that it provides modularity, testability…

When there is requirement for loading web of term and condition we. are wondering how to do that and what are the basic config to do so here it is.

Create an Activity and add below code in its mainactivity.xml file

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation = "horizontal"
android:layout_width =…

In Previous Part we have completed basic setup of the Room Database,Now we are moving to how to integrate the ROOM database with MVVM pattern.

Dependancy that are required:

//Kotlin Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
// Lifecycle components
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.3.1"
implementation 'android.arch.lifecycle:runtime:1.1.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"…

The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite. In particular, Room provides the following benefits:

  • Compile-time verification of SQL queries.
  • Convenience annotations that minimise repetitive and error-prone boilerplate code.
  • Streamlined database migration paths.

Setup

To use Room…

Rajendrakumar Dabhi

Android Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store