Advertisement
Guest User

Untitled

a guest
Jan 31st, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.62 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <layout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto">
  4.  
  5. <data>
  6. <import
  7. alias="map"
  8. type="androidx.databinding.ObservableMap"/>
  9. <variable
  10. name="data"
  11. type="map&lt;String, Object&gt;"/>
  12. <import
  13. alias="view"
  14. type="android.view.View" />
  15. </data>
  16.  
  17. <androidx.coordinatorlayout.widget.CoordinatorLayout
  18. android:layout_width="match_parent"
  19. android:layout_height="match_parent"
  20. android:fitsSystemWindows="true"
  21. android:id="@+id/bottom_layout"
  22. android:background="@color/white">
  23.  
  24. <com.google.android.material.appbar.AppBarLayout
  25. android:layout_width="match_parent"
  26. android:layout_height="250dp"
  27. android:id="@+id/appbar"
  28. android:fitsSystemWindows="true"
  29. android:stateListAnimator="@null">
  30.  
  31. <com.google.android.material.appbar.CollapsingToolbarLayout
  32. android:layout_width="match_parent"
  33. android:layout_height="match_parent"
  34. app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
  35. android:fitsSystemWindows="true"
  36. app:title='@{data["user_given_name"] == null ? "Не указано" : data["user_given_name"]}'
  37. app:contentScrim="@color/colorPrimary"
  38. app:expandedTitleMarginStart="48dp"
  39. app:expandedTitleMarginEnd="64dp"
  40. app:collapsedTitleTextAppearance="@style/MyActionBar.Collapsed"
  41. app:expandedTitleTextAppearance="@style/MyActionBar.Expanded">
  42.  
  43. <ImageView
  44. android:id="@+id/background"
  45. android:layout_width="match_parent"
  46. android:layout_height="match_parent"
  47. android:src="@drawable/appbar_background"
  48. android:tint="@color/black_alfa60"
  49. android:scaleType="centerCrop"
  50. android:fitsSystemWindows="true"
  51. app:layout_collapseMode="parallax"/>
  52.  
  53. <LinearLayout
  54. android:layout_marginRight="22dp"
  55. android:layout_marginBottom="@dimen/action_bar_size"
  56. android:layout_width="match_parent"
  57. android:gravity="bottom"
  58. android:layout_height="match_parent"
  59. android:orientation="vertical">
  60. <TextView
  61. android:layout_width="wrap_content"
  62. android:layout_height="wrap_content"
  63. android:layout_gravity="right"
  64. android:textSize="12dp"
  65. android:textColor="@color/colorAccent"
  66. android:visibility='@{data["email_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["email_percent"].toString().equalsIgnoreCase("10") ? view.VISIBLE : view.GONE}'
  67. android:text='@{data["email_percent"].toString().equalsIgnoreCase("10") ? "E-mail не подтвержден" : "E-mail не указан"}'/>
  68. <TextView
  69. android:layout_width="wrap_content"
  70. android:layout_height="wrap_content"
  71. android:layout_gravity="right"
  72. android:textSize="12dp"
  73. android:textColor="@color/colorAccent"
  74. android:visibility='@{data["phone_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["phone_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
  75. android:text='@{@string/profile_string_format_profile_progress_not_fill("телефон")}'/>
  76. <TextView
  77. android:layout_width="wrap_content"
  78. android:layout_height="wrap_content"
  79. android:layout_gravity="right"
  80. android:textSize="12dp"
  81. android:textColor="@color/colorAccent"
  82. android:visibility='@{data["geolocation_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["geolocation_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
  83. android:text='@{@string/profile_string_format_profile_progress_not_filled("геолокация")}'/>
  84. <TextView
  85. android:layout_width="wrap_content"
  86. android:layout_height="wrap_content"
  87. android:layout_gravity="right"
  88. android:textSize="12dp"
  89. android:textColor="@color/colorAccent"
  90. android:visibility='@{data["address_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["address_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
  91. android:text='@{@string/profile_string_format_profile_progress_not_fill("адрес")}'/>
  92. <TextView
  93. android:layout_width="wrap_content"
  94. android:layout_height="wrap_content"
  95. android:layout_gravity="right"
  96. android:textSize="12dp"
  97. android:textColor="@color/colorAccent"
  98. android:visibility='@{data["city_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["city_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
  99. android:text='@{@string/profile_string_format_profile_progress_not_fill("город")}'/>
  100. <TextView
  101. android:layout_width="wrap_content"
  102. android:layout_height="wrap_content"
  103. android:layout_gravity="right"
  104. android:textSize="12dp"
  105. android:textColor="@color/colorAccent"
  106. android:visibility='@{data["country_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["country_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
  107. android:text='@{@string/profile_string_format_profile_progress_not_filled("страна")}'/>
  108. <TextView
  109. android:layout_width="wrap_content"
  110. android:layout_height="wrap_content"
  111. android:layout_gravity="right"
  112. android:textSize="12dp"
  113. android:textColor="@color/colorAccent"
  114. android:visibility='@{data["lastname_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["lastname_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
  115. android:text='@{@string/profile_string_format_profile_progress_not_filled("фамилия")}'/>
  116. <TextView
  117. android:layout_width="wrap_content"
  118. android:layout_height="wrap_content"
  119. android:layout_gravity="right"
  120. android:textSize="12dp"
  121. android:textColor="@color/colorAccent"
  122. android:visibility='@{data["firstname_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["firstname_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
  123. android:text='@{@string/profile_string_format_profile_progress_not_filed("имя")}'/>
  124. <ImageView
  125. android:visibility='@{data["progress_percent"].toString().equalsIgnoreCase("100") ? view.VISIBLE : view.GONE}'
  126. android:layout_width="wrap_content"
  127. android:layout_height="wrap_content"
  128. android:layout_gravity="right"
  129. android:tint="@color/colorAccent"
  130. android:src="@drawable/ic_check_decagram_white_24dp"/>
  131. <TextView
  132. android:layout_width="wrap_content"
  133. android:layout_height="wrap_content"
  134. android:layout_gravity="right"
  135. android:textSize="12dp"
  136. android:textColor="@color/colorAccent"
  137. android:text='@{@string/profile_string_format_profile_progress_fill(data["progress_percent"])}'/>
  138.  
  139. </LinearLayout>
  140.  
  141. <androidx.appcompat.widget.Toolbar
  142. android:id="@+id/action_bar"
  143. android:layout_width="match_parent"
  144. android:layout_height="@dimen/action_bar_size"
  145. android:elevation="4dp"
  146. android:theme="@style/MyActionBar"
  147. app:layout_collapseMode="pin">
  148. </androidx.appcompat.widget.Toolbar>
  149.  
  150. <Space
  151. android:id="@+id/circle_collapsed_target"
  152. android:layout_width="40dp"
  153. android:layout_height="40dp"
  154. android:layout_margin="8dp"/>
  155.  
  156. </com.google.android.material.appbar.CollapsingToolbarLayout>
  157.  
  158. </com.google.android.material.appbar.AppBarLayout>
  159.  
  160. <androidx.core.widget.NestedScrollView
  161. android:layout_width="match_parent"
  162. android:layout_height="wrap_content"
  163. android:id="@+id/scrollview"
  164. android:layout_marginBottom="@dimen/action_bar_size"
  165. app:layout_behavior="@string/appbar_scrolling_view_behavior">
  166.  
  167. <LinearLayout
  168. android:layout_width="match_parent"
  169. android:layout_height="match_parent"
  170. android:orientation="vertical">
  171.  
  172. <com.google.android.material.card.MaterialCardView
  173. android:layout_width="match_parent"
  174. android:layout_height="wrap_content"
  175. app:cardBackgroundColor="@color/white"
  176. android:layout_marginTop="18dp"
  177. android:layout_marginLeft="18dp"
  178. android:layout_marginRight="18dp"
  179. app:cardElevation="4dp"
  180. app:contentPadding="12dp">
  181.  
  182. <LinearLayout
  183. android:layout_width="wrap_content"
  184. android:layout_height="wrap_content"
  185. android:orientation="vertical">
  186. <RelativeLayout
  187. android:layout_width="wrap_content"
  188. android:layout_height="wrap_content">
  189.  
  190. <ImageView
  191. android:id="@+id/personal"
  192. android:layout_width="wrap_content"
  193. android:layout_height="wrap_content"
  194. android:layout_alignParentTop="true"
  195. android:src="@drawable/ic_account_grey600_24dp"
  196. android:tint="@color/colorPrimary"/>
  197.  
  198. <LinearLayout
  199. android:id="@+id/personal_layout"
  200. android:layout_width="wrap_content"
  201. android:layout_height="wrap_content"
  202. android:layout_marginLeft="52dp"
  203. android:orientation="vertical">
  204.  
  205. <TextView
  206. android:layout_width="wrap_content"
  207. android:layout_height="wrap_content"
  208. android:text='@{data["user_family_name"] == null ? "Не указана" : data["user_family_name"] == "" ? "Не указана" : data["user_family_name"]}'
  209. android:textColor="@color/colorPrimaryDark"
  210. android:textSize="18dp" />
  211.  
  212. <TextView
  213. style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
  214. android:layout_width="wrap_content"
  215. android:layout_height="wrap_content"
  216. android:text="@string/family_name" />
  217.  
  218. <TextView
  219. android:layout_width="wrap_content"
  220. android:layout_height="wrap_content"
  221. android:text='@{data["user_given_name"] == null ? "Не указано" : data["user_given_name"] == "" ? "Не указано" : data["user_given_name"]}'
  222. android:textColor="@color/colorPrimaryDark"
  223. android:textSize="18dp" />
  224.  
  225. <TextView
  226. style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
  227. android:layout_width="wrap_content"
  228. android:layout_height="wrap_content"
  229. android:text="@string/given_name" />
  230.  
  231.  
  232. </LinearLayout>
  233. </RelativeLayout>
  234.  
  235. <RelativeLayout
  236. android:layout_width="wrap_content"
  237. android:layout_height="wrap_content">
  238.  
  239. <ImageView
  240. android:id="@+id/phone"
  241. android:layout_width="wrap_content"
  242. android:layout_height="wrap_content"
  243. android:layout_centerVertical="true"
  244. android:src="@drawable/ic_phone_grey600_24dp"
  245. android:tint="@color/colorPrimary"/>
  246.  
  247. <LinearLayout
  248. android:id="@+id/phone_layout"
  249. android:layout_width="wrap_content"
  250. android:layout_height="wrap_content"
  251. android:layout_marginLeft="52dp"
  252. android:orientation="vertical">
  253.  
  254. <TextView
  255. style="@style/UiKit.TextView.Headers"
  256. android:layout_width="wrap_content"
  257. android:layout_height="wrap_content"
  258. android:text='@{data["user_phone"] == null ? "Не указан" : data["user_phone"] == "" ? "Не указан" : data["user_phone"]}'
  259. android:textColor="@color/colorPrimaryDark" />
  260.  
  261. <TextView
  262. style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
  263. android:layout_width="wrap_content"
  264. android:layout_height="wrap_content"
  265. android:text="@string/mobile" />
  266. </LinearLayout>
  267. </RelativeLayout>
  268. </LinearLayout>
  269. </com.google.android.material.card.MaterialCardView>
  270.  
  271. <com.google.android.material.card.MaterialCardView
  272. android:layout_width="match_parent"
  273. android:layout_height="wrap_content"
  274. app:cardBackgroundColor="@color/white"
  275. app:cardElevation="4dp"
  276. app:contentPadding="12dp"
  277.  
  278. android:layout_marginTop="18dp"
  279. android:layout_marginLeft="18dp"
  280. android:layout_marginRight="18dp">
  281. <LinearLayout
  282. android:layout_width="match_parent"
  283. android:layout_height="wrap_content"
  284. android:orientation="vertical">
  285. <RelativeLayout
  286. android:layout_width="wrap_content"
  287. android:layout_height="wrap_content">
  288.  
  289. <ImageView
  290. android:id="@+id/country"
  291. android:layout_width="wrap_content"
  292. android:layout_height="wrap_content"
  293. android:layout_alignParentStart="true"
  294. android:layout_alignParentTop="true"
  295. android:src="@drawable/ic_google_maps_grey600_24dp"
  296. android:tint="@color/colorPrimary"/>
  297.  
  298. <LinearLayout
  299. android:id="@+id/country_layout"
  300. android:layout_width="wrap_content"
  301. android:layout_height="wrap_content"
  302. android:layout_marginLeft="52dp"
  303. android:orientation="vertical">
  304.  
  305. <TextView
  306. android:layout_width="wrap_content"
  307. android:layout_height="wrap_content"
  308. android:text='@{data["user_address"] == null ? "Не указан" : data["user_address"] == "" ? "Не указан" : data["user_address"]}'
  309. android:textColor="@color/colorPrimaryDark"
  310. android:textSize="18dp" />
  311.  
  312. <TextView
  313. style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
  314. android:layout_width="wrap_content"
  315. android:layout_height="wrap_content"
  316. android:text="@string/profile_address" />
  317.  
  318. <TextView
  319. android:layout_width="wrap_content"
  320. android:layout_height="wrap_content"
  321. android:text='@{data["user_city"] == null ? "Не указан" : data["user_city"] == "" ? "Не указан" : data["user_city"]}'
  322. android:textColor="@color/colorPrimaryDark"
  323. android:textSize="18dp" />
  324.  
  325. <TextView
  326. style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
  327. android:layout_width="wrap_content"
  328. android:layout_height="wrap_content"
  329. android:text="@string/profile_city" />
  330.  
  331.  
  332. <TextView
  333. android:layout_width="wrap_content"
  334. android:layout_height="wrap_content"
  335. android:text='@{data["user_country"] == null ? "Не указана" : data["user_country"] == "" ? "Не указана" : data["user_country"]}'
  336. android:textColor="@color/colorPrimaryDark"
  337. android:textSize="18dp"/>
  338.  
  339. <TextView
  340. style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
  341. android:layout_width="wrap_content"
  342. android:layout_height="wrap_content"
  343. android:text="@string/profile_country" />
  344.  
  345.  
  346. </LinearLayout>
  347.  
  348. </RelativeLayout>
  349. <com.google.android.gms.maps.MapView
  350. android:id="@+id/map"
  351. android:layout_width="match_parent"
  352. android:layout_height="150dp" />
  353.  
  354. </LinearLayout>
  355.  
  356. </com.google.android.material.card.MaterialCardView>
  357.  
  358. <com.google.android.material.card.MaterialCardView
  359. android:layout_width="match_parent"
  360. android:layout_height="wrap_content"
  361. app:cardBackgroundColor="@color/white"
  362. app:cardElevation="4dp"
  363. app:contentPadding="12dp"
  364.  
  365. android:layout_marginTop="18dp"
  366. android:layout_marginLeft="18dp"
  367. android:layout_marginRight="18dp">
  368. <LinearLayout
  369. android:layout_width="match_parent"
  370. android:layout_height="wrap_content"
  371. android:orientation="vertical">
  372. <RelativeLayout
  373. android:layout_width="wrap_content"
  374. android:layout_height="wrap_content">
  375.  
  376. <ImageView
  377. android:id="@+id/about"
  378. android:layout_width="wrap_content"
  379. android:layout_height="wrap_content"
  380. android:layout_alignParentStart="true"
  381. android:layout_alignParentTop="true"
  382. android:src="@drawable/ic_account_card_details_grey600_24dp"
  383. android:tint="@color/colorPrimary"/>
  384.  
  385. <LinearLayout
  386. android:id="@+id/about_layout"
  387. android:layout_width="wrap_content"
  388. android:layout_height="wrap_content"
  389. android:layout_marginLeft="52dp"
  390. android:orientation="vertical">
  391. <TextView
  392. android:layout_width="wrap_content"
  393. android:layout_height="wrap_content"
  394. android:text='@{data["user_about"] == null ? @string/profile_information_not_found : data["user_about"] == "" ? @string/profile_information_not_found : data["user_about"]}'
  395. android:textColor="@color/colorPrimaryDark"
  396. android:textSize="18dp" />
  397. <TextView
  398. style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
  399. android:layout_width="wrap_content"
  400. android:layout_height="wrap_content"
  401. android:text="@string/profile_about" />
  402. </LinearLayout>
  403.  
  404. </RelativeLayout>
  405. </LinearLayout>
  406.  
  407. </com.google.android.material.card.MaterialCardView>
  408.  
  409. </LinearLayout>
  410. </androidx.core.widget.NestedScrollView>
  411.  
  412. <com.google.android.material.bottomappbar.BottomAppBar android:id="@+id/bottom_appbar"
  413. android:layout_width="match_parent"
  414. android:layout_height="?attr/actionBarSize"
  415. android:layout_gravity="bottom"
  416. app:backgroundTint="@color/colorPrimary"
  417. app:fabCradleMargin="5dp"
  418. app:fabCradleRoundedCornerRadius="8dp"
  419. app:hideOnScroll="false"
  420. app:layout_scrollFlags="scroll|enterAlways"
  421. app:theme="@style/MyTheme"
  422. android:transitionName="bottom_appbar"
  423. style="@style/Widget.MaterialComponents.BottomAppBar"
  424. xmlns:app="http://schemas.android.com/apk/res-auto"
  425. xmlns:android="http://schemas.android.com/apk/res/android" />
  426.  
  427.  
  428. <com.google.android.material.floatingactionbutton.FloatingActionButton
  429. android:id="@+id/bottom_fab"
  430. android:layout_height="wrap_content"
  431. android:layout_width="wrap_content"
  432. android:clickable="true"
  433. app:tint="@color/colorPrimary"
  434. android:tint="@color/colorPrimary"
  435. app:backgroundTint="@color/colorAccent"
  436. app:rippleColor="@color/white"
  437. app:layout_anchor="@id/bottom_appbar"/>
  438.  
  439. <com.nixbyte.masterandmodel.common.view.FirebaseDevView
  440. android:id="@+id/dev_view"
  441. android:layout_width="wrap_content"
  442. android:layout_height="match_parent"
  443. app:dev_text="@string/dev_mode"
  444. android:layout_gravity="center"
  445. android:background="@color/colorAccent"
  446. android:visibility="gone"/>
  447.  
  448. <com.nixbyte.masterandmodel.common.view.ProgressBarView
  449. android:id="@+id/progress_bar"
  450. android:layout_width="match_parent"
  451. android:layout_height="match_parent"
  452. android:layout_gravity="center"
  453. android:focusable="true"
  454. android:clickable="true"
  455. android:visibility="gone"
  456. />
  457.  
  458. <com.nixbyte.masterandmodel.common.view.CircleImageView
  459. android:id="@+id/photo"
  460. android:layout_width="95dp"
  461. android:layout_height="95dp"
  462. android:layout_marginStart="48dp"
  463. android:clickable="true"
  464. android:src="@drawable/ic_logox2"
  465. app:layout_anchor="@id/appbar"
  466. app:layout_anchorGravity="center|left|end"
  467. android:elevation="8dp"
  468.  
  469. app:civ_border_color="@color/colorAccent"
  470. app:civ_border_width="2dp"
  471. app:layout_collapseMode="parallax"
  472. app:civ_collapsedTarget="@id/circle_collapsed_target"
  473. app:layout_behavior="com.nixbyte.masterandmodel.modules.actionbar.CollapsingImageBehavior"/>
  474.  
  475.  
  476.  
  477.  
  478. </androidx.coordinatorlayout.widget.CoordinatorLayout>
  479. </layout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement