A TextView that automatically resizes text to fit perfectly within its bounds.

Overview

AutoFitTextView

Maven Central

A TextView that automatically resizes text to fit perfectly within its bounds.

Example Image

Usage

dependencies {
    compile 'me.grantland:autofittextview:0.2.+'
}

Enable any View extending TextView in code:

AutofitHelper.create(textView);

Enable any View extending TextView in XML:

<me.grantland.widget.AutofitLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    >
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:singleLine="true"
        />
</me.grantland.widget.AutofitLayout>

Use the built in Widget in code or XML:

<RootElement
    xmlns:autofit="http://schemas.android.com/apk/res-auto"
    ...
<me.grantland.widget.AutofitTextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:singleLine="true"
    android:maxLines="2"
    android:textSize="40sp"
    autofit:minTextSize="16sp"
    />

License

Copyright 2014 Grantland Chew

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • StackOverflowError in getTextSize() on line 306

    StackOverflowError in getTextSize() on line 306

    While trying with various Japanese strings, I've encountered a StackOverflowError:

    java.lang.StackOverflowError
                at android.text.TextUtils.getChars(TextUtils.java:73)
                at android.text.MeasuredText.setPara(MeasuredText.java:106)
                at android.text.StaticLayout.generate(StaticLayout.java:239)
                at android.text.StaticLayout.<init>(StaticLayout.java:140)
                at android.text.StaticLayout.<init>(StaticLayout.java:90)
                at android.text.StaticLayout.<init>(StaticLayout.java:68)
                at android.text.StaticLayout.<init>(StaticLayout.java:48)
                at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:297)
                at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:306)
                at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:306)
                at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:306)
                at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:306)
                at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:306)
                // goes on repeating ......
    

    getTextSize() gets caught in an infinite loop while doing a binary search looking for the best size. The String I'm trying to display is this:

    キスアト
    

    Note that this is not the only String that crashes, any random Japanese Strings could cause a crash. Another example

    美少女写真館 番外編 OUTSIDE STORY
    

    This seems to be related to encoding....

    Bug 
    opened by tom91136 14
  • Compute font size in onMeasure() to support height, line spacing, drawables, etc.

    Compute font size in onMeasure() to support height, line spacing, drawables, etc.

    The previous version used a separate StaticLayout to determine if the text was too large for the desired TextView height. However, accurately mimicing the TextView appearance (and thus size) is nearly impossible when one considers full information, e.g., line spacing, left/right/top/bottom drawables, replacement spans, etc. Before API 16, information like line spacing was simply unavailable to subclasses.

    This commit uses a different approach. The onMeasure() method is overriden to tell the superclass TextView to measure at its desired height. If this is too tall or short (in pixels or lines), the font is decreased or increased and the view measured again. The same binary search process as before is used.

    This commit does not work when the 'android:singleLine' attribute is set. The text is clipped. Instead, 'android:maxlines="1"' should be set and the desired ellipsizing, horizontal scrolling, and single-line transforms set manually.

    The TextView treats 'singleLine' as a special case (i.e., it's handled differently than 'android:maxLines="1"'), but does not expose this state. Ideally, we would disable 'singleLine' in onMeasure(), before calling super.onMeasure(), and reenable it after setting the fitted font size. However, as there is no (supported) way to determine if the 'singleLine' property was set, this is not possible. Simply disabling maxLines and ellipsizing does not work---I belive because the TextView uses the cached internal StaticLayout.

    Ultimately, using 'singleLine' in an autosizing text view is weird anyway, since 'singleLine' implies 'ellipsized'. (Ellipizing after the font size has reached the minimum is still supported).

    opened by drbild 6
  • S4 - AutoFit

    S4 - AutoFit

    I´m creating a list view with a lot of fields and with S4 the fiels don´t make the autofit. I think that the problem is the little space available.

    In S4

    image

    What should appear

    image

    The code

    <me.grantland.widget.AutofitTextView
                android:id="@+id/data_entrada"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="16"
    
                android:singleLine="true"/> <!-- obrigatório -->
    

    Do you have any quick fix?

    Thanks

    opened by baltazaroliveira 4
  • Error in source AutoFitTextView.java line  219

    Error in source AutoFitTextView.java line 219

    Error: The method getMaxLines() of type AutofitTextView must override or implement a supertype method

    @Override public int getMaxLines() { return mMaxLines; }

    opened by vishwasdoth 3
  • java.lang.StackOverflowError on ICS

    java.lang.StackOverflowError on ICS

    There seems to be some problem with ICS: Launching the sample application and performing the autofit on a new text the application crashes.

    This is the logcat of the crash:

    06-30 21:55:17.395: I/dalvikvm(1325): threadid=3: reacting to signal 3
    06-30 21:55:17.505: I/dalvikvm(1325): Wrote stack traces to '/data/anr/traces.txt'
    06-30 21:55:17.615: D/me.grantland.widget.AutoFitTextView(1325): low=0.0 high=50.0 mid=25.0 target=320.0 width=320.0
    06-30 21:55:17.635: D/me.grantland.widget.AutoFitTextView(1325): low=0.0 high=50.0 mid=25.0 target=320.0 width=320.0
    06-30 21:55:17.666: D/me.grantland.widget.AutoFitTextView(1325): low=0.0 high=50.0 mid=25.0 target=320.0 width=320.0
    06-30 21:55:17.676: D/gralloc_goldfish(1325): Emulator without GPU emulation detected.
    06-30 21:55:20.825: D/me.grantland.widget.AutoFitTextView(1325): low=0.0 high=50.0 mid=25.0 target=320.0 width=362.0
    06-30 21:55:20.825: D/me.grantland.widget.AutoFitTextView(1325): low=0.0 high=24.0 mid=12.0 target=320.0 width=175.0
    06-30 21:55:20.835: D/me.grantland.widget.AutoFitTextView(1325): low=13.0 high=24.0 mid=18.5 target=320.0 width=282.0
    06-30 21:55:20.835: D/me.grantland.widget.AutoFitTextView(1325): low=19.5 high=24.0 mid=21.75 target=320.0 width=325.0
    06-30 21:55:20.835: D/me.grantland.widget.AutoFitTextView(1325): low=19.5 high=20.75 mid=20.125 target=320.0 width=285.0
    06-30 21:55:20.846: D/me.grantland.widget.AutoFitTextView(1325): low=21.125 high=20.75 mid=20.9375 target=320.0 width=307.0
    06-30 21:55:20.846: D/me.grantland.widget.AutoFitTextView(1325): low=21.9375 high=20.75 mid=21.34375 target=320.0 width=307.0
    06-30 21:55:20.855: D/me.grantland.widget.AutoFitTextView(1325): low=22.34375 high=20.75 mid=21.546875 target=320.0 width=325.0
    06-30 21:55:20.865: D/me.grantland.widget.AutoFitTextView(1325): low=22.34375 high=20.546875 mid=21.445313 target=320.0 width=307.0
    06-30 21:55:20.875: D/me.grantland.widget.AutoFitTextView(1325): low=22.445313 high=20.546875 mid=21.496094 target=320.0 width=307.0
    06-30 21:55:20.875: D/me.grantland.widget.AutoFitTextView(1325): low=22.496094 high=20.546875 mid=21.521484 target=320.0 width=325.0
    06-30 21:55:20.885: D/me.grantland.widget.AutoFitTextView(1325): low=22.496094 high=20.521484 mid=21.50879 target=320.0 width=325.0
    06-30 21:55:20.885: D/me.grantland.widget.AutoFitTextView(1325): low=22.496094 high=20.50879 mid=21.502441 target=320.0 width=325.0
    06-30 21:55:20.885: D/me.grantland.widget.AutoFitTextView(1325): low=22.496094 high=20.502441 mid=21.499268 target=320.0 width=307.0
    06-30 21:55:20.895: D/me.grantland.widget.AutoFitTextView(1325): low=22.499268 high=20.502441 mid=21.500854 target=320.0 width=325.0
    06-30 21:55:20.895: D/me.grantland.widget.AutoFitTextView(1325): low=22.499268 high=20.500854 mid=21.500061 target=320.0 width=325.0
    06-30 21:55:20.905: D/me.grantland.widget.AutoFitTextView(1325): low=22.499268 high=20.500061 mid=21.499664 target=320.0 width=307.0
    06-30 21:55:20.905: D/me.grantland.widget.AutoFitTextView(1325): low=22.499664 high=20.500061 mid=21.499863 target=320.0 width=307.0
    06-30 21:55:20.915: D/me.grantland.widget.AutoFitTextView(1325): low=22.499863 high=20.500061 mid=21.499962 target=320.0 width=307.0
    06-30 21:55:20.915: D/me.grantland.widget.AutoFitTextView(1325): low=22.499962 high=20.500061 mid=21.500011 target=320.0 width=325.0
    06-30 21:55:20.915: D/me.grantland.widget.AutoFitTextView(1325): low=22.499962 high=20.500011 mid=21.499987 target=320.0 width=307.0
    06-30 21:55:20.925: D/me.grantland.widget.AutoFitTextView(1325): low=22.499987 high=20.500011 mid=21.5 target=320.0 width=325.0
    06-30 21:55:20.925: D/me.grantland.widget.AutoFitTextView(1325): low=22.499987 high=20.5 mid=21.499992 target=320.0 width=307.0
    06-30 21:55:20.925: D/me.grantland.widget.AutoFitTextView(1325): low=22.499992 high=20.5 mid=21.499996 target=320.0 width=307.0
    06-30 21:55:20.935: D/me.grantland.widget.AutoFitTextView(1325): low=22.499996 high=20.5 mid=21.499998 target=320.0 width=307.0
    06-30 21:55:20.935: D/me.grantland.widget.AutoFitTextView(1325): low=22.499998 high=20.5 mid=21.5 target=320.0 width=325.0
    06-30 21:55:20.935: D/me.grantland.widget.AutoFitTextView(1325): low=22.499998 high=20.5 mid=21.5 target=320.0 width=325.0
    06-30 21:55:20.935: D/me.grantland.widget.AutoFitTextView(1325): low=22.499998 high=20.5 mid=21.5 target=320.0 width=325.0
    06-30 21:55:20.945: D/me.grantland.widget.AutoFitTextView(1325): low=22.499998 high=20.5 mid=21.5 target=320.0 width=325.0
    [... a lot more of these lines...]
    06-30 21:55:20.945: D/me.grantland.widget.AutoFitTextView(1325): low=22.499998 high=20.5 mid=21.5 target=320.0 width=325.0
    06-30 21:55:21.115: I/dalvikvm(1325): threadid=1: stack overflow on call to Ljava/lang/Math;.ceil:DD
    06-30 21:55:21.115: I/dalvikvm(1325):   method requires 8+20+0=28 bytes, fp is 0x44b93310 (16 left)
    06-30 21:55:21.115: I/dalvikvm(1325):   expanding stack end (0x44b93300 to 0x44b93000)
    06-30 21:55:21.115: I/dalvikvm(1325): Shrank stack (to 0x44b93300, curFrame is 0x44b96ec8)
    06-30 21:55:21.115: D/AndroidRuntime(1325): Shutting down VM
    06-30 21:55:21.115: W/dalvikvm(1325): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
    06-30 21:55:21.225: D/dalvikvm(1325): GC_CONCURRENT freed 255K, 6% free 6750K/7111K, paused 3ms+3ms
    06-30 21:55:21.265: E/AndroidRuntime(1325): FATAL EXCEPTION: main
    06-30 21:55:21.265: E/AndroidRuntime(1325): java.lang.StackOverflowError
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at java.lang.RealToString.longDigitGenerator(RealToString.java:269)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at java.lang.RealToString.convertFloat(RealToString.java:177)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at java.lang.RealToString.appendFloat(RealToString.java:130)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at java.lang.StringBuilder.append(StringBuilder.java:169)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:117)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:120)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:120)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:120)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:120)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:120)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:120)
    [... a lot more of these lines...]
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at me.grantland.widget.AutofitTextView.getTextSize(AutofitTextView.java:120)
    06-30 21:55:21.265: E/AndroidRuntime(1325):     at me.gran
    
    opened by leinardi 3
  • Doesn't do anything.

    Doesn't do anything.

    In a relative layout. Text size stays the same.

        <me.grantland.widget.AutofitTextView
            android:id="@+id/tvMessage"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_above="@+id/lButtons"
            android:layout_below="@+id/barcode_scanner"
            android:layout_margin="10dp"
            android:gravity="center"
            android:textSize="24sp"
            ads:minTextSize="10sp"
            />
    
    opened by 2fours 2
  • Problem with screen orientation

    Problem with screen orientation

    When I switch the screen from landscape to portrait mode, I get a Null Pointer Exception. I did not have this problem before adding the me.grantland.widget.AutofitTextView.

    01-03 22:35:24.841 17553-17553/com.northeast_cc.plugmyband E/AndroidRuntime: FATAL EXCEPTION: main Process: com.northeast_cc.plugmyband, PID: 17553 java.lang.RuntimeException: Unable to retain activity {com.northeast_cc.plugmyband/com.northeast_cc.plugmyband.PlugMyBand}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object com.northeast_cc.plugmyband.AsyncTaskManager.retainTask()' on a null object reference at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4840) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4889) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5142) at android.app.ActivityThread.access$1100(ActivityThread.java:205) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1701) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6895) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object com.northeast_cc.plugmyband.AsyncTaskManager.retainTask()' on a null object reference at com.northeast_cc.plugmyband.PlugMyBand.onRetainNonConfigurationInstance(PlugMyBand.java:711) at android.app.Activity.retainNonConfigurationInstances(Activity.java:2004) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4836) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4889)  at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5142)  at android.app.ActivityThread.access$1100(ActivityThread.java:205)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1701)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:145)  at android.app.ActivityThread.main(ActivityThread.java:6895)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 

    opened by pmbnecc 2
  • Use lower value of minSdkVersion?

    Use lower value of minSdkVersion?

    Is it possible to use a lower value for minSdkVersion? Currently, AutofitTextView is the reason why my app is forced to use minSdkVersion=14 and it would be really great to support version 10.

    opened by nileshtrivedi 2
  • Stop auto-fitting

    Stop auto-fitting

    Is there a way to unlink a TextView with this library? I have to find the smallest textSize for a particular TextView and store it, and then set a very new textSize to that TextView. However, the TextView's text gets resized, no matter the new textSize I've set. I have also tried to reinitialize the TextView via the findViewById method.

    I am using regular TextView in my xml, and then AutoFitHelper.create(myTextView) in code.

    There must be a workaround here.

    opened by azurh 2
  • wrong size on Nexus 5

    wrong size on Nexus 5

    I used AutofitTextView with xml and the text was nearly two times larger on a Nexus 5 (API21) than on Nexus 7 (2013, API21) or Nexus 4 (API15). Using "AutofitHelper.create(textView);" with a normal TextView worked. Maybe there is a problem with xxhdpi devices?

    opened by SimonStefan 2
  • AutofitTextView doesn't work properly with TextSwitcher

    AutofitTextView doesn't work properly with TextSwitcher

    If I use AutofitTextView inside a TextSwitcher the text won't be resized.

    CustomViewFactory.java:

    ...
    @Override
    public View makeView() {
        AutofitTextView textView = (AutofitTextView) mActivity.getLayoutInflater().inflate(R.layout.text_view_output, mRoot, false);
        return textView;
    }
    ...
    

    text_view_output.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <me.grantland.widget.AutofitTextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:lines="1"
        android:gravity="center">
    </me.grantland.widget.AutofitTextView>
    

    activity_main.xml

    ...
    <RelativeLayout
        android:id="@+id/relativeLayoutContent"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:gravity="end">
    
        ...
    
        <TextSwitcher
            android:id="@+id/textSwitcherOutput"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
    
    </RelativeLayout>
    ...
    

    opened by heinrichreimer 2
  •  error: duplicate value for resource 'attr/minTextSize' with config ''.

    error: duplicate value for resource 'attr/minTextSize' with config ''.

    In case anyone else who also runs into this issue, please refer to this branch which fixed it.

    implementation 'com.github.UsherAndroid:android-autofittextview:0.2.9' (This repo is published through jitpack. You might need to add the basic jitpack config.)

    The provided error info is limited and it is misleading and you could not think of the reason until you exhaust other possibilities. Hence I am compelled to post this issue here as a reference.

    `* What went wrong: Execution failed for task ':app:mergeDebugResources'.

    java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed Output: /Users/ztang/code/klaus_app/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:1445: error: duplicate value for resource 'attr/minTextSize' with config ''. /Users/ztang/code/klaus_app/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:1445: error: resource previously defined here.

    Command: /Users/ztang/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/d6b5ff7ee9ed628776431a2b74447e82/aapt2-3.2.1-4818971-osx/aapt2 compile --legacy
    -o
    /Users/ztang/code/klaus_app/app/build/intermediates/res/merged/debug
    /Users/ztang/code/klaus_app/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0 Output: /Users/ztang/.gradle/caches/transforms-1/files-1.1/autofittextview-0.2.1.aar/c5feda23a4f26c622aee0582e2cd1d02**/res/values/values.xml:3:5-192: AAPT: error: duplicate value for resource 'attr/minTextSize' with config ''.**

    /Users/ztang/.gradle/caches/transforms-1/files-1.1/autofittextview-0.2.1.aar/c5feda23a4f26c622aee0582e2cd1d02/res/values/values.xml:3:5-192: AAPT: error: resource previously defined here.

    Command: /Users/ztang/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/d6b5ff7ee9ed628776431a2b74447e82/aapt2-3.2.1-4818971-osx/aapt2 compile --legacy
    -o
    /Users/ztang/code/klaus_app/app/build/intermediates/res/merged/debug
    /Users/ztang/code/klaus_app/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. `
    opened by TonyTangAndroid 0
  • Provide support for the latest API level

    Provide support for the latest API level

    Hello, We are currently using your library in one of our application. Actually we need a favour from your side. According to the Google Play Policy, all apps have to provide support for at least API level 26 which is not satisfied in your case. We are targeting API level 28. So can you please provide us support for API level 28 in your current repository?

    opened by ebghrimtech 2
  • get original textSize not working

    get original textSize not working

    /**
         * Returns the original text size of the View.
         * @see TextView#getTextSize()
         */
        public float getTextSize() {
            return mTextSize;
        }
    

    it is not original text size, just is 'android:textSize' value. hot to get a autofit-text-size ?

    opened by walterFeng 0
Releases(0.2.1)
  • 0.2.1(Mar 10, 2015)

    Changelog:

    • Remove android:allowBackup="true"
    • Fix minTextSize set from attrs
    • Fix stackoverflow for string containing more newLines than maxLines and maxLines > 1
    Source code(tar.gz)
    Source code(zip)
Owner
Grantland Chew
Grantland Chew
() An Android TextView with a shimmering effect

Shimmer for Android This library is DEPRECATED, as I don't have time to mainatin it anymore. But feel free to go through the code and copy that into y

Romain Piel 2k Jan 9, 2023
() Android experiment showing a sinking TextView

Titanic for Android This library is DEPRECATED, as I don't have time to mainatin it anymore. But feel free to go through the code and copy that into y

Romain Piel 1.8k Dec 15, 2022
A TextView that simulates the effect from the app Secret where the characters fade in/out at different speeds.

SecretTextView A TextView that simulates the effect from the app Secret where the characters fade in/out at different speeds. How To Use Use it just l

Matt Kula 611 Nov 7, 2022
Android's TextView that can expand/collapse like the Google Play's app description

ExpandableTextView ExpandableTextView is an Android library that allows developers to easily create an TextView which can expand/collapse just like th

Manabu S. 4k Jan 8, 2023
This is based on an open source autosizing textview for Android.

SizeAdjustingTextView This is based on an open source autosizing textview for Android I found a few weeks ago. The initial approach didn't resize mult

Elliott Chenger 255 Dec 29, 2022
:page_facing_up: Android Text Full Jusiftication / Wrapping / Justify / Hyphenate - V2.0

LIBRARY IS NO LONGER MAINTAINED If you want to adopt + maintain this library, please drop me a message - [email protected] Android Full Justific

Mathew Kurian 1.9k Dec 29, 2022
Floating hint from edit text - inspired by Matt D. Smith's design: http://dribbble.com/shots/1254439--GIF-Mobile-Form-Interaction?list=users

Float Labeled EditText Simple implementation of a Float Labeled EditText: An Android ViewGroup which uses a child EditText and puts the hint on top of

Wrapp Archive 1.1k Nov 14, 2022
A periodic text updating library

RotatingText Rotating text is an Android library that can be used to make text switching painless and beautiful, with the use of interpolators, typefa

Mobile Development Group 1.6k Dec 30, 2022
A different beautiful Floating Edit Text

MaterialTextField A different beautiful Floating Edit Text Usage Surround your EditText by a MaterialTextField <com.github.florent37.materialtextfield

Florent CHAMPIGNY 1.5k Nov 11, 2022
A TextView that automatically resizes text to fit perfectly within its bounds.

AutoFitTextView A TextView that automatically resizes text to fit perfectly within its bounds. Usage dependencies { compile 'me.grantland:autofitt

Grantland Chew 4.2k Jan 1, 2023
A TextView that automatically fit its font and line count based on its available size and content

AutoFitTextView A TextView that automatically fit its font and line count based on its available size and content This code is heavily based on this S

null 899 Jan 2, 2023
Zoom Modifiers, zoomable image and layouts with limit pan bounds, fling and moving back to valid bounds and callbacks that return current transformation or visible image section

Zoom Modifiers, zoomable image and layouts with limit pan bounds, fling and moving back to valid bounds and callbacks that return current transformation or visible image section

Smart Tool Factory 20 Dec 13, 2022
A TextView that changes its content automatically every few seconds

FadingTextView A TextView that changes its content automatically every few seconds Demo app A demo app is available on Google Play: Usage Add this to

Tomer Rosenfeld 1.7k Dec 9, 2022
Android application to perfectly cook your eggs

Timeggz Table of Contents About Architecture and frameworks CI Linter Contributing License About Timeggz is an android application to perfectly cook y

null 2 Jun 27, 2022
AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URLs (http://), Phone and Email automatically detecting and ability to handle clicks.

AutoLinkTextView Deprecated Please use the new version of AutoLinkTextView AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URL

Arman 1.1k Nov 23, 2022
Curve-Fit is an Android library for drawing curves on Google Maps

Curve-Fit Android library for drawing curves on Google Maps. This library uses Bezier cubic equation in order to compute all intermediate points of a

Sarweshkumar C R 63 Mar 7, 2021
An Android library containing a simple TableView and an advanced SortableTableView providing a lot of customisation possibilities to fit all needs.

SortableTableView for Android An Android library providing a TableView and a SortableTableView. Minimum SDK-Version: 11 | Compile SDK-Version: 25 | La

Ingo Schwarz 1.1k Dec 5, 2022
A 'Google Fit' like activity indicator for Android

WheelIndicatorView A 'Google Fit' like activity indicator for Android Screenshots Usage How to use: Add a "WheelIndicatorView" in the layout editor li

David Lázaro 396 Nov 25, 2022
A library that gives full control over text related technologies such as bidirectional algorithm, open type shaping, text typesetting and text rendering

Tehreer-Android Tehreer is a library which gives full control over following text related technologies. Bidirectional Algorithm OpenType Shaping Engin

Tehreer 61 Dec 15, 2022