2017-02-21 5 views
0

// 3を使用して、それを表示する通知 通知通知を作成し、送信=新しいNotificationCompat.Builder(この) .setSmallIcon(R.mipmap.ic_launcher)通知に表示されないアイコン:白い四角ではなく示すとミップマップランチャー

  .setContentTitle("Geofence Monitor") 

      .setContentText(text) 
      .setContentIntent(pendingNotificationIntent) 
      .setStyle(new NotificationCompat.BigTextStyle().bigText(bigText)) 
      .setPriority(NotificationCompat.PRIORITY_HIGH) 
      .setAutoCancel(true) 
      .build(); 
    notificationManager.notify(0, notification); 
    if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { 


     new NotificationCompat.Builder(this).setSmallIcon(R.mipmap.ic_launcher); 
    } else { 
     new NotificationCompat.Builder(this) .setSmallIcon(R.mipmap.ic_launcher); 
    } 

} 

}

私の質問私は、デバイス上のアプリがあるアプリケーションを実行するとミップマップランチャーをサポートしていますが、loolipopにし、上記の白色を表示しないdevicesisと私は同じミップマップ・ランチャーを表示したいですロリポップ以上のデバイス。 ありがとうございました!

答えて

0

さまざまなドロウアブルフォルダに対して適切なサイズを維持する必要があります。

これらの提案のサイズを試してみてください:64×64(xhdpi) 72×72の領域における48×48(hdpi) 48×48の領域における32×32(MDPI) 36×36領域内 24×24エリア96×96のガイドライン以下(xxhdpi)128×128(xxxhdpi)

で 96×96の領域としてみてくださいhere

関連する問題