I have been looking at other threads but I couldn't find an answer so here comes my question:
Is it possible to create a automatically horizontal scrolling TextView with a button to the right of it using layout_weight?
"My incredibly long search text here" "The button"
I have tried to make a scrollable textview with "fill_parent" instead of 0dp and layout_weight as well but then the entire text takes up the "row" (obviously since it is fill_parent) and the button is not shown AND the text didn't scroll horizontally even then when I ran it in the android virtual device.
Edit: forgot to write how I tried to make the scrollable textview
<TextView
android:singleLine="true"
android:scrollHorizontally="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/searchResult"
android:focusable="true"
android:focusableInTouchMode="true"/>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…