android - 带字幕的 TextView ,没有结束空间

标签 android

我使用下面的代码创建了带选取框的 Textview。但是选取框文本和起始位置之间有一些空间。如何解决这个问题?

<TextView 
  android:id="@+id/capture_mode"
  android:layout_width="200px"
  android:layout_height="wrap_content"           
  android:text="This is a test of marquee on the text view in android."
  android:ellipsize="marquee"
  android:scrollHorizontally="true"
  android:singleLine="true"
  android:focusable="true"
  android:focusableInTouchMode="true"
  android:marqueeRepeatLimit="marquee_forever"
  />

屏幕如下。

enter image description here

注意:我需要添加两个带字幕的textview。但是第一个只是滚动,另一个是空闲的。如何添加两个带字幕的textview。

最佳答案

在你的 TextView 中试试这个:

android:gravity="左"

关于android - 带字幕的 TextView ,没有结束空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20773404/

相关文章:

java - Gson - 检查节点/元素是否存在的正确方法

android - 编译ShowcaseViewSample时出错

android - TextView.setText 中未显示 Unicode 字符

java - Realm :更改字段名称以进行迁移

android - 如何在Kotlin Android UI测试中初始化模拟的外部依赖项

android - 如何在相对布局中添加底部边框

android - Javafx和Android-Api

android - 如何使 FileProvider 为可绘制对象提供服务?

android - 将图标与 ActionBar 的主页按钮对齐

android - Android中的状态栏覆盖操作栏