Giter Club home page Giter Club logo

Comments (8)

Fgabz avatar Fgabz commented on June 15, 2024

Same for me

from expandabletextview.

Manabu-GT avatar Manabu-GT commented on June 15, 2024

The currently implementation requires that the view Ids for TextView and ImageButton to be set to "@id/expandable_text" and "@id/expand_collapse" respectively.
I also updated README to mention it.

If the problem still persists after you update your layout file to use those ids just like the below, please let me know and I will investigate.

  <!-- sample xml -->
  <com.ms.square.android.expandabletextview.ExpandableTextView
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:expandableTextView="http://schemas.android.com/apk/res-auto"
      android:id="@+id/expand_text_view"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      expandableTextView:maxCollapsedLines="4"
      expandableTextView:animDuration="200">
      <TextView
          android:id="@id/expandable_text"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginLeft="10dp"
          android:layout_marginRight="10dp"
          android:textSize="16sp"
          android:textColor="#666666" />
      <ImageButton
          android:id="@id/expand_collapse"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_margin="16dp"
          android:layout_gravity="right|bottom"
          android:background="@android:color/transparent"/>
  </com.ms.square.android.expandabletextview.ExpandableTextView>

from expandabletextview.

LinkOut avatar LinkOut commented on June 15, 2024

Ok i got it. Working Thanks.

from expandabletextview.

LinkOut avatar LinkOut commented on June 15, 2024

Is it possible to use a ImageView with the same id as the ImageButton? Is there a way to customize the imageButton image? Thanks.

from expandabletextview.

Manabu-GT avatar Manabu-GT commented on June 15, 2024

Is it possible to use a ImageView with the same id as the ImageButton?
-> Nope. It currently only supports ImageButton.

Is there a way to customize the imageButton image?
->As written on README, you can set the following attributes in your layout xml file to customize the images of the ImageButton.

  • expandDrawable
    Customize a drawable set to ImageButton to expand the TextView
  • collapseDrawable
    Customize a drawable set to ImageButton to collapse the TextView

Thanks and plz let me know if you have any other issue.

from expandabletextview.

LinkOut avatar LinkOut commented on June 15, 2024

expandableTextView:expandDrawable="@drawable/ic_my_draw" seems not to works. Is it correct? Inside the ImageButton.

from expandabletextview.

LinkOut avatar LinkOut commented on June 15, 2024

You've done a great job, works perfectly. Thank You.

from expandabletextview.

davern97 avatar davern97 commented on June 15, 2024

I have a problem:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.ms.square.android.expandabletextview.ExpandableTextView.setText(java.lang.CharSequence)' on a null object reference
at com.company.jobs.jobsproject.MainActivity.onCreate(MainActivity.java:39)

In the MainActivity I have this:
expTv1 = (ExpandableTextView) findViewById(R.id.expand_text_view);
expTv1.setText(texto_largo); //line 39

texto_largo is a String with the "Lorem Ipsum"

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.