account_item.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Nextcloud Android client application
  4. Copyright (C) 2016 Andy Scherzinger
  5. Copyright (C) 2016 Nextcloud
  6. Copyright (C) 2016 ownCloud
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  9. License as published by the Free Software Foundation; either
  10. version 3 of the License, or any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  15. You should have received a copy of the GNU Affero General Public
  16. License along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. -->
  18. <RelativeLayout
  19. xmlns:android="http://schemas.android.com/apk/res/android"
  20. android:layout_width="fill_parent"
  21. android:layout_height="@dimen/account_item_layout_height"
  22. android:orientation="horizontal"
  23. android:weightSum="1">
  24. <FrameLayout
  25. android:id="@+id/avatar_container"
  26. android:layout_width="wrap_content"
  27. android:layout_height="wrap_content"
  28. android:layout_centerVertical="true"
  29. android:layout_alignParentLeft="true"
  30. android:layout_alignParentStart="true">
  31. <ImageView
  32. android:id="@+id/user_icon"
  33. android:layout_width="@dimen/user_icon_size"
  34. android:layout_height="@dimen/user_icon_size"
  35. android:layout_gravity="top|left"
  36. android:layout_marginBottom="1dp"
  37. android:layout_marginLeft="12dp"
  38. android:layout_marginRight="1dp"
  39. android:layout_marginTop="1dp"
  40. android:src="@drawable/ic_menu_archive"/>
  41. <ImageView
  42. android:id="@+id/ticker"
  43. android:layout_width="wrap_content"
  44. android:layout_height="wrap_content"
  45. android:layout_gravity="bottom|right"
  46. android:background="@drawable/round_bgnd"
  47. android:src="@drawable/ic_account_circle_white_18dp"
  48. android:tint="@color/actionbar_start_color"/>
  49. </FrameLayout>
  50. <LinearLayout
  51. android:layout_width="match_parent"
  52. android:layout_height="wrap_content"
  53. android:layout_centerInParent="true"
  54. android:layout_toEndOf="@id/avatar_container"
  55. android:layout_toLeftOf="@+id/passwordButton"
  56. android:layout_toRightOf="@id/avatar_container"
  57. android:layout_toStartOf="@id/passwordButton"
  58. android:orientation="vertical">
  59. <TextView
  60. android:id="@+id/user_name"
  61. android:layout_width="match_parent"
  62. android:layout_height="wrap_content"
  63. android:layout_marginEnd="@dimen/standard_half_margin"
  64. android:layout_marginLeft="@dimen/standard_half_margin"
  65. android:layout_marginRight="@dimen/standard_half_margin"
  66. android:layout_marginStart="@dimen/standard_margin"
  67. android:layout_marginTop="4dp"
  68. android:ellipsize="end"
  69. android:gravity="bottom"
  70. android:maxLines="1"
  71. android:text="@string/placeholder_filename"
  72. android:textAppearance="?android:attr/textAppearanceListItem"/>
  73. <TextView
  74. android:id="@+id/account"
  75. android:layout_width="match_parent"
  76. android:layout_height="wrap_content"
  77. android:layout_marginBottom="4dp"
  78. android:layout_marginEnd="@dimen/standard_half_margin"
  79. android:layout_marginLeft="@dimen/standard_half_margin"
  80. android:layout_marginRight="@dimen/standard_half_margin"
  81. android:layout_marginStart="@dimen/standard_margin"
  82. android:ellipsize="end"
  83. android:gravity="top"
  84. android:maxLines="2"
  85. android:text="@string/placeholder_sentence"
  86. android:textColor="?android:attr/textColorSecondary"/>
  87. </LinearLayout>
  88. <ImageView
  89. android:id="@+id/passwordButton"
  90. android:layout_width="wrap_content"
  91. android:layout_height="wrap_content"
  92. android:layout_centerInParent="true"
  93. android:layout_gravity="center_vertical"
  94. android:layout_toLeftOf="@+id/removeButton"
  95. android:layout_toStartOf="@id/removeButton"
  96. android:paddingBottom="@dimen/standard_padding"
  97. android:paddingLeft="@dimen/standard_half_padding"
  98. android:paddingRight="@dimen/standard_half_padding"
  99. android:paddingTop="@dimen/standard_padding"
  100. android:src="@drawable/ic_key"/>
  101. <ImageView
  102. android:id="@+id/removeButton"
  103. android:layout_width="wrap_content"
  104. android:layout_height="wrap_content"
  105. android:layout_alignParentEnd="true"
  106. android:layout_alignParentRight="true"
  107. android:layout_centerInParent="true"
  108. android:layout_gravity="center_vertical"
  109. android:paddingBottom="@dimen/standard_padding"
  110. android:paddingLeft="@dimen/standard_half_padding"
  111. android:paddingRight="@dimen/standard_padding"
  112. android:paddingTop="@dimen/standard_padding"
  113. android:src="@drawable/ic_action_delete_grey"/>
  114. </RelativeLayout>