This file contains 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 java.io.UnsupportedEncodingException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.zip.DataFormatException; | |
import java.util.zip.Deflater; | |
import java.util.zip.Inflater; | |
/** | |
* | |
* @author Ashish Lal |
This file contains 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
0::numpad0 | |
1::numpad1 | |
2::numpad2 | |
3::numpad3 | |
4::numpad4 |
This file contains 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
http://html-demo.proteusthemes.com/webmarket/ |
This file contains 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
//by ashish | |
//https://in.linkedin.com/in/ashishmehra610 | |
public class ParseJsonFileAsync extends AsyncTask<Void, Void, String> { | |
Activity activity; | |
public ParseJsonFileAsync(Activity activity){ | |
this.activity = activity; | |
} |
This file contains 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
/** | |
* Created by Ashish on 08-Feb-17. | |
*/ | |
public class RecyclerAdapterAnimation extends RecyclerView.Adapter<RecyclerAdapterAnimation.Holder> { | |
@Override | |
public Holder onCreateViewHolder(ViewGroup parent, int viewType) { | |
return new Holder(view); |
This file contains 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.database.Cursor; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.media.ExifInterface; | |
import android.net.Uri; |
This file contains 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 class FetchAddressFromLocation extends AsyncTask<Void, Void, String> { | |
private Context context; | |
private Double latitude; | |
private Double longitude; | |
public FetchAddressFromLocation(Context context, Double latitude, Double longitude) { | |
this.context = context; | |
this.latitude = latitude; | |
this.longitude = longitude; |
This file contains 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 class CallLogReadAndroid{ | |
public CallLogReadAndroid(){ | |
Uri allCalls = Uri.parse("content://call_log/calls"); | |
StringBuffer sb = new StringBuffer(); | |
sb.append("Call Details :"); | |
Cursor c = managedQuery(allCalls, null, null, null, CallLog.Calls.DATE + " DESC LIMIT 100"); | |
int date = c.getColumnIndex(CallLog.Calls.DATE); | |
int number = c.getColumnIndex(CallLog.Calls.NUMBER); | |
int name = c.getColumnIndex(CallLog.Calls.CACHED_NAME); | |
// String num= c.getString(c.getColumnIndex(CallLog.Calls.NUMBER));// for number |
This file contains 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
webView.setWebViewClient(new WebViewClient() { | |
public void onPageFinished(WebView view, String url) { | |
// do your stuff here | |
webView.measure(View.MeasureSpec.makeMeasureSpec( | |
View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED), | |
View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)); | |
webView.layout(0, 0, webView.getMeasuredWidth(), | |
webView.getMeasuredHeight()); | |
webView.setDrawingCacheEnabled(true); |
This file contains 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
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
NewerOlder