相关疑难解决方法(0)

具有较长文本的Android多行通知/通知

我需要创建一个包含更长文本的通知,这可能吗?默认情况下不是,但您可以使用自定义布局,这就是我所做的.现在我可以显示多行,但正如您所看到的,文本仍然被破坏/未完全显示?):有人可以告诉我我做错了什么/如果通知的大小有固定的限制吗?如果你看一下屏幕截图,你会注意到,还剩下很多空间......感谢任何提示!

BTW这里是用于自定义布局的XML,基于http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomNotification

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:orientation="horizontal"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:padding="3dp"
          >
<ImageView android:id="@+id/image"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_marginRight="10dp"
          />
<TextView android:id="@+id/text"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:textColor="#000"
          />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

更长的通知文本

notifications android

21
推荐指数
4
解决办法
5万
查看次数

标签 统计

android ×1

notifications ×1