मैंने अपने सिस्टम संगीत ऐप को डिमंपिल्ड किया (एंड्रॉइड जीबी 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);
}
}
मेरा प्रश्न अब है: मैं अधिसूचना लेआउट कैसे बदल सकता हूं? मैं एक लेआउट बनाना चाहता हूं जो मूल एंड्रॉइड अधिसूचना लेआउट की तरह दिखता है लेकिन अधिसूचना के दाईं ओर एक अतिरिक्त छवि के साथ। मैं यह कैसे कर सकता हूँ?
कि के लिए धन्यवाद। आपको बक्षीस मिलेगा लेकिन मैं इसे आपको एक घंटे में दे सकता हूं;) – Cilenco
@Cilenco कोई समस्या नहीं प्रिय। मैंने आपको बक्षीस के लिए बिल्कुल मदद नहीं की। मुझे बस खुशी है कि मेरा समाधान आपके लिए काम करता है, यह है ... :) मुझे जो कुछ भी पता है, उससे लोगों की मदद करना अच्छा लगता है। हैप्पी कोडिंग ...! –
@ shree202 मुझे एक सुझाव देता है। मैं इस लिंक की तरह प्ले/पॉज़ को नियंत्रित करने के लिए रिमोट व्यू का उपयोग करके एक अधिसूचना बड़ा दृश्य बनाता हूं (स्टैक ओवरफ्लो।कॉम/प्रश्न/1450836 9/...) सभी सही हैं, लेकिन जब मैं डिवाइस से बैक बटन पर क्लिक करता हूं और एप्लिकेशन से बाहर क्लिक करता हूं तो ईवेंट (प्ले/पॉज़/फॉरवर्ड/क्लोज़) बटन काम नहीं करता है। कृपया मेरी मदद करें। –