Skip to content

Instantly share code, notes, and snippets.

Sally sallySalem

  • Berlin
Block or report user

Report or block sallySalem

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
@sallySalem
sallySalem / AndroidClass.kt
Created Feb 11, 2018
Use Kotlin extension function instead of `compose()` in java to reuse the code of schedulers in Rxjava
View AndroidClass.kt
//So no need to inject ioScheduler or computationScheduler
Observable.just("").applyIoScheduler()
Observable.just("").applyComputationScheduler()
Flowable.just("").applyIoScheduler()
Flowable.just("").applyComputationScheduler()
Single.just("").applyIoScheduler()
Single.just("").applyComputationScheduler()
@sallySalem
sallySalem / SortCustomList.kt
Created Feb 11, 2018
Sort a list of custom object in Kotlin
View SortCustomList.kt
//Sort Descending
customList.sortByDescending(CustomModel::date)
.apply {
view?.loadCustomList()
}
//Sort Ascending
customList.sortBy(CustomModel::date)
.apply {
view?.loadCustomList()
@sallySalem
sallySalem / README.md
Created Jan 1, 2018 — forked from lopspower/README.md
How to Analyze & Manage Memory on Android Like a Boss
View README.md

Analyze & Manage Memory on Android Like a Boss

This Blog is all about memory management in Android. It provides information about how you can analyze & reduce memory usage while developing an Android app.

Memory management is a complex field of computer science and there are many techniques being developed to make it more efficient. This guide is designed to introduce you to some of the basic memory management issues that programmers face.

Memory Management in Android

Android is a Linux based operating system. It uses native open source C libraries which power Linux machines. All the basic operating system operations like I/O, memory management and so on are handled by the Linux kernel. Like Java and .NET, Android uses its own run time and virtual machine to manage application memory. Unlike either of these frameworks, the Android run time also manages the lifetime processes. Each Android application runs in a separate process within its own Dalvik instance, relinquishing all responsibility for memo

You can’t perform that action at this time.