This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ImageLoader.getInstance().init(ImageLoaderConfiguration.createDefault(this)); | |
ImageLoader.getInstance().loadImage("http://dbh_cache.s3.amazonaws.com/19445/34173cb38f07f89ddbebc2ac9128303f-33b64a2ed0f1ff4750f183b4f2a161b8.png", new ImageLoadingListener() { | |
@Override | |
public void onLoadingStarted(String imageUri, View view) { | |
} | |
@Override | |
public void onLoadingFailed(String imageUri, View view, FailReason failReason) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(android.permission-group.CONTACTS) android.permission.READ_CONTACTS dangerous | |
(android.permission-group.CONTACTS) android.permission.WRITE_CONTACTS dangerous | |
(android.permission-group.CONTACTS) android.permission.READ_PROFILE dangerous | |
(android.permission-group.CONTACTS) android.permission.WRITE_PROFILE dangerous | |
(android.permission-group.CALENDAR) android.permission.READ_CALENDAR dangerous | |
(android.permission-group.CALENDAR) android.permission.WRITE_CALENDAR dangerous | |
(android.permission-group.SMS) android.permission.SEND_SMS dangerous | |
(android.permission-group.SMS) android.permission.RECEIVE_SMS dangerous | |
(android |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.os.Handler; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.ViewGroup; | |
import android.widget.TextView; | |
import com.poliveira.parallaxrecycleradapter.ParallaxRecyclerAdapter; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ValueAnimator animator = ValueAnimator.ofObject(new ArgbEvaluator(), 0x7fffffff, 0x00ffffff); | |
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { | |
@Override | |
public void onAnimationUpdate(ValueAnimator animation) { | |
wrapper.getImageView().setColorFilter((Integer) animation.getAnimatedValue()); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private float pxFromDp(float dp) | |
{ | |
return dp * getResources().getDisplayMetrics().density; | |
} | |
private float dpFromPx(float px) | |
{ | |
return px / getResources().getDisplayMetrics().density; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final int VALID = 0; | |
private static final int INVALID = 1; | |
public static int checkAppSignature(Context context) { | |
try { | |
PackageInfo packageInfo = context.getPackageManager() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imgUsrClrId.setOnTouchListener(new View.OnTouchListener() { | |
@Override | |
public boolean onTouch(View v, MotionEvent event) { | |
//***********************Get the position of the screen on image***************************// | |
float eventX = event.getX(); | |
float eventY = event.getY(); | |
float[] eventXY = new float[] {eventX, eventY}; | |
//***********************Get the position of the screen on image***************************// | |
//***********************Get the position of the image on image***************************// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Geocoder geocoder = new Geocoder(context); | |
List<Address> addrs = geocoder.getFromLocation(myLatitude, myLongitude, 1); | |
if (!addrs.isEmpty()) | |
String myCountry = addrs.get(0).getCountryName(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void animateTextView(int initialValue, int finalValue, final TextView textview) { | |
DecelerateInterpolator decelerateInterpolator = new DecelerateInterpolator(0.8f); | |
int start = Math.min(initialValue, finalValue); | |
int end = Math.max(initialValue, finalValue); | |
int difference = Math.abs(finalValue - initialValue); | |
Handler handler = new Handler(); | |
for (int count = start; count <= end; count++) { | |
int time = Math.round(decelerateInterpolator.getInterpolation((((float) count) / difference)) * 100) * count; | |
final int finalCount = ((initialValue > finalValue) ? initialValue - count : count); | |
handler.postDelayed(new Runnable() { |
NewerOlder