Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Muhammad Umair Adil umair13adil

💭
I may be slow to respond.
Block or report user

Report or block umair13adil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@umair13adil
umair13adil / Dependencies
Last active Jan 19, 2019
Encrypting images using AES in Android with Kotlin + Glide + RxJava2
View Dependencies
dependencies {
//RxJava2
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.3'
implementation 'io.reactivex.rxjava2:rxkotlin:2.2.0'
//Glide
implementation 'com.github.bumptech.glide:glide:4.8.0'
kapt "androidx.lifecycle:lifecycle-compiler:2.1.0-alpha01"
@umair13adil
umair13adil / RxJava2 + Realm
Last active Mar 8, 2018
Flowables (RxJava2) with Realm
View RxJava2 + Realm
var tasksList: RealmList<Tasks>
tasksList = RealmList()
getPendingTasks(3)
.flatMapIterable { it -> it }
.concatMap { task ->
getPendingSubTasks(task.id)
.doOnNext {
//Here we are binding subtasks to individual task item
bindChildTasks(it, task)
@umair13adil
umair13adil / RxJava2UnitTest.java
Last active Feb 13, 2018
RxJava2 FlatMap,SwitchMap,ConcatMap TestCases in Kotlin
View RxJava2UnitTest.java
import io.reactivex.Observable
import io.reactivex.schedulers.TestScheduler
import org.junit.Test
import java.util.*
import java.util.concurrent.TimeUnit
class ExampleUnitTest {
@Test
@Throws(Exception::class)
@umair13adil
umair13adil / MergeUnitTest.java
Last active Jan 19, 2018
RxJava Merge Lists Test in Kotlin
View MergeUnitTest.java
import io.reactivex.Observable
import io.reactivex.schedulers.TestScheduler
import org.junit.Test
import java.util.concurrent.TimeUnit
class MergeUnitTest {
@Test
@Throws(Exception::class)
fun mergeSimple() {
@umair13adil
umair13adil / LoginActivity.java
Last active Jan 15, 2018
Android Simple Login with Retrofit2
View LoginActivity.java
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.TextInputLayout;
import android.support.v4.widget.NestedScrollView;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatButton;
import android.support.v7.widget.AppCompatEditText;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
You can’t perform that action at this time.