toolbar_user_information.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Nextcloud Android client application
  4. Copyright (C) 2017 Andy Scherzinger
  5. Copyright (C) 2017 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. <android.support.design.widget.AppBarLayout
  18. android:id="@+id/appbar"
  19. xmlns:android="http://schemas.android.com/apk/res/android"
  20. xmlns:app="http://schemas.android.com/apk/res-auto"
  21. android:layout_width="match_parent"
  22. android:layout_height="@dimen/nav_drawer_header_height"
  23. android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
  24. <RelativeLayout
  25. android:layout_width="match_parent"
  26. android:layout_height="match_parent">
  27. <ImageView
  28. android:id="@+id/drawer_header_background"
  29. android:layout_width="match_parent"
  30. android:layout_height="match_parent"
  31. android:contentDescription="@string/drawer_header_background"
  32. android:scaleType="centerCrop"/>
  33. <android.support.v7.widget.Toolbar
  34. android:id="@id/toolbar"
  35. android:layout_width="match_parent"
  36. android:layout_height="?attr/actionBarSize"
  37. app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
  38. <LinearLayout
  39. android:layout_width="match_parent"
  40. android:layout_height="match_parent"
  41. android:gravity="bottom"
  42. android:orientation="vertical">
  43. <RelativeLayout
  44. android:layout_width="match_parent"
  45. android:layout_height="wrap_content"
  46. android:layout_marginBottom="@dimen/toolbar_user_information_layout_margin"
  47. android:layout_marginEnd="@dimen/standard_half_margin"
  48. android:layout_marginLeft="@dimen/toolbar_user_information_layout_margin"
  49. android:layout_marginRight="@dimen/standard_half_margin"
  50. android:layout_marginStart="@dimen/toolbar_user_information_layout_margin"
  51. android:gravity="bottom"
  52. android:orientation="horizontal"
  53. android:weightSum="1">
  54. <FrameLayout
  55. android:id="@+id/avatar_container"
  56. android:layout_width="wrap_content"
  57. android:layout_height="wrap_content">
  58. <ImageView
  59. android:id="@+id/user_icon"
  60. android:layout_width="@dimen/nav_drawer_header_avatar"
  61. android:layout_height="@dimen/nav_drawer_header_avatar"
  62. android:contentDescription="@string/avatar"
  63. android:src="@drawable/account_circle_white"/>
  64. </FrameLayout>
  65. <LinearLayout
  66. android:layout_width="match_parent"
  67. android:layout_height="wrap_content"
  68. android:layout_centerInParent="true"
  69. android:layout_marginLeft="@dimen/standard_half_margin"
  70. android:layout_marginRight="@dimen/standard_half_margin"
  71. android:layout_toEndOf="@id/avatar_container"
  72. android:layout_toRightOf="@id/avatar_container"
  73. android:orientation="vertical">
  74. <TextView
  75. android:id="@+id/userinfo_username_full"
  76. android:layout_width="match_parent"
  77. android:layout_height="wrap_content"
  78. android:ellipsize="end"
  79. android:maxLines="1"
  80. android:shadowColor="@color/black"
  81. android:shadowDx="0.5"
  82. android:shadowDy="0"
  83. android:shadowRadius="2"
  84. android:textColor="@android:color/white"
  85. android:textSize="@dimen/drawer_header_text"
  86. android:textStyle="bold"/>
  87. <TextView
  88. android:id="@+id/userinfo_username"
  89. android:layout_width="match_parent"
  90. android:layout_height="wrap_content"
  91. android:ellipsize="end"
  92. android:lines="1"
  93. android:maxLines="1"
  94. android:shadowColor="@color/black"
  95. android:shadowDx="0.5"
  96. android:shadowDy="0"
  97. android:shadowRadius="2"
  98. android:textColor="@android:color/white"
  99. android:textSize="@dimen/drawer_header_subtext"/>
  100. </LinearLayout>
  101. </RelativeLayout>
  102. <include layout="@layout/info_box"/>
  103. </LinearLayout>
  104. </RelativeLayout>
  105. </android.support.design.widget.AppBarLayout>