Skip to content

Commit

Permalink
不使用BigTextStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
LJN26 committed Jan 23, 2024
1 parent 2fc0f33 commit 587109e
Showing 1 changed file with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
package pansong291.xposed.quickenergy;

import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.app.*;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;

import java.text.DateFormat;

import pansong291.xposed.quickenergy.data.RuntimeInfo;
import pansong291.xposed.quickenergy.util.Config;
import pansong291.xposed.quickenergy.util.TimeUtil;

import java.text.DateFormat;

public class AntForestNotification {
public static final int NOTIFICATION_ID = 99;
public static final String CHANNEL_ID = "pansong291.xposed.quickenergy.repair.ANTFOREST_NOTIFY_CHANNEL";
Expand Down Expand Up @@ -98,13 +95,15 @@ public static void setNextScanTime(long nextScanTime) {
}

private static void innerSetContentText() {
String preContent = (nextScanTime > 0) ? "下次扫描时间" + TimeUtil.getTimeStr(nextScanTime) + "\n" : "";
Notification.BigTextStyle style = new Notification.BigTextStyle();
style.bigText(preContent + contentText);
String preContent = (nextScanTime > 0) ? "下次扫描 " + TimeUtil.getTimeStr(nextScanTime) + "\n" : "";
//Notification.BigTextStyle style = new Notification.BigTextStyle();
//style.bigText(preContent + contentText);
// Notification.InboxStyle style = new Notification.InboxStyle();
// style.addLine(preContent);
// style.addLine(contentText);
builder.setStyle(style);
// builder.setStyle(style);
builder.setContentTitle("芝麻粒 "+preContent);
builder.setContentText(contentText);

mNotification = builder.build();
if (mNotifyManager != null)
Expand Down

0 comments on commit 587109e

Please sign in to comment.