Last active
December 25, 2015 05:09
-
-
Save sakurabird/6922598 to your computer and use it in GitHub Desktop.
(android)TextViewの文字をスクロールする。プログラムから。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextView tv = (TextView) findViewById(R.id.text); | |
tv.setSingleLine(); // 文字列を1行で表示. これがないと複数行に渡って表示されてしまうので、スクロールできない | |
tv.setFocusableInTouchMode(true); | |
tv.setEllipsize(TruncateAt.MARQUEE); | |
tv.setText("124567890-^9p@焦ったスクロールskxってちょうど私もでらっしゃるのかしら"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment