【发布时间】:2014-10-10 15:02:56
【问题描述】:
在操作栏中有一个 textView。我翻译了textview,但是文本太长而且被剪切或者有点。 我能怎么做?谢谢
这是xml:
<TextView
android:id="@+id/current_team_actionbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="text text text text text text text text text text 5"
android:textColor="#ffff"
android:maxLines='1'
android:textSize="12sp"
android:alpha="0.5" />
LayoutInflater inflater = LayoutInflater.from(this);
View custom = inflater.inflate(R.layout.layout_custom_actionbar, null);
TextView currentTeam = (TextView) custom.findViewById(R.id.current_team_actionbar);
currentTeam.setText("text text text text text text text text");
actionBarTabsMenu.setCustomView(custom);
actionBarTabsMenu.setDisplayShowCustomEnabled(true);
【问题讨论】:
-
要么设置较小的文本大小,要么使用 ellipsize="end" 这样你的文本就不会被剪切
-
您的翻译动画 xml/代码在哪里?
-
Usig ellipsize="end" 有3个点
-
是的,这是预期的结果。你能做的不多了。文字与您的屏幕尺寸重叠。
-
除非你想要一个多行的标题
标签: android textview translate-animation