3

My inflate layout:-

<FrameLayout
    android:layout_width="100dip"
    android:layout_height="100dip"
    android:gravity="center"
    android:orientation="vertical" >

    <ImageView
        android:id="@+id/UserImageView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@drawable/no_image"
        android:gravity="center_horizontal|bottom"
        android:orientation="vertical"
        android:scaleType="fitXY" >
    </ImageView>

    <TextView
        android:id="@+id/UserTitleTextView"
        android:layout_width="fill_parent"
        android:layout_height="25dip"
        android:layout_gravity="bottom"
        android:background="@android:color/transparent"
        android:gravity="center_vertical"
        android:paddingLeft="5dip"
        android:paddingRight="28dip"
        android:singleLine="true"
        android:text=""
        android:textColor="@android:color/white"
        android:textSize="16sp" />

    <ImageView
        android:id="@+id/UserRecentActivityIcon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|right"
        android:layout_marginBottom="10dip"
        android:layout_marginRight="8dip"
        android:gravity="bottom|right" />

    <ImageView
        android:id="@+id/redDotActivityIconInflateGroupDetail02"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|right"
        android:layout_marginBottom="30dip"
        android:layout_marginRight="4dip"
        android:gravity="bottom|right"
        android:src="@drawable/red_dot_icon" />
</FrameLayout>

<RelativeLayout
    android:id="@+id/RelativeLayoutMain"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginBottom="5dip"
    android:layout_marginLeft="10dip"
    android:layout_marginTop="5dip"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/activityTitleTextViewGroupDetail"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingRight="5dip"
        android:singleLine="true"
        android:text=""
        android:textColor="@android:color/white"
        android:textSize="15sp" />

    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <ImageView
            android:id="@+id/thumbUrlImageView"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_alignParentRight="true" >
        </ImageView>
    </RelativeLayout>

    <ImageView
        android:id="@+id/ArrowImageView"
        android:layout_width="15dip"
        android:layout_height="20dip"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:background="@drawable/arrow1" />

    <ScrollView
        android:id="@+id/ScrollMain"
        android:fillViewport="true"
        android:clickable="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/activityTitleTextViewGroupDetail"
        android:layout_marginTop="3dip" >

        <com.example.app.EllipsizingTextView
            android:id="@+id/messageTextViewGroupDetail"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="left"
            android:paddingRight="10dip"
            android:text=""
            android:textColor="@android:color/white"
            android:textSize="14.5sp" />
    </ScrollView>

    <TextView
        android:id="@+id/StartDateTextViewGroupDetail02"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/ScrollMain"
        android:layout_marginRight="20dip"
        android:layout_marginTop="5dip"
        android:text=""
        android:textColor="@android:color/white"
        android:textSize="12sp" />

    <TextView
        android:id="@+id/dateTextViewGroupDetail"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_below="@+id/StartDateTextViewGroupDetail02"
        android:text=""
        android:textColor="@android:color/white"
        android:textSize="12sp" />
</RelativeLayout>

please find attaced snapshotenter image description here

Matt
  • 14,906
  • 27
  • 99
  • 149
Yogesh Tatwal
  • 2,722
  • 20
  • 43

5 Answers5

0

You should have set TextView inside the scrollView property as android:clickable="true". Remove the cilckable="true" from scrollview

Edit:

set the below properties in TextView:

android:maxLines = "AN_INTEGER"

android:scrollbars = "vertical"

Then use:

textView.setMovementMethod(new ScrollingMovementMethod())

in your code.

Chintan Soni
  • 24,761
  • 25
  • 106
  • 174
0

Add android:clickable="false" android:focusable="false"

0

Try to add android:duplicateParentState=true to your text view.

Also set clickable true to your textview.

Chintan Khetiya
  • 15,962
  • 9
  • 47
  • 85
AkinDin
  • 1
  • 1
  • This code is inflated in listview. Why you don't use the listview listener. – AkinDin Apr 30 '13 at 12:28
  • 1
    Because i have a problem it is not click able after scrollview put – Yogesh Tatwal Apr 30 '13 at 12:34
  • Try to add android:duplicateParentState=true to your scrollview, RelativeLayout and FrameLayout. With this change all these views should take the state from their parent, the listview cell. – AkinDin Apr 30 '13 at 12:40
0

Why scrollview??? Uses android:inputType="textMultiLine" in your textview.

andrehsouza
  • 479
  • 1
  • 5
  • 14
0

Try adding the following attribute to your ScrollView...

android:fillViewport="true"

...and add the following to any children of your ScrollView...

android:clickable="true"

This should allow your EllipsizingTextView to fill the ScrollView area as needed.

Jabari
  • 5,359
  • 3
  • 26
  • 32
  • @YogeshTatwal Also, make sure any children are set to clickable in your XML file. I'll adjust my answer... – Jabari Nov 11 '13 at 21:56
  • Still it is not working but http://stackoverflow.com/a/16480785/1915697 it is working i think it is touch intercept prob – Yogesh Tatwal Nov 12 '13 at 05:43