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 dataIntoPdf(int noOfLines, ArrayList<Info> bookInfosById, PDFCanvas canvasId){ | |
| try { | |
| float x = 40f; | |
| float y = 60f; | |
| for (int j = 0; j < bookInfosById.size();j++) { | |
| int z = j; | |
| Info myInfos = bookInfosById.get(j); | |
| if (z < noOfLines) { | |
| for (int v = 0; v <= z; v++) { | |
| if (z == v) { |
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
| Here arg[0] --> is the image url that we have to pass to this asynctask as parameter. | |
| public class DownloadImage extends AsyncTask<String, Integer, Bitmap> { | |
| @Override | |
| protected void onPreExecute() { | |
| super.onPreExecute(); | |
| } |
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 static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) { | |
| final int height = options.outHeight; | |
| final int width = options.outWidth; | |
| int inSampleSize = 1; | |
| if (height > reqHeight || width > reqWidth) { | |
| if (width > height) { | |
| inSampleSize = Math.round((float) height / (float) reqHeight); | |
| } else { | |
| inSampleSize = Math.round((float) width / (float) reqWidth); |
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 class ServiceHandler { | |
| static String response = null; | |
| public final static int GET = 1; | |
| public final static int POST = 2; | |
| public ServiceHandler() { | |
| } |
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
| In the Fragment : | |
| TabsPagerAdapter mAdapter = new TabsPagerAdapter(getChildFragmentManager(),itemsList); | |
| viewPager.setAdapter(mAdapter); | |
| viewPager.setOnPageChangeListener(new OnPageChangeListener() { | |
| @Override | |
| public void onPageSelected(int arg0) { | |
| } | |
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
| timer = new Timer(); | |
| timer.schedule(new TimerTask() { | |
| @Override | |
| public void run() { | |
| getActivity().runOnUiThread(new Runnable() { | |
| @Override | |
| public void run() { | |
| fetchallMessages(match_id,true); |
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 java.io.BufferedInputStream; | |
| import java.io.BufferedOutputStream; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.OutputStream; | |
| import java.io.StringReader; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; |
NewerOlder