2
我在我的應用程序中有一個垂直滾動的textview。運行良好,但沒有任何「動畫」,所以看起來不是很漂亮。我怎樣才能實現流暢的動畫?如果需要:如何使一個平滑的可滾動textview?
了java:
TextView textscroll = (TextView) rootView.findViewById(R.id.textscroll);
textscroll.setText(getCPUinfo());
textscroll.setMovementMethod(new ScrollingMovementMethod());
和XML:
<TextView
android:id="@+id/CPUinfo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:maxLines="10"
tools:ignore="SelectableText" />
我不知道爲什麼,但對我來說這種方法不會:( –