在我的应用程序中有一个自定义通知,具有以下布局.我的问题是选框不起作用.请帮助我.提前致谢
> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/notification_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp" >
<ImageView
android:id="@+id/notification_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/icon" />
<TextView
android:id="@+id/notification_title"
style="@style/NotificationTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/notification_image"
android:text="asaadsadad" />
<TextView
android:id="@+id/notification_message"
style="@style/NotificationText"
android:layout_width="wrap_content"
android:ellipsize="marquee"
android:lines="1"
android:marqueeRepeatLimit="marquee_forever"
android:layout_height="wrap_content"
android:layout_below="@+id/notification_title"
android:layout_toRightOf="@+id/notification_image"
android:text="@string/four_day_delay_msg"
android:focusable="true" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
可以在通知中添加滚动吗?
好吧,我花了相当多的时间研究这个问题,我认为可以肯定地说,为了实现这个目标,还有一些重大障碍需要克服.值得注意的是,有一些Google Apps在其自定义通知中使用选框的示例,但是它们在他们的HoneyComb Android 4.0版本中,所以他们可能修复了我即将解决的问题.此外,我还没有看到像谷歌音乐这样的谷歌应用程序中实现的marquee,它应该标记长歌名称或艺术家.
我喜欢编号列表......
资源...
自定义组件 - AutoScrolling Marquee TextView - http://androidbears.stellarpc.net/?p=185
自定义组件 - 相对布局onFinishInflate() - Android:如何创建自定义组件 - http://www.devdaily.com/java/jwarehouse/android/core/java/android/widget/TwoLineListItem.java.shtml
谷歌应用程序与自定义通知中的Marquee示例(TextView标题为:notification_title) - http://developer.android.com/resources/samples/HoneycombGallery/res/layout/notification.html