Skip to content

Instantly share code, notes, and snippets.

##---------------Begin: proguard configuration common for all Android apps ----------
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
-dump class_files.txt
-printseeds seeds.txt
-printusage unused.txt
@umesh0492
umesh0492 / WrapContentHeightViewPager.java
Created June 8, 2018 12:26 — forked from egslava/WrapContentHeightViewPager.java
Wrap content height ViewPager (Android)
package org.cnii.layoutloader.ui;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.View;
/**
* Special thanks to Daniel López Lacalle for his response
* (http://stackoverflow.com/questions/8394681/android-i-am-unable-to-have-viewpager-wrap-content/20784791#20784791)
@umesh0492
umesh0492 / GreenDAOMigrateHelper
Created March 1, 2017 07:04
Green DAO Migrate Helper class
/**
* Created by umesh0492 on 15/02/16.
*/
public class GreenDAOMigrateHelper {
private static final String CONVERSION_CLASS_NOT_FOUND_EXCEPTION = "MIGRATION HELPER - CLASS DOESN'T MATCH WITH THE CURRENT PARAMETERS";
private static GreenDAOMigrateHelper instance;
public static GreenDAOMigrateHelper getInstance () {
if (instance == null) {
@umesh0492
umesh0492 / FlymeUtils.java
Created August 10, 2016 19:36 — forked from joinAero/FlymeUtils.java
Android - Helper for 3rd party roms: Flyme & MIUI.
package cc.cubone.turbo.core.rom;
import android.os.Build;
import android.view.Window;
import android.view.WindowManager;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
/**
@umesh0492
umesh0492 / Launching file
Last active May 24, 2016 07:02
Track Location Update (Tested code)
//You need to start the service
startService (new Intent (this, LocationListenerService.class));
class RecyclerViewWithMultipleViews extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private final String TAG = "SettingAdapter";
private ArrayList<SystemPreferenceStructureDbModel> preferenceList = new ArrayList<>();
private UserProfileActivity mActivity;
public RecyclerViewWithMultipleViews(ArrayList<SystemPreferenceStructureDbModel> preferenceList) {
this.preferenceList = preferenceList;
}
@umesh0492
umesh0492 / ClickToSelectEditText.java
Created February 10, 2016 16:51 — forked from rodrigohenriques/ClickToSelectEditText.java
Used to make your EditText a better option than Spinners
public class ClickToSelectEditText<T extends Listable> extends EditText {
List<T> mItems;
String[] mListableItems;
CharSequence mHint;
OnItemSelectedListener<T> onItemSelectedListener;
public ClickToSelectEditText(Context context) {
super(context);
@umesh0492
umesh0492 / PerformancePatterns.md
Created January 20, 2016 13:14 — forked from colabug/PerformancePatterns.md
Performance Patterns Notes
@umesh0492
umesh0492 / AccessibilityUtils.java
Created January 16, 2016 19:38
Android, Accessibility Service - to get events from respective application if installed and further can get data from view
package com.package.accessibility;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.content.Context;
import android.util.Log;
import android.view.accessibility.AccessibilityManager;
/**
* Created by umesh0492 on 04/01/16.
*/
@umesh0492
umesh0492 / Connectivity.java
Created January 16, 2016 19:26 — forked from emil2k/Connectivity.java
Android utility class for checking device's network connectivity and speed.
package com.emil.android.util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
/**
* Check device's network connectivity and speed
* @author emil http://stackoverflow.com/users/220710/emil