Skip to content

This library is modification of android.widget.ScrollView and allows user to resize TextView, placed into it, by two fingers.

License

Notifications You must be signed in to change notification settings

ArtemBotnev/ScalableScrollView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scalable ScrollView

This library is modification of android.widget.ScrollView and allows user to resize TextView, placed into it, by two fingers.

alt text

To use this, add dependensies to your project:

Jitpack repository to your root build.gradle at the end of repositories

allprojects {
 repositories {
  ...
  maven { url 'https://jitpack.io' }
  }
 }

and to module level build.gradle

dependencies {
 implementation 'com.github.ArtemBotnev:ScalableScrollView:1.0.1'
}

Just replace your ScrollView with ScalableScrollView in layout.xml

<?xml version="1.0" encoding="utf-8"?>
<com.artembotnev.view.ScalableScrollView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:maxScale="2.5"
        tools:context=".MainActivity">

    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="16sp"
            android:text="@string/android_article" />

</com.artembotnev.view.ScalableScrollView>

You can also specify maxScale attribute to define maximum scale for text

About

This library is modification of android.widget.ScrollView and allows user to resize TextView, placed into it, by two fingers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages