Skip to content

Instantly share code, notes, and snippets.

View Manikkumar1988's full-sized avatar

Manikkumar Manikkumar1988

View GitHub Profile
@lopspower
lopspower / README.md
Last active August 20, 2023 09:32
How to Analyze & Manage Memory on Android Like a Boss

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

@diegopacheco
diegopacheco / gradle-args.txt
Created July 30, 2015 17:32
How to get Parameters/Arguments in Gradle Command line / Console?
[build.gradle]
if ( project.hasProperty("myARG") ) {
// do something
} else {
// do something else
}
[CONSOLE]
$ gradle -PmyARG=true
@emanuelet
emanuelet / ExampleAdapter.java
Last active September 16, 2017 12:20
Generic List Adapter for Firebase
/**
* This class is an example of how to use FirebaseListAdapter. It uses the ExampleObject class to encapsulate the
* data for each individual chat message
*/
public class ExampleAdapter extends FirebaseListAdapter<ExampleObject> {
@InjectView(R.id.example_list_item)
TextView exampleView;
public DealListAdapter(Query ref, Activity activity, int layout) {
super(ref, ExampleObject.class, layout, activity);
@wwsun
wwsun / MyArrayList.java
Created May 7, 2015 08:32
A basic ArrayList implementation(Java)
package me.wwsun.list;
import java.util.Iterator;
/**
*
* @param <E> is the type of elements in this list
*/
public class MyArrayList<E> implements Iterable<E> {
@malalanayake
malalanayake / ArrayList.java
Created June 15, 2014 01:53
ArrayList Implementation
import java.util.Arrays;
/**
* Simple ArrayList Implementation for Java Beginners
*
* @author malalanayake
*
*/
public class ArrayList {
private Object[] data;
@swenson
swenson / gist:cf74cd8e282443b43b8a
Created May 21, 2014 15:51
Google Interview Study Guide
Author unknown.
1.) Algorithm Complexity: You need to know Big-O. If you struggle with
basic big-O complexity analysis, then you are almost guaranteed not to
get hired.
For more information on Algorithms you can visit:
http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=alg_index
2.) Coding: You should know at least one programming language really
well, and it should preferably be C++ or Java. C# is OK too, since
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 14, 2025 04:34
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@laaptu
laaptu / SmoothInterpolator
Created September 17, 2013 07:52
Android smooth interpolator as per Cyril Mottier
//as per cyrilmottier.com/2012/05/22/the-making-of-prixing-fly-in-app-menu-part-1/
public class SmoothInterpolator extends LinearInterpolator {
@Override
public float getInterpolation(float input) {
return (float) Math.pow(input - 1, 5) + 1;
}
}
@ErikHellman
ErikHellman / Activity showing surface switch
Created June 22, 2013 09:17
A simple demo of playing a video on one SurfaceView and switching to another during playback.
package com.example.mediaplayersurfaceswitch;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
@rafali
rafali / BackgroundTransitionView.java
Last active September 16, 2017 09:51
Background transition on Android
TransitionDrawable transition = (TransitionDrawable) view.getBackground();
if (toggle) {
view.startTransition(1200);
} else {
view.reverseTransition(1200);
}