gpt4 book ai didi

Android Textview 字幕不工作。

转载 作者:行者123 更新时间:2023-11-29 00:24:25 26 4
gpt4 key购买 nike

为什么下面的代码不起作用。我在布局的其他部分有类似的东西并且它有效。但这部分不起作用。有什么想法吗?

    <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:paddingLeft="50dip"
android:paddingRight="50dip"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_gravity="center_vertical"
android:id="@+id/statusTvBottom"
android:text="Status: "
android:layout_marginLeft="5dp">
</TextView>
</LinearLayout>

最佳答案

首先,文本必须比“方框”长才能选框,如果合适的话——没有选框。我使用这段代码:

<TextView
android:id="@+id/availability"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center_vertical|center_horizontal"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="#343434"
android:textSize="@dimen/text_size_medium"
android:textStyle="bold|italic" />

设置 android:focusable="false"android:focusableInTouchMode="false" 允许它在没有焦点的情况下选取框。

关于Android Textview 字幕不工作。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20764365/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com