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
| /** | |
| * After some thoughts on this topic, I've decided to turn this gist along with other features into a library so you can zoom | |
| * whatever you want, library you can find here https://github.com/Glazzes/react-native-zoom-toolkit. | |
| * | |
| * @author Santiago Zapata, Glazzes at Github <3 | |
| * @description This gist makes part of an article I'm writing about this topic (in spanish). This solution takes into account | |
| * the linear algebra concepts and geometrical interpretation of the transform-origin property specification, this solution | |
| * takes heavy inspiration from William's Candillon +3 year old video in this topic, however this solution brings it to the | |
| * modern day along with a huge fix that prevents the origin from being displaced by an incorrect offset calculation after | |
| * the first zoom interaction. |
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.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.Canvas; | |
| import android.graphics.Matrix; | |
| import android.graphics.Paint; | |
| import android.media.ExifInterface; | |
| import android.os.AsyncTask; | |
| import android.os.Environment; |
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 retrofit.Call | |
| import retrofit.Callback | |
| import retrofit.Response | |
| import retrofit.Retrofit | |
| /** | |
| * @author Alex Facciorusso | |
| * @since 06/11/15 | |
| */ |
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 RealPathUtil { | |
| public static String getRealPath(Context context, Uri fileUri) { | |
| String realPath; | |
| // SDK < API11 | |
| if (Build.VERSION.SDK_INT < 11) { | |
| realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri); | |
| } | |
| // SDK >= 11 && SDK < 19 | |
| else if (Build.VERSION.SDK_INT < 19) { |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.example" | |
| android:versionCode="1" | |
| android:versionName="1.0"> | |
| <uses-sdk android:minSdkVersion="8"/> | |
| <uses-permission android:name="android.permission.READ_CONTACTS" /> | |
| <application android:label="@string/app_name"> |