gpt4 book ai didi

android - 即使尝试了所有方法,我也无法在 Android 中获得字幕效果

转载 作者:行者123 更新时间:2023-11-29 21:15:19 25 4
gpt4 key购买 nike

<分区>

public class Crunk extends Activity {
TextView textView = null;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_crunk);
Button button = null;

button = (Button)findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {
Log.e("It's Clicked", "Don't Worry");
textView.setText("SeeMe");
textView.setEllipsize(TruncateAt.MARQUEE);

}
});
textView = (TextView)this.findViewById(R.id.textView1);
textView.setSelected(true);
textView.setText("Waitin'....");
}

此代码仅显示文本,不显示字幕效果。

帮我弄出效果。

我希望文本在点击按钮时显示效果。

尝试了大部分方法还是得不到想要的效果....

        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="180dp"
android:text="@string/TapMe" />

<TextView
android:text="@string/SeeMe"
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="51dp"

android:textAppearance="?android:attr/textAppearanceLarge" />

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