I use a checkable listview ( I've set : Mylistview.setChoiceMode(1)
).
Inside each row I have 2 ImageViews and 2 TextViews.
I'd like that when my item is checked, the text inside the TextViews scrolls if the text is too long. So in the XML of my row, I've assign the following to both of my TextViews :
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
Unfortunately, this will make the text scroll only if the item is focused and not checked.
So the solution I think about are :
1) Make my own Custom TextView class and make it focus itself when checked (I don't know if it is possible ?)
2) Put the focus to the checked item even if we're in touch mode (use SetFocusableInTouchMode
)
I haven't achieved to do the 2nd solution and I don't know which method override if I want to make my own own Custom TextView.
Could you help me to make the text scroll when the item is checked ? Thanks.