关于这一点的任何身体想法,如何在textview上设置下划线文字?如果是的话,请告诉我.
我使用了以下代码,但它不起作用.
tvHide.setText(Html.fromHtml("<p><u>Hide post</u></p>").toString());
Run Code Online (Sandbox Code Playgroud)
提前致谢
我反编译我的系统音乐应用程序(来自索尼爱立信Android版2.3.7),因为我想更改通知布局.我找到了使用此代码创建通知的方法:
private void sendStatusBarNotification(Track paramTrack)
{
if (paramTrack != null)
{
NotificationManager localNotificationManager = (NotificationManager)this.mContext.getSystemService("notification");
String str = paramTrack.getArtist();
if ((str == null) || (str.equals(this.mContext.getString(2131361954))))
str = this.mContext.getString(2131361798);
Notification localNotification = new Notification(2130837696, paramTrack.getTitle() + " - " + str, System.currentTimeMillis());
localNotification.flags = (0x2 | localNotification.flags);
localNotification.flags = (0x20 | localNotification.flags);
PendingIntent localPendingIntent = PendingIntent.getActivity(this.mContext, 0, new Intent(this.mContext, MusicActivity.class), 268435456);
localNotification.setLatestEventInfo(this.mContext, paramTrack.getTitle(), str, localPendingIntent);
localNotificationManager.notify(0, localNotification);
}
}
Run Code Online (Sandbox Code Playgroud)
我现在的问题是:如何更改通知布局?我想构建一个看起来像原始Android通知布局但在通知右侧有一个额外图像的布局.我怎样才能做到这一点?
我想在此图片中创建一个类似红色边框通知的通知:

我知道如何在此图像中创建普通通知,例如蓝色边框通知,但我想在其附近显示一个图标和大约3行信息.我怎样才能做到这一点?任何建议将不胜感激.