Langsung ke konten utama

Postingan

Menampilkan postingan dari Juni, 2017

Kotlin Android Extensions

Kotlin Android Extensions is an important Kotlin plugin that is similar to Butterknife. It will allow to recover views in android. Implementation Add the following plugins in your app level build.gradle file apply plugin:'com.android.application' apply plugin:'kotlin-android' apply plugin:'kotlin-android-extensions' Coding Part Create a new layout file in res folder, name it as activity_main.xml and paste the following codes <?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:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" tools:context="com.androidmads.kotlinsample_helloworld.MainActivity"&g

Firebase Phone Authentication - Example

Hi Friends. In this tutorial, we will learn how to implement firebase phone authentication with it's origin. Digits is an Simple User Phone Authentication Service to create easy login experience. Now Digits is acquired by Google's Firebase and it provides free service for limited amount of authentication per month. However, if you need to sign in a very high volume of users with phone authentication, you might need to upgrade your pricing plan. See the pricing  page.  You can use Firebase Authentication to sign in a user by sending an SMS message to the user's phone. The user signs in using a one-time code contained in the SMS message. Setup Firebase To setup firebase in your project, read previous post . After setting up, open Authentication sign in method and enable phone authentication method. You should Add SHA Fingerprint in your application. To get SHA Fingerprint use the following Code with Command Prompt in Windows keytool -list -v -keystore "%USERPROFILE%\.and

Circle Image View using Glide and Picasso in Android

Hello guys, In this tutorial we will learn how to create Circular Image View in Android without using any additional Libraries such as CircleImageView . // This Library is very Popular and Widely used for Circle Image View compile 'de.hdodenhof:circleimageview:2.1.0' Nowadays, Every Android Developers uses Glide  or Picasso Image HTTP Libraries to Image in Image Views. If we uses any additional Libraries to get Circle Shaped Image View may lead to increase the size of an APK. To avoid this, Glide and Picasso provides solution to create Circle Image View. First, we will see how create circle image using Picasso. Circle Transformation using Picasso Download Picasso by Gradle in Android // This Library is created by Square.Inc compile 'com.squareup.picasso:picasso:2.5.2' The following snippet is used to load image into ImageView using Picasso Picasso.with(getApplicationContext()).load("http://i.imgur.com/DvpvklR.png") .placeholder(R.mipmap.ic_launcher)