我需要使用更長的文本創建通知,這可能嗎?默認情況下不是,但你可以使用custom layout,這正是我所做的。現在我可以顯示多行,但正如您所看到的那樣,文本仍然被打破/未完全顯示? ):有人可以告訴我我做錯了什麼/如果通知的大小有固定的限制嗎?如果你看截圖,你會注意到,仍然有很多空間......感謝任何提示!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>
嘗試使用'layout_height = 「WRAP_CONTENT」'所有你的意見。 – Felix 2011-06-15 12:13:55
謝謝,但這並沒有改變任何東西): – 2011-06-15 12:17:25
據我所知,你不能通知任何大於屏幕截圖中顯示的默認大小,但我可能是錯的。 – 2011-06-15 12:17:26