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
| package com.example.vaibhavjani.geojsonexample; | |
| import android.content.Context; | |
| import android.graphics.Point; | |
| import android.os.Handler; | |
| import android.util.AttributeSet; | |
| import android.view.GestureDetector; | |
| import android.view.MotionEvent; | |
| import android.view.ScaleGestureDetector; |
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
| /*//Pick image from fragment | |
| PickImage pickImage = new PickImage(activity, this); | |
| pickImage.createImageChooser(); | |
| @Override | |
| public void onActivityResult(int requestCode, int resultCode, Intent data) { | |
| super.onActivityResult(requestCode, resultCode, data); |
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 ThreadSynchronisationDemo implements Runnable { | |
| private Account acct = new Account(); | |
| public static void main(String[] args) { | |
| ThreadSynchronisationDemo r = new ThreadSynchronisationDemo(); | |
| Thread one = new Thread(r); | |
| Thread two = new Thread(r); | |
| one.setName("Fred"); |
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.app.Dialog; | |
| import android.os.Bundle; | |
| import android.text.TextUtils; | |
| import android.view.View; | |
| import android.view.Window; | |
| import android.widget.Button; | |
| import android.widget.EditText; | |
| import com.routerunner.R; |
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.content.SharedPreferences; | |
| public class AppPreferences { | |
| private static String PREFERENCE_FILE_NAME = "application_preferences"; | |
| public static String IMEI = "imei"; | |
| private static SharedPreferences getSharedPreferences(Context context) { |
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.util.HashMap; | |
| import java.util.Map; | |
| public class HelloWorld { | |
| public static void main(String[] args) { | |
| String str = "this is what this is"; | |
| System.out.println(str); |
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.IOException; | |
| import android.annotation.TargetApi; | |
| import android.app.Activity; | |
| import android.app.PendingIntent; | |
| import android.content.BroadcastReceiver; | |
| import android.content.ContentValues; | |
| import android.content.Context; | |
| import android.content.Intent; |
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.ByteArrayOutputStream; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.util.Base64; | |
| public class Base64ImageUtil { | |
| public static Bitmap stringToBitmap(String encodedString) { | |
| try { |
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 SignatureView extends View { | |
| private static final float STROKE_WIDTH = 5f; | |
| /** Need to track this so the dirty region can accommodate the stroke. **/ | |
| private static final float HALF_STROKE_WIDTH = STROKE_WIDTH / 2; | |
| private Paint paint = new Paint(); | |
| private Path path = new Path(); |
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 KeyboardUtils { | |
| public static void setKeyboardVisibilityListener(Activity activity, final KeyboardVisibilityListener keyboardVisibilityListener) { | |
| final View contentView = activity.findViewById(android.R.id.content); | |
| contentView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { | |
| private int mPreviousHeight; |