diff --git a/res/layout/notification.xml b/res/layout/notification.xml index 4ec387c..2498f6b 100644 --- a/res/layout/notification.xml +++ b/res/layout/notification.xml @@ -3,10 +3,15 @@ android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> - + diff --git a/src/org/galexander/sshd/SimpleSSHDService.java b/src/org/galexander/sshd/SimpleSSHDService.java index f6fee53..8addad1 100644 --- a/src/org/galexander/sshd/SimpleSSHDService.java +++ b/src/org/galexander/sshd/SimpleSSHDService.java @@ -70,6 +70,12 @@ public class SimpleSSHDService extends Service { n.contentView = new RemoteViews(getPackageName(), R.layout.notification); + /* for some reason icon cannot be defined in xml: */ + n.contentView.setImageViewResource(R.id.n_icon, + R.drawable.icon); + n.contentView.setTextViewText(R.id.n_text, + "SimpleSSHD listening on "+SimpleSSHD.get_ip()+ + ":"+Prefs.get_port()); startForeground(1, n); }