Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Freeze TextView text while restore fragment from Backstack/ onOrientationChange

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 873
    Comment on it

    Some time TextView lost text while getting fragment from Back-stack or when screen orientation changed.

    I also faced that problem. Here is the solution for save state of TextView forcefully.

    Add Tag

    android:freezesText="true"

    to TextView.

    Example:-

     <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:freezesText="true" />
    

    Happy Coding :)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: