layout_drawer_nav_header.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="utf-8"?><!--
  2. ~ Copyright (C) 2018 Drake, Inc.
  3. ~
  4. ~ Licensed under the Apache License, Version 2.0 (the "License");
  5. ~ you may not use this file except in compliance with the License.
  6. ~ You may obtain a copy of the License at
  7. ~
  8. ~ http://www.apache.org/licenses/LICENSE-2.0
  9. ~
  10. ~ Unless required by applicable law or agreed to in writing, software
  11. ~ distributed under the License is distributed on an "AS IS" BASIS,
  12. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. ~ See the License for the specific language governing permissions and
  14. ~ limitations under the License.
  15. -->
  16. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  17. android:layout_width="match_parent"
  18. xmlns:app="http://schemas.android.com/apk/res-auto"
  19. android:layout_height="240dp">
  20. <LinearLayout
  21. app:layout_constraintLeft_toLeftOf="parent"
  22. app:layout_constraintRight_toRightOf="parent"
  23. app:layout_constraintTop_toTopOf="parent"
  24. android:layout_marginTop="24dp"
  25. android:gravity="center"
  26. app:layout_constraintBottom_toBottomOf="parent"
  27. android:layout_width="wrap_content"
  28. android:orientation="vertical"
  29. android:layout_height="wrap_content">
  30. <ImageView
  31. android:layout_width="100dp"
  32. android:layout_height="100dp"
  33. android:id="@+id/iv"
  34. android:src="@drawable/header" />
  35. <TextView
  36. android:id="@+id/tv_name"
  37. android:layout_width="wrap_content"
  38. android:text="刘强东"
  39. android:textSize="16dp"
  40. android:textStyle="bold"
  41. android:layout_marginTop="16dp"
  42. android:layout_height="wrap_content" />
  43. <TextView
  44. android:layout_width="wrap_content"
  45. android:layout_marginTop="8dp"
  46. android:textSize="12dp"
  47. android:autoLink="web"
  48. android:textStyle="italic"
  49. android:text="liangjingkanji.github.io/Net/"
  50. android:layout_height="wrap_content" />
  51. </LinearLayout>
  52. </androidx.constraintlayout.widget.ConstraintLayout>