PHP Code Editor
<!DOCTYPE html> <html lang="id"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Mock Notifikasi - Opsi 1 (System Integrated)</title> <style> body { background-color: #0d1117; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } /* Area Abu-abu ini adalah simulasi "System Wrapper" yang disediakan otomatis oleh Android (DecoratedCustomViewStyle). Anda TIDAK PERLU membuat ini di XML. */ .system-notification-wrapper { background: #ffffff; border-radius: 16px; /* Sudut sistem */ width: 360px; padding: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); position: relative; border: 1px solid #ddd; } /* Header Sistem (Otomatis dari Android) */ .system-header { display: flex; align-items: center; margin-bottom: 8px; color: #444; font-size: 12px; opacity: 0.7; /* Simulasi tampilan sistem */ } .system-icon { width: 16px; height: 16px; background-color: #007bff; border-radius: 50%; margin-right: 6px; } /* Area Border Biru Putus-putus ini adalah area yang dikontrol oleh "notification_custom.xml" Anda. Perhatikan: TIDAK ADA padding atau border ganda di sini. */ .custom-content-area { /* Hapus border/background "card" di sini agar menyatu */ /* border: 1px dashed blue; Area debug visual */ display: flex; justify-content: space-between; align-items: center; } .text-content { flex: 1; padding-right: 12px; } .title { font-size: 15px; font-weight: bold; color: #000; margin-bottom: 2px; } .body { font-size: 13px; color: #444; line-height: 1.4; } .avatar-image { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; /* Gambar akan dimuat dari URL */ background-image: url('https://ui-avatars.com/api/?name=Rijal&background=0D8ABC&color=fff'); background-size: cover; } </style> </head> <body> <!-- Simulasi Hasil Akhir di Android --> <div class="system-notification-wrapper"> <!-- Bagian ini digambar oleh Sistem (DecoratedCustomViewStyle) --> <div class="system-header"> <div class="system-icon"></div> <span style="flex-grow:1; font-weight:600;">RSL-ChatX • sekarang</span> <span>⌄</span> </div> <!-- Bagian ini adalah notification_custom.xml Anda --> <!-- PERHATIKAN: Langsung konten, tanpa border/padding tambahan --> <div class="custom-content-area"> <div class="text-content"> <div class="title">Rijal</div> <div class="body">Testing lagi.. 😄😘👍<br>Testing.. 🤭</div> </div> <!-- ImageView yang akan diisi Bitmap --> <div class="avatar-image"></div> </div> </div> </body> </html>
Run Code
<!DOCTYPE html> <html lang="id"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Mock Notifikasi - Opsi 1 (System Integrated)</title> <style> body { background-color: #0d1117; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } /* Area Abu-abu ini adalah simulasi "System Wrapper" yang disediakan otomatis oleh Android (DecoratedCustomViewStyle). Anda TIDAK PERLU membuat ini di XML. */ .system-notification-wrapper { background: #ffffff; border-radius: 16px; /* Sudut sistem */ width: 360px; padding: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); position: relative; border: 1px solid #ddd; } /* Header Sistem (Otomatis dari Android) */ .system-header { display: flex; align-items: center; margin-bottom: 8px; color: #444; font-size: 12px; opacity: 0.7; /* Simulasi tampilan sistem */ } .system-icon { width: 16px; height: 16px; background-color: #007bff; border-radius: 50%; margin-right: 6px; } /* Area Border Biru Putus-putus ini adalah area yang dikontrol oleh "notification_custom.xml" Anda. Perhatikan: TIDAK ADA padding atau border ganda di sini. */ .custom-content-area { /* Hapus border/background "card" di sini agar menyatu */ /* border: 1px dashed blue; Area debug visual */ display: flex; justify-content: space-between; align-items: center; } .text-content { flex: 1; padding-right: 12px; } .title { font-size: 15px; font-weight: bold; color: #000; margin-bottom: 2px; } .body { font-size: 13px; color: #444; line-height: 1.4; } .avatar-image { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; /* Gambar akan dimuat dari URL */ background-image: url('https://ui-avatars.com/api/?name=Rijal&background=0D8ABC&color=fff'); background-size: cover; } </style> </head> <body> <!-- Simulasi Hasil Akhir di Android --> <div class="system-notification-wrapper"> <!-- Bagian ini digambar oleh Sistem (DecoratedCustomViewStyle) --> <div class="system-header"> <div class="system-icon"></div> <span style="flex-grow:1; font-weight:600;">RSL-ChatX • sekarang</span> <span>⌄</span> </div> <!-- Bagian ini adalah notification_custom.xml Anda --> <!-- PERHATIKAN: Langsung konten, tanpa border/padding tambahan --> <div class="custom-content-area"> <div class="text-content"> <div class="title">Rijal</div> <div class="body">Testing lagi.. 😄😘👍<br>Testing.. 🤭</div> </div> <!-- ImageView yang akan diisi Bitmap --> <div class="avatar-image"></div> </div> </div> </body> </html>
Run Code New Tab
Result