Giter Site home page Giter Site logo

Comments (1)

Kalzeroth avatar Kalzeroth commented on August 15, 2024

I think you have to set the text in code. I'm using AndroidX and this library and I do have output in the emulator/device screen. No live preview though as you pointed out.

_expandableTextView?.text = getString(R.string.tos_1)
<com.ms.square.android.expandabletextview.ExpandableTextView
                android:id="@+id/_expandableTextView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                expandableTextView:animAlphaStart="1"
                expandableTextView:animDuration="300"
                expandableTextView:maxCollapsedLines="2">

                <LinearLayout
                    android:layout_marginTop="16dp"
                    android:layout_marginBottom="16dp"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@id/expandable_text"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:textColor="@color/white"
                        android:textSize="16sp" />

                    <ImageButton
                        android:id="@id/expand_collapse"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_gravity="center_vertical|end"
                        android:background="@android:color/transparent"
                        android:padding="16dp"
                        android:src="@drawable/ic_keyboard_arrow_down_white_24dp"
                        android:tint="@color/white" />

                </LinearLayout>

</com.ms.square.android.expandabletextview.ExpandableTextView>

from expandabletextview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.