drawer_header.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  8. License as published by the Free Software Foundation; either
  9. version 3 of the License, or any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  14. You should have received a copy of the GNU Affero General Public
  15. License along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. -->
  17. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  18. android:layout_width="match_parent"
  19. android:layout_height="@dimen/nav_drawer_header_height"
  20. android:background="@drawable/background"
  21. android:fitsSystemWindows="true">
  22. <RelativeLayout
  23. android:id="@+id/drawer_active_user"
  24. android:layout_width="match_parent"
  25. android:layout_height="wrap_content"
  26. android:layout_gravity="bottom"
  27. android:padding="@dimen/standard_padding">
  28. <FrameLayout
  29. android:id="@+id/drawer_user_avatars"
  30. android:layout_width="match_parent"
  31. android:layout_height="wrap_content"
  32. android:layout_gravity="top"
  33. android:layout_marginBottom="@dimen/standard_half_margin">
  34. <ImageView
  35. android:id="@+id/drawer_current_account"
  36. android:layout_width="@dimen/nav_drawer_header_avatar"
  37. android:layout_height="@dimen/nav_drawer_header_avatar"
  38. android:src="@drawable/ic_account_circle"/>
  39. <ImageView
  40. android:id="@+id/drawer_account_middle"
  41. android:layout_width="@dimen/nav_drawer_header_avatar_other_accounts_size"
  42. android:layout_height="@dimen/nav_drawer_header_avatar_other_accounts_size"
  43. android:layout_gravity="right"
  44. android:layout_marginEnd="@dimen/nav_drawer_header_avatar_second_account_margin"
  45. android:layout_marginRight="@dimen/nav_drawer_header_avatar_second_account_margin"
  46. android:src="@drawable/ic_account_circle"
  47. android:onClick="onAccountDrawerClick"/>
  48. <ImageView
  49. android:id="@+id/drawer_account_end"
  50. android:layout_width="@dimen/nav_drawer_header_avatar_other_accounts_size"
  51. android:layout_height="@dimen/nav_drawer_header_avatar_other_accounts_size"
  52. android:layout_gravity="right"
  53. android:src="@drawable/ic_account_circle"
  54. android:onClick="onAccountDrawerClick"/>
  55. </FrameLayout>
  56. <LinearLayout
  57. android:layout_width="match_parent"
  58. android:layout_height="wrap_content"
  59. android:layout_below="@+id/drawer_user_avatars"
  60. >
  61. <LinearLayout
  62. android:layout_width="@dimen/zero"
  63. android:layout_height="wrap_content"
  64. android:layout_gravity="center_vertical"
  65. android:layout_weight="1"
  66. android:orientation="vertical"
  67. android:paddingRight="@dimen/standard_half_padding">
  68. <TextView
  69. android:id="@+id/drawer_username"
  70. android:layout_width="match_parent"
  71. android:layout_height="wrap_content"
  72. android:ellipsize="end"
  73. android:shadowColor="@color/black"
  74. android:shadowDx="0.5"
  75. android:shadowDy="0"
  76. android:shadowRadius="2"
  77. android:singleLine="true"
  78. android:text="@string/app_name"
  79. android:textColor="@android:color/white"
  80. android:textSize="@dimen/drawer_header_text"
  81. android:textStyle="bold"/>
  82. <TextView
  83. android:id="@+id/drawer_username_full"
  84. android:layout_width="match_parent"
  85. android:layout_height="wrap_content"
  86. android:ellipsize="end"
  87. android:lines="1"
  88. android:maxLines="1"
  89. android:shadowColor="@color/black"
  90. android:shadowDx="0.5"
  91. android:shadowDy="0"
  92. android:shadowRadius="2"
  93. android:text="@string/app_name"
  94. android:textColor="@android:color/white"
  95. android:textSize="@dimen/drawer_header_subtext"/>
  96. </LinearLayout>
  97. <ImageView
  98. android:id="@+id/drawer_account_chooser_toogle"
  99. android:layout_width="wrap_content"
  100. android:layout_height="wrap_content"
  101. android:layout_gravity="bottom"
  102. android:contentDescription="@string/drawer_manage_accounts"
  103. android:src="@drawable/ic_down"/>
  104. </LinearLayout>
  105. </RelativeLayout>
  106. </LinearLayout>