├── .gitignore ├── .idea ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── LICENSE ├── Logotype primary.png ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── us │ │ └── technerd │ │ └── tnimageview │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── us │ │ │ └── technerd │ │ │ └── tnimageview │ │ │ └── MainActivity.java │ └── res │ │ ├── drawable-v24 │ │ ├── android_image.jpg │ │ ├── apple.jpg │ │ ├── ic_launcher_foreground.xml │ │ └── samsung.jpg │ │ ├── drawable │ │ ├── android_image.jpg │ │ ├── apple.jpg │ │ ├── ic_launcher_background.xml │ │ └── samsung.jpg │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── us │ └── technerd │ └── tnimageview │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── tn_imageview ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src ├── androidTest └── java │ └── us │ └── technerd │ └── tnimageview │ └── ExampleInstrumentedTest.java ├── main ├── AndroidManifest.xml ├── java │ └── us │ │ └── technerd │ │ └── tnimageview │ │ └── TNImageView.java └── res │ └── values │ └── strings.xml └── test └── java └── us └── technerd └── tnimageview └── ExampleUnitTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Ameer Hamza 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Logotype primary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yohamza/TNImageView-Android/5503e6ea2cc44d1848c7f5704a62cd95ed27d989/Logotype primary.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TNImageView-Android [![Release](https://jitpack.io/v/AmeerHamzaaa/TNImageView-Android.svg)](https://jitpack.io/#AmeerHamzaaa/TNImageView-Android/0.1.2) [![Android Arsenal]( https://img.shields.io/badge/Android%20Arsenal-TNImageView-green.svg?style=flat )]( https://android-arsenal.com/details/1/6607 ) 2 | 3 | 4 | 5 |

This Repo is not maintained any more.

6 | 7 | Android Library for making scale-able and rotatable image views or giving this power to your own image view 8 | 9 | 10 | 11 | 12 | ![Independent they are :p](https://media.giphy.com/media/3oFzmelzRf8Cou0BJC/giphy.gif) ------ 13 | ![Independent they are :p](https://media.giphy.com/media/l1IBijSn8Fz1XzAUE/giphy.gif) 14 | 15 | 16 | # Installing 17 | 18 | For a working implementation of this project see the `app/` folder. 19 | 20 | 1. Add it in your root 'build.gradle' at the end of repositories: 21 | 22 | ``` 23 | allprojects { 24 | repositories { 25 | ... 26 | maven { url 'https://jitpack.io' } 27 | } 28 | } 29 | ``` 30 | 31 | 32 | 33 | 2. Include the following dependency. 34 | 35 | ``` 36 | compile 'com.github.AmeerHamzaaa:TNImageView-Android:0.1.2' 37 | ``` 38 | 39 | # Usage 40 | 41 | 3. In your `onCreate` method (or `onCreateView` for a fragment), initialize the TNImageView object: 42 | 43 | ```java 44 | // Initialize the TNImageView object 45 | TNImageView tnImage = new TNImageView(): 46 | 47 | // pass your ImageView which you want to make rotatable and scaleable 48 | tnImage.makeRotatableScalable(imageview); 49 | 50 | //you can also select if the touched view comes to front or not 51 | tnImage.bringToFrontOnTouch(true); 52 | ``` 53 | 54 | # Remember 55 | 56 | Put all your imageviews inside a relativeLayout they will not work with any other layout. We are working on it. 57 | 58 | ### That's all you need to do, but if you want to add a list of ImageViews, then use this function 59 | 60 | ```java 61 | // add your imageviews to a list and than pass the list to the object it will make all of them rotatable and scalable. 62 | tnImage.addListofImageViews(imageViews); 63 | ``` 64 | 65 | 66 | Please open an issue if you find things, that are missing. 67 | 68 | 69 | 70 | If you think this library is useful, please press star button at upside. 71 |
72 | 73 |

74 | 75 | # Developed By 76 | 77 | * Ameer Hamza 78 | 79 | * [StackOverFlow](https://stackoverflow.com/story/ameer_hamza) 80 | * [Facebook](https://www.facebook.com/hamzabhatti20) 81 | * mailto - 82 | 83 | # Contributions 84 | 85 | * Please, read the README file before opening an issue, thanks. 86 | * Please, all the Pull Request must be sent to the dev branch, thanks.. 87 | 88 | ## License 89 | 90 | ``` 91 | MIT License 92 | 93 | Copyright (c) 2017 Ameer Hamza 94 | 95 | Permission is hereby granted, free of charge, to any person obtaining a copy 96 | of this software and associated documentation files (the "Software"), to deal 97 | in the Software without restriction, including without limitation the rights 98 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 99 | copies of the Software, and to permit persons to whom the Software is 100 | furnished to do so, subject to the following conditions: 101 | 102 | The above copyright notice and this permission notice shall be included in all 103 | copies or substantial portions of the Software. 104 | 105 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 106 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 107 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 108 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 109 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 110 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 111 | SOFTWARE. 112 | ``` 113 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 26 5 | defaultConfig { 6 | applicationId "us.technerd.tnimageview" 7 | minSdkVersion 16 8 | targetSdkVersion 26 9 | versionCode 1 10 | versionName "1.0" 11 | multiDexEnabled true 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(include: ['*.jar'], dir: 'libs') 24 | implementation 'com.android.support:appcompat-v7:26.1.0' 25 | implementation 'com.android.support.constraint:constraint-layout:1.0.2' 26 | implementation 'com.android.support:multidex:1.0.1' 27 | testImplementation 'junit:junit:4.12' 28 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 29 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 30 | implementation project(':tn_imageview') 31 | } 32 | 33 | configurations.all { 34 | resolutionStrategy.eachDependency { DependencyResolveDetails details -> 35 | def requested = details.requested 36 | if (requested.group == 'com.android.support') { 37 | if (!requested.name.startsWith("multidex")) { 38 | details.useVersion '26.1.0' 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/androidTest/java/us/technerd/tnimageview/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package us.technerd.tnimageview; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("us.technerd.tnimageview", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/us/technerd/tnimageview/MainActivity.java: -------------------------------------------------------------------------------- 1 | package us.technerd.tnimageview; 2 | 3 | import android.Manifest; 4 | import android.content.pm.PackageManager; 5 | import android.net.Uri; 6 | import android.support.v4.app.ActivityCompat; 7 | import android.support.v7.app.AppCompatActivity; 8 | import android.os.Bundle; 9 | import android.util.Log; 10 | import android.view.View; 11 | import android.widget.Button; 12 | import android.widget.ImageView; 13 | import android.widget.RelativeLayout; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | 19 | public class MainActivity extends AppCompatActivity { 20 | 21 | private ImageView androidImage, appleImage, samsungImage; 22 | private RelativeLayout holderLayout; 23 | private Button addBtn; 24 | private TNImageView tnImageView; 25 | private List imageViews = new ArrayList<>(); 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | setContentView(R.layout.activity_main); 31 | 32 | androidImage = findViewById(R.id.imageview); 33 | androidImage.setVisibility(View.GONE); 34 | appleImage = findViewById(R.id.apple); 35 | appleImage.setVisibility(View.GONE); 36 | samsungImage = findViewById(R.id.samsung); 37 | samsungImage.setVisibility(View.GONE); 38 | holderLayout = findViewById(R.id.holder); 39 | addBtn = findViewById(R.id.addBtn); 40 | 41 | 42 | tnImageView = new TNImageView(); 43 | 44 | addBtn.setOnClickListener(new View.OnClickListener() { 45 | @Override 46 | public void onClick(View v) { 47 | 48 | imageViews.add(androidImage); 49 | imageViews.add(appleImage); 50 | imageViews.add(samsungImage); 51 | 52 | tnImageView.addListofImageViews(imageViews); 53 | tnImageView.bringToFrontOnTouch(true); 54 | 55 | androidImage.setVisibility(View.VISIBLE); 56 | appleImage.setVisibility(View.VISIBLE); 57 | samsungImage.setVisibility(View.VISIBLE); 58 | 59 | } 60 | }); 61 | } 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/android_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yohamza/TNImageView-Android/5503e6ea2cc44d1848c7f5704a62cd95ed27d989/app/src/main/res/drawable-v24/android_image.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/apple.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yohamza/TNImageView-Android/5503e6ea2cc44d1848c7f5704a62cd95ed27d989/app/src/main/res/drawable-v24/apple.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/samsung.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yohamza/TNImageView-Android/5503e6ea2cc44d1848c7f5704a62cd95ed27d989/app/src/main/res/drawable-v24/samsung.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/android_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yohamza/TNImageView-Android/5503e6ea2cc44d1848c7f5704a62cd95ed27d989/app/src/main/res/drawable/android_image.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/apple.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yohamza/TNImageView-Android/5503e6ea2cc44d1848c7f5704a62cd95ed27d989/app/src/main/res/drawable/apple.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/samsung.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yohamza/TNImageView-Android/5503e6ea2cc44d1848c7f5704a62cd95ed27d989/app/src/main/res/drawable/samsung.jpg -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 20 | 21 | 28 | 29 | 35 | 36 | 37 | 38 |