Android TextView AutoScroll
<p>I am trying to implement autoscroll in textviews in a table layout. I see that autoscroll is happening only for first textview box and not for all boxes.</p><pre><br /><code> <TableRow<br /> android:id="@+id/GuessWordtableRow1"<br /> android:layout_width="match_parent"<br /> android:layout_height="match_parent"<br /> android:layout_margin="1dip"<br /> android:layout_weight="1"<br /> android:background="#d65906" ><br /><br /> <TextView<br /> android:id="@+id/GuessWordtextView1a"<br /> android:layout_width="wrap_content"<br /> android:layout_height="match_parent"<br /> android:layout_margin="1dip"<br /> android:background="#fcc480"<br /> android:gravity="center"<br /> android:padding="1dip"<br /> android:text="1" ><br /> </TextView><br /><br /> <TextView<br /> android:id="@+id/GuessWordtextView11"<br /> android:layout_width="wrap_content"<br /> android:layout_height="match_parent"<br /> android:singleLine="true"<br /> android:ellipsize="marquee"<br /> android:marqueeRepeatLimit="marquee_forever"<br /> android:focusable="true"<br /> android:focusableInTouchMode="true"<br /> android:scrollHorizontally="true"<br /> android:layout_margin="1dip"<br /> android:layout_weight="1"<br /> android:background="#fcc480"<br /> android:clickable="false"<br /> android:gravity="center_vertical"<br /> android:padding="1dip"<br /> android:text="This is a very big statement which has to scroll" ><br /><br /> </TextView><br /><br /> <TextView<br /> android:id="@+id/GuessWordtextView12"<br /> android:layout_width="wrap_content"<br /> android:layout_height="match_parent"<br /> android:singleLine="true"<br /> android:ellipsize="marquee"<br /> android:marqueeRepeatLimit="marquee_forever"<br /> android:focusable="true"<br /> android:focusableInTouchMode="true"<br /> android:scrollHorizontally="true"<br /> android:layout_margin="1dip"<br /> android:layout_weight="1"<br /> android:clickable="false"<br /> android:gravity="center_vertical"<br /> android:background="#fcc480"<br /> android:padding="1dip"<br /> android:text="This is a very big statement which has to scroll" ><br /> </TextView><br /><br /> <TextView<br /> android:id="@+id/GuessWordtextView13"<br /> android:layout_width="wrap_content"<br /> android:layout_height="match_parent"<br /> android:singleLine="true"<br /> android:ellipsize="marquee"<br /> android:marqueeRepeatLimit="marquee_forever"<br /> android:focusable="true"<br /> android:focusableInTouchMode="true"<br /> android:scrollHorizontally="true"<br /> android:layout_margin="1dip"<br /> android:clickable="false"<br /> android:layout_weight="1"<br /> android:gravity="center_vertical"<br /> android:background="#fcc480"<br /> android:padding="1dip"<br /> android:text="This is a very big statement which has to scroll" ><br /> </TextView><br /> </TableRow><br /></code><br /></pre><p>This is what I have. I see that text is scrolling only for textview id GuessWordtextView11 and not for GuessWordtextView12 and GuessWordtextView13. What could be the reason?</p><br /><h2>Click here view more answers <a href="%20http://stackoverflow.com/questions/34470267/android-textview-autoscroll">http://ift.tt/1MA9S8j</a></h2>
Nhận xét
Đăng nhận xét