Skip to content

Commit

Permalink
Enable or disable pan, scale and rotation programatically.
Browse files Browse the repository at this point in the history
Addresses #3.
  • Loading branch information
anpez committed May 5, 2016
1 parent 36c1150 commit 5e4a0f7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Android 2.2, API 8

```groovy
dependencies {
compile 'com.antonionicolaspina:textimageview:3.0.0'
compile 'com.antonionicolaspina:textimageview:3.1.0'
}
```

Expand Down
4 changes: 2 additions & 2 deletions textimageview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
siteUrl = 'https://github.com/ANPez/TextImageView'
gitUrl = 'https://github.com/ANPez/TextImageView.git'

libraryVersion = '3.0.0'
libraryVersion = '3.1.0'

developerId = 'anpez'
developerName = 'Antonio Nicolás Pina'
Expand All @@ -32,7 +32,7 @@ android {
minSdkVersion 8
targetSdkVersion 23
versionCode 9
versionName "3.0.0"
versionName "3.1.0"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,30 @@ public void setTypeface(Typeface typeface) {
invalidate();
}

/**
* Enable or disable user-pan for the view.
* @param enabled Whether panning should be enabled.
*/
public void setPanEnabled(boolean enabled) {
panEnabled = enabled;
}

/**
* Enable or disable user-scaling for the view.
* @param enabled Whether scaling should be enabled.
*/
public void setScaleEnabled(boolean enabled) {
scaleEnabled = enabled;
}

/**
* Enable or disable user-rotation for the view.
* @param enabled Whether rotation should be enabled.
*/
public void setRotationEnabled(boolean enabled) {
rotationEnabled = enabled;
}

/**
* Set the text color.
* @param color Color in the format of <a href="http://developer.android.com/reference/android/graphics/Color.html">android.graphics.Color</a>.
Expand Down

0 comments on commit 5e4a0f7

Please sign in to comment.