notification_with_progress_bar.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. ownCloud Android client application
  4. Copyright (C) 2014 ownCloud Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License version 2,
  7. as published by the Free Software Foundation.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. -->
  15. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  16. android:layout_width="match_parent"
  17. android:layout_height="match_parent"
  18. >
  19. <ImageView android:id="@+id/icon"
  20. android:layout_width="@android:dimen/notification_large_icon_width"
  21. android:layout_height="@android:dimen/notification_large_icon_height"
  22. android:scaleType="center"
  23. />
  24. <LinearLayout
  25. android:layout_width="match_parent"
  26. android:layout_height="wrap_content"
  27. android:layout_gravity="center"
  28. android:minHeight="64dp"
  29. android:orientation="vertical"
  30. android:paddingRight="12dp"
  31. android:paddingLeft="12dp"
  32. >
  33. <TextView android:id="@+id/title"
  34. android:layout_width="match_parent"
  35. android:layout_height="wrap_content"
  36. android:singleLine="true"
  37. android:ellipsize="marquee"
  38. android:fadingEdge="horizontal"
  39. style="@style/Theme.ownCloud.NotificationText.Title"
  40. />
  41. <TextView android:id="@+id/text"
  42. android:layout_width="match_parent"
  43. android:layout_height="wrap_content"
  44. android:layout_marginTop="-2dp"
  45. android:layout_marginBottom="-2dp"
  46. android:singleLine="true"
  47. android:fadingEdge="horizontal"
  48. android:ellipsize="marquee"
  49. style="@style/Theme.ownCloud.NotificationText.Content"
  50. />
  51. <FrameLayout android:id="@+id/progressHolder"
  52. android:layout_width="match_parent"
  53. android:layout_height="12dp"
  54. >
  55. <!-- the FrameLayout is needed to change visibility of the
  56. progress bar in Android 2.2, even though
  57. https://code.google.com/p/android/issues/detail?id=11040 -->
  58. <ProgressBar
  59. android:id="@+id/progress"
  60. android:layout_width="match_parent"
  61. android:layout_height="match_parent"
  62. style="?android:attr/progressBarStyleHorizontal"
  63. />
  64. </FrameLayout>
  65. </LinearLayout>
  66. </LinearLayout>