diff options
Diffstat (limited to 'NotificationListenerSample/res')
-rw-r--r-- | NotificationListenerSample/res/drawable-hdpi/dialog_ic_dismiss.png | bin | 0 -> 347 bytes | |||
-rw-r--r-- | NotificationListenerSample/res/drawable-hdpi/icon.png | bin | 0 -> 7828 bytes | |||
-rw-r--r-- | NotificationListenerSample/res/drawable-mdpi/dialog_ic_dismiss.png | bin | 0 -> 313 bytes | |||
-rw-r--r-- | NotificationListenerSample/res/drawable-mdpi/icon.png | bin | 0 -> 4287 bytes | |||
-rw-r--r-- | NotificationListenerSample/res/drawable-xhdpi/dialog_ic_dismiss.png | bin | 0 -> 398 bytes | |||
-rw-r--r-- | NotificationListenerSample/res/drawable-xhdpi/icon.png | bin | 0 -> 12264 bytes | |||
-rw-r--r-- | NotificationListenerSample/res/drawable-xxhdpi/dialog_ic_dismiss.png | bin | 0 -> 321 bytes | |||
-rw-r--r-- | NotificationListenerSample/res/drawable-xxhdpi/icon.png | bin | 0 -> 22796 bytes | |||
-rw-r--r-- | NotificationListenerSample/res/layout/item.xml | 32 | ||||
-rw-r--r-- | NotificationListenerSample/res/layout/main.xml | 50 | ||||
-rw-r--r-- | NotificationListenerSample/res/values/strings.xml | 31 |
11 files changed, 113 insertions, 0 deletions
diff --git a/NotificationListenerSample/res/drawable-hdpi/dialog_ic_dismiss.png b/NotificationListenerSample/res/drawable-hdpi/dialog_ic_dismiss.png Binary files differnew file mode 100644 index 0000000..1aca4b7 --- /dev/null +++ b/NotificationListenerSample/res/drawable-hdpi/dialog_ic_dismiss.png diff --git a/NotificationListenerSample/res/drawable-hdpi/icon.png b/NotificationListenerSample/res/drawable-hdpi/icon.png Binary files differnew file mode 100644 index 0000000..bc976fa --- /dev/null +++ b/NotificationListenerSample/res/drawable-hdpi/icon.png diff --git a/NotificationListenerSample/res/drawable-mdpi/dialog_ic_dismiss.png b/NotificationListenerSample/res/drawable-mdpi/dialog_ic_dismiss.png Binary files differnew file mode 100644 index 0000000..6a2fb5e --- /dev/null +++ b/NotificationListenerSample/res/drawable-mdpi/dialog_ic_dismiss.png diff --git a/NotificationListenerSample/res/drawable-mdpi/icon.png b/NotificationListenerSample/res/drawable-mdpi/icon.png Binary files differnew file mode 100644 index 0000000..e8f7538 --- /dev/null +++ b/NotificationListenerSample/res/drawable-mdpi/icon.png diff --git a/NotificationListenerSample/res/drawable-xhdpi/dialog_ic_dismiss.png b/NotificationListenerSample/res/drawable-xhdpi/dialog_ic_dismiss.png Binary files differnew file mode 100644 index 0000000..e11f2e3 --- /dev/null +++ b/NotificationListenerSample/res/drawable-xhdpi/dialog_ic_dismiss.png diff --git a/NotificationListenerSample/res/drawable-xhdpi/icon.png b/NotificationListenerSample/res/drawable-xhdpi/icon.png Binary files differnew file mode 100644 index 0000000..002515c --- /dev/null +++ b/NotificationListenerSample/res/drawable-xhdpi/icon.png diff --git a/NotificationListenerSample/res/drawable-xxhdpi/dialog_ic_dismiss.png b/NotificationListenerSample/res/drawable-xxhdpi/dialog_ic_dismiss.png Binary files differnew file mode 100644 index 0000000..8d185f4 --- /dev/null +++ b/NotificationListenerSample/res/drawable-xxhdpi/dialog_ic_dismiss.png diff --git a/NotificationListenerSample/res/drawable-xxhdpi/icon.png b/NotificationListenerSample/res/drawable-xxhdpi/icon.png Binary files differnew file mode 100644 index 0000000..e78554f --- /dev/null +++ b/NotificationListenerSample/res/drawable-xxhdpi/icon.png diff --git a/NotificationListenerSample/res/layout/item.xml b/NotificationListenerSample/res/layout/item.xml new file mode 100644 index 0000000..2d9a5ed --- /dev/null +++ b/NotificationListenerSample/res/layout/item.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="match_parent" + android:layout_width="wrap_content" + android:padding="4dp"> + <FrameLayout android:id="@+id/remote_view" + android:layout_height="match_parent" + android:layout_width="wrap_content" + android:onClick="launch" + /> + <ImageButton android:id="@+id/dismiss" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top|end" + android:src="@drawable/dialog_ic_dismiss" + android:onClick="dismiss" + /> +</FrameLayout>
\ No newline at end of file diff --git a/NotificationListenerSample/res/layout/main.xml b/NotificationListenerSample/res/layout/main.xml new file mode 100644 index 0000000..44c9da4 --- /dev/null +++ b/NotificationListenerSample/res/layout/main.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:padding="12dp" + > + <ListView + android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="0dp" + android:padding="4dp" + android:layout_marginBottom="16dp" + android:text="@string/working_as_intended" + android:layout_weight="1" + android:choiceMode="singleChoice" + /> + + <TextView android:id="@android:id/empty" + android:layout_width="match_parent" + android:layout_height="0dp" + android:padding="4dp" + android:layout_marginBottom="16dp" + android:text="@string/working_as_intended" + android:layout_weight="1" + /> + <Button + android:id="@+id/launch_settings" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/launch_to_disable" + android:onClick="launchSettings" + android:layout_weight="0" + /> +</LinearLayout> + diff --git a/NotificationListenerSample/res/values/strings.xml b/NotificationListenerSample/res/values/strings.xml new file mode 100644 index 0000000..5c74fda --- /dev/null +++ b/NotificationListenerSample/res/values/strings.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <string name="app_name">NotificationListener</string> + <string name="long_app_name">Notification Listener Sample</string> + <string name="service_name">Sample Notification Listener</string> + <string name="working_as_intended">Service is running. Disable it in Security Settings.</string> + <string name="waiting_for_content">Service is running. Waiting for notifications to arrive.</string> + <string name="nothing_to_see">Service is disabled. You must enabled it to see notifications.</string> + <string name="launch_to_disable">Press to disable service</string> + <string name="launch_to_enable">Press to enable service</string> + <string name="explanation">This app demonstrates use of the Notification Listener Service API. + You must enable the listener service in Security Settings to see it work. + </string> + <string name="disabled">Service is not running.</string> + <string name="enable_it">Enable</string> + <string name="cancel">Cancel</string> +</resources> |