【发布时间】:2023-03-19 22:06:02
【问题描述】:
我可以通过滑动手势在设备处理的前台运行相对或线性布局吗?我有这个前台服务代码,但它只有一个通知作为例子,我还没有在网上找到使用布局的东西。代码如下:
Notification notification = new Notification(R.drawable.icon, getText(R.string.ticker_text),
System.currentTimeMillis());
Intent notificationIntent = new Intent(this, ExampleActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
notification.setLatestEventInfo(this, getText(R.string.notification_title),
getText(R.string.notification_message), pendingIntent);
startForeground(ONGOING_NOTIFICATION_ID, notification);
【问题讨论】:
-
根据您的需要,这里有一个关于 Facebook 如何实现聊天头的问题。 stackoverflow.com/questions/15975988/…
标签: android android-service foreground