Skip to content

Instantly share code, notes, and snippets.

package net.stf.threelevelexpandablelistview;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.ExpandableListView;
@a4ankur
a4ankur / build.sh
Created May 1, 2016 14:03 — forked from xxnjdlys/build.sh
generate origional apk
#!/bin/bash
# build script for wkremote
#######################################
# abort script on any failure
set -e
# check if necessary tools exists
type zipalign >/dev/null 2>&1 || { echo >&2 "zipalign required but it's not installed. Aborting."; exit 1; }
type java >/dev/null 2>&1 || { echo >&2 "java required but it's not installed. Aborting."; exit 1; }
@a4ankur
a4ankur / coloredLogcat.md
Created May 1, 2016 14:02 — forked from marcjubero/coloredLogcat.md
Colored Logcat - Android Studio

#####Logcat Colors for IntelliJ Darcula Theme (original post)

  • Preferences -> Editor -> Android Logcat
  • "Save As" scheme
  • Uncheck "Use inherited attributes" option
  • Edit foreground color with the following
Debug   : #6897BB 
Info : #6A8759 
@a4ankur
a4ankur / liveTemplates.md
Created May 1, 2016 14:01 — forked from marcjubero/liveTemplates.md
Android Studio - Live Templates

Android Studio - Live Templates

Using Settings panel:

  • Settings - Editor - Live Templates
  • Add Live Template or create a Template Group. Choose the Template Group option will create an .xml file with the same name of the Template Group you defined before.
  • The .xml file can be found in a different folder, depends on the operating system.

Example:

Log.e(TAG,MESSAGE);
@a4ankur
a4ankur / android_studio_shortcuts.md
Created May 1, 2016 14:01 — forked from a7an/android_studio_shortcuts.md
Compiling a list of Android Studio Shortcuts that I use regularly

Android Studio Notes

Useful Keyboard Shortcuts for Windows

  • CTRL-B go to declaration
  • CTRL-SLASH comment/uncomment line
  • CTRL-SHIFT-A find action
  • CTRL-F9 make/build project
  • ALT-ENTER Auto complete
  • CTRL-ALT-LEFT navigate back to previous code
  • SHIFT-F9 Debug app
===================================
** Credits Fragmented Podcast **
===================================
1.Be Pragmatic as possible(Never over analyze it don't spend too much time on it).
2.Best machine you can get for productivity(SSD).
3.Continous improvement(small things make big changes).
4.structural find and replace android studio
5.Learn design patterns??(show notes for weblinks).
6.Gradle offline is little faster.
7.fomo--->Fear of missing out.(understand u can't learn all when time comes, learn at that time.)
@a4ankur
a4ankur / android.md
Created May 1, 2016 14:00 — forked from 02karthik/android.md
Android Cheat Sheet

Android Cheat Sheet

Developer tips

Record a video of your app

Developer options -> Check show touches
adb shell screenrecord /sdcard/video.mp4
adb pull /sdcard/video.mp4
/**
* configures the code driving the build.
* In this case, this declares that it uses the Maven Central repository,
* and that there is a classpath dependency on a Maven artifact.
* Note: This only affects the code running the build, not the project.
* The project itself needs to declare its own repositories and dependencies. This will be covered later.
*/
buildscript {
repositories {
mavenCentral()
@a4ankur
a4ankur / gist:2419442
Created April 19, 2012 07:39 — forked from anonymous/gist:807968
Background Service
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import android.app.Notification;