Text Android Crouton自定义视图没有';不允许文本滚动(选框效果)
我一直在尝试在通知库中实现android上文本的标记效果。我的职责正在审查中Text Android Crouton自定义视图没有';不允许文本滚动(选框效果),text,scroll,marquee,crouton-os,Text,Scroll,Marquee,Crouton Os,我一直在尝试在通知库中实现android上文本的标记效果。我的职责正在审查中 public void onCustomNotice(View v) { View customView = getLayoutInflater().inflate(R.layout.custom_crouton_layout, null); Crouton.show(this, customView); } 我的自定义布局如下所示 <?xml version="1.0" encoding="
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可以作为品牌使用,但在crouton内部则不行。请提出一些解决办法。提前谢谢。:)
我引用了这个链接,但并没有得到预期的答案。我建议您使用snackbar库,它非常灵活。看看这个 www.github.com/nispok/snackbar
还有很多其他的动画。正是我想要的