ExpandableTextView icon indicating copy to clipboard operation
ExpandableTextView copied to clipboard

Write the widget in xml ,but show nothing in screen.Anything wrong?

Open SunJenry opened this issue 6 years ago • 5 comments

SunJenry avatar Jul 26 '18 05:07 SunJenry

<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" 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:padding="16dp" android:layout_gravity="right|bottom" android:background="@android:color/transparent"/> </com.ms.square.android.expandabletextview.ExpandableTextView>

Set your text to the "@+id/expand_text_view" not in "@id/expandable_text". It will work

AhmMhd avatar Aug 28 '18 07:08 AhmMhd

@AhmMhd @Manabu-GT I am having the same problem. The view is not inflating or being recognized in my xml for some reason. I have it in its own xml in a linear layout but the linear layout is showing empty and when I click on the layout nothing in the blueprint is highlighting. Any suggestions?

NaturallyAsh avatar Nov 27 '18 00:11 NaturallyAsh

never mind, figured it out =]

NaturallyAsh avatar Nov 27 '18 01:11 NaturallyAsh

Can you please tell me the solution?

Komal-Khairnar avatar Nov 29 '18 05:11 Komal-Khairnar

I had to put the linear layout in a scrollview for it to be visible. It's still not showing in my blueprint but when I run it on my emu or phone it shows up.

<ScrollView android:id="@+id/detail_scrollView" android:layout_width="match_parent" android:layout_height="wrap_content" android:nestedScrollingEnabled="true">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

                        <include
                            android:id="@+id/expand_detail_view"
                            layout="@layout/expand_text_item"/>

                    </LinearLayout>

                </ScrollView> 

NaturallyAsh avatar Dec 05 '18 20:12 NaturallyAsh