Skip to content

Instantly share code, notes, and snippets.

View shihabmi7's full-sized avatar
🎯
Focusing

Muhammad Shihab Uddin shihabmi7

🎯
Focusing
  • Malaysia
View GitHub Profile
@shihabmi7
shihabmi7 / build.gradle
Last active December 1, 2016 06:19 — forked from jackgris/build.gradle
Example of use from Proguard, from Android Studio
buildscript {
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'
@shihabmi7
shihabmi7 / gist:44906e0d9962e22b67f0
Created November 21, 2015 05:09
Google Map Location
private GoogleApiClient mGoogleApiClient;
private LocationRequest mLocationRequest;
protected Location mLastLocation;
protected synchronized void buildGoogleApiClient() {
// set which Service API you used
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
public void imageSlider() {
final Handler mHandler = new Handler();
// Create runnable for posting
final Runnable mUpdateResults = new Runnable() {
public void run() {
AnimateandSlideShow();
@shihabmi7
shihabmi7 / gist:6db21ceed3c73e97d80d
Last active November 21, 2015 04:47
Sliding Menu Code
compile project('libraries:sliding_menu_library')
public void initializeSlidingMenu() {
menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
menu.setBehindOffset(200);
menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
menu.setMenu(R.layout.activity_sliding_menu);
@shihabmi7
shihabmi7 / DemoFoodListAdapter
Last active October 6, 2015 09:22
Pinned Section Listview
public class DemoFoodListAdapter extends BaseAdapter implements PinnedSectionListAdapter{
// i am following this library @aamir & @sweetwisher
// https://github.com/beworker/pinned-section-listview
private final Context mContext;
ArrayList<Food> foodList;
DisplayImageOptions options;
ImageLoader imageLoader = ImageLoader.getInstance();