1

私は、通知ライブラリCROUTON内のアンドロイドでテキストの効果を達成しようとしています。私の機能は下にあります。

public void onCustomNotice(View v) {

    View customView = getLayoutInflater().inflate(R.layout.custom_crouton_layout, null);
    Crouton.show(this, customView);
}

私のカスタムレイアウトは次のとおりです。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#c9dfff"
android:layout_gravity="center"
android:orientation="vertical"
android:paddingTop="15dp"
android:paddingBottom="15dp"
>

<RelativeLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center" >
    <TextView
        android:id="@+id/scroller"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:ellipsize="marquee"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:singleLine="true"
        android:marqueeRepeatLimit="marquee_forever"
        android:maxLines="1"
        android:text="Some veryyyyy long text with all the characters that cannot fit in screen, it so sad :( that I will not scroll"
        android:textAppearance="?android:attr/textAppearanceLarge" />

</RelativeLayout>

</LinearLayout>

通常の textview は marque として機能しますが、クルトン内では機能しません。いくつかの解決策を提案してください。前もって感謝します。:)

このリンクを参照しましたが、期待どおりの回答が得られませんでした。

4

1 に答える 1