Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <layout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto">
- <data>
- <import
- alias="map"
- type="androidx.databinding.ObservableMap"/>
- <variable
- name="data"
- type="map<String, Object>"/>
- <import
- alias="view"
- type="android.view.View" />
- </data>
- <androidx.coordinatorlayout.widget.CoordinatorLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fitsSystemWindows="true"
- android:id="@+id/bottom_layout"
- android:background="@color/white">
- <com.google.android.material.appbar.AppBarLayout
- android:layout_width="match_parent"
- android:layout_height="250dp"
- android:id="@+id/appbar"
- android:fitsSystemWindows="true"
- android:stateListAnimator="@null">
- <com.google.android.material.appbar.CollapsingToolbarLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
- android:fitsSystemWindows="true"
- app:title='@{data["user_given_name"] == null ? "Не указано" : data["user_given_name"]}'
- app:contentScrim="@color/colorPrimary"
- app:expandedTitleMarginStart="48dp"
- app:expandedTitleMarginEnd="64dp"
- app:collapsedTitleTextAppearance="@style/MyActionBar.Collapsed"
- app:expandedTitleTextAppearance="@style/MyActionBar.Expanded">
- <ImageView
- android:id="@+id/background"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:src="@drawable/appbar_background"
- android:tint="@color/black_alfa60"
- android:scaleType="centerCrop"
- android:fitsSystemWindows="true"
- app:layout_collapseMode="parallax"/>
- <LinearLayout
- android:layout_marginRight="22dp"
- android:layout_marginBottom="@dimen/action_bar_size"
- android:layout_width="match_parent"
- android:gravity="bottom"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:textSize="12dp"
- android:textColor="@color/colorAccent"
- android:visibility='@{data["email_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["email_percent"].toString().equalsIgnoreCase("10") ? view.VISIBLE : view.GONE}'
- android:text='@{data["email_percent"].toString().equalsIgnoreCase("10") ? "E-mail не подтвержден" : "E-mail не указан"}'/>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:textSize="12dp"
- android:textColor="@color/colorAccent"
- android:visibility='@{data["phone_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["phone_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
- android:text='@{@string/profile_string_format_profile_progress_not_fill("телефон")}'/>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:textSize="12dp"
- android:textColor="@color/colorAccent"
- android:visibility='@{data["geolocation_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["geolocation_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
- android:text='@{@string/profile_string_format_profile_progress_not_filled("геолокация")}'/>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:textSize="12dp"
- android:textColor="@color/colorAccent"
- android:visibility='@{data["address_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["address_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
- android:text='@{@string/profile_string_format_profile_progress_not_fill("адрес")}'/>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:textSize="12dp"
- android:textColor="@color/colorAccent"
- android:visibility='@{data["city_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["city_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
- android:text='@{@string/profile_string_format_profile_progress_not_fill("город")}'/>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:textSize="12dp"
- android:textColor="@color/colorAccent"
- android:visibility='@{data["country_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["country_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
- android:text='@{@string/profile_string_format_profile_progress_not_filled("страна")}'/>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:textSize="12dp"
- android:textColor="@color/colorAccent"
- android:visibility='@{data["lastname_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["lastname_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
- android:text='@{@string/profile_string_format_profile_progress_not_filled("фамилия")}'/>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:textSize="12dp"
- android:textColor="@color/colorAccent"
- android:visibility='@{data["firstname_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : data["firstname_percent"].toString().equalsIgnoreCase("0") ? view.VISIBLE : view.GONE}'
- android:text='@{@string/profile_string_format_profile_progress_not_filed("имя")}'/>
- <ImageView
- android:visibility='@{data["progress_percent"].toString().equalsIgnoreCase("100") ? view.VISIBLE : view.GONE}'
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:tint="@color/colorAccent"
- android:src="@drawable/ic_check_decagram_white_24dp"/>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:textSize="12dp"
- android:textColor="@color/colorAccent"
- android:text='@{@string/profile_string_format_profile_progress_fill(data["progress_percent"])}'/>
- </LinearLayout>
- <androidx.appcompat.widget.Toolbar
- android:id="@+id/action_bar"
- android:layout_width="match_parent"
- android:layout_height="@dimen/action_bar_size"
- android:elevation="4dp"
- android:theme="@style/MyActionBar"
- app:layout_collapseMode="pin">
- </androidx.appcompat.widget.Toolbar>
- <Space
- android:id="@+id/circle_collapsed_target"
- android:layout_width="40dp"
- android:layout_height="40dp"
- android:layout_margin="8dp"/>
- </com.google.android.material.appbar.CollapsingToolbarLayout>
- </com.google.android.material.appbar.AppBarLayout>
- <androidx.core.widget.NestedScrollView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/scrollview"
- android:layout_marginBottom="@dimen/action_bar_size"
- app:layout_behavior="@string/appbar_scrolling_view_behavior">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <com.google.android.material.card.MaterialCardView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:cardBackgroundColor="@color/white"
- android:layout_marginTop="18dp"
- android:layout_marginLeft="18dp"
- android:layout_marginRight="18dp"
- app:cardElevation="4dp"
- app:contentPadding="12dp">
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- <ImageView
- android:id="@+id/personal"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:src="@drawable/ic_account_grey600_24dp"
- android:tint="@color/colorPrimary"/>
- <LinearLayout
- android:id="@+id/personal_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="52dp"
- android:orientation="vertical">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text='@{data["user_family_name"] == null ? "Не указана" : data["user_family_name"] == "" ? "Не указана" : data["user_family_name"]}'
- android:textColor="@color/colorPrimaryDark"
- android:textSize="18dp" />
- <TextView
- style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/family_name" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text='@{data["user_given_name"] == null ? "Не указано" : data["user_given_name"] == "" ? "Не указано" : data["user_given_name"]}'
- android:textColor="@color/colorPrimaryDark"
- android:textSize="18dp" />
- <TextView
- style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/given_name" />
- </LinearLayout>
- </RelativeLayout>
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- <ImageView
- android:id="@+id/phone"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:src="@drawable/ic_phone_grey600_24dp"
- android:tint="@color/colorPrimary"/>
- <LinearLayout
- android:id="@+id/phone_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="52dp"
- android:orientation="vertical">
- <TextView
- style="@style/UiKit.TextView.Headers"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text='@{data["user_phone"] == null ? "Не указан" : data["user_phone"] == "" ? "Не указан" : data["user_phone"]}'
- android:textColor="@color/colorPrimaryDark" />
- <TextView
- style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/mobile" />
- </LinearLayout>
- </RelativeLayout>
- </LinearLayout>
- </com.google.android.material.card.MaterialCardView>
- <com.google.android.material.card.MaterialCardView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:cardBackgroundColor="@color/white"
- app:cardElevation="4dp"
- app:contentPadding="12dp"
- android:layout_marginTop="18dp"
- android:layout_marginLeft="18dp"
- android:layout_marginRight="18dp">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- <ImageView
- android:id="@+id/country"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
- android:src="@drawable/ic_google_maps_grey600_24dp"
- android:tint="@color/colorPrimary"/>
- <LinearLayout
- android:id="@+id/country_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="52dp"
- android:orientation="vertical">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text='@{data["user_address"] == null ? "Не указан" : data["user_address"] == "" ? "Не указан" : data["user_address"]}'
- android:textColor="@color/colorPrimaryDark"
- android:textSize="18dp" />
- <TextView
- style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/profile_address" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text='@{data["user_city"] == null ? "Не указан" : data["user_city"] == "" ? "Не указан" : data["user_city"]}'
- android:textColor="@color/colorPrimaryDark"
- android:textSize="18dp" />
- <TextView
- style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/profile_city" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text='@{data["user_country"] == null ? "Не указана" : data["user_country"] == "" ? "Не указана" : data["user_country"]}'
- android:textColor="@color/colorPrimaryDark"
- android:textSize="18dp"/>
- <TextView
- style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/profile_country" />
- </LinearLayout>
- </RelativeLayout>
- <com.google.android.gms.maps.MapView
- android:id="@+id/map"
- android:layout_width="match_parent"
- android:layout_height="150dp" />
- </LinearLayout>
- </com.google.android.material.card.MaterialCardView>
- <com.google.android.material.card.MaterialCardView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:cardBackgroundColor="@color/white"
- app:cardElevation="4dp"
- app:contentPadding="12dp"
- android:layout_marginTop="18dp"
- android:layout_marginLeft="18dp"
- android:layout_marginRight="18dp">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- <ImageView
- android:id="@+id/about"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
- android:src="@drawable/ic_account_card_details_grey600_24dp"
- android:tint="@color/colorPrimary"/>
- <LinearLayout
- android:id="@+id/about_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="52dp"
- android:orientation="vertical">
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text='@{data["user_about"] == null ? @string/profile_information_not_found : data["user_about"] == "" ? @string/profile_information_not_found : data["user_about"]}'
- android:textColor="@color/colorPrimaryDark"
- android:textSize="18dp" />
- <TextView
- style="@style/UiKit.TextView.SubheadersWithHeadersSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/profile_about" />
- </LinearLayout>
- </RelativeLayout>
- </LinearLayout>
- </com.google.android.material.card.MaterialCardView>
- </LinearLayout>
- </androidx.core.widget.NestedScrollView>
- <com.google.android.material.bottomappbar.BottomAppBar android:id="@+id/bottom_appbar"
- android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- android:layout_gravity="bottom"
- app:backgroundTint="@color/colorPrimary"
- app:fabCradleMargin="5dp"
- app:fabCradleRoundedCornerRadius="8dp"
- app:hideOnScroll="false"
- app:layout_scrollFlags="scroll|enterAlways"
- app:theme="@style/MyTheme"
- android:transitionName="bottom_appbar"
- style="@style/Widget.MaterialComponents.BottomAppBar"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:android="http://schemas.android.com/apk/res/android" />
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/bottom_fab"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:clickable="true"
- app:tint="@color/colorPrimary"
- android:tint="@color/colorPrimary"
- app:backgroundTint="@color/colorAccent"
- app:rippleColor="@color/white"
- app:layout_anchor="@id/bottom_appbar"/>
- <com.nixbyte.masterandmodel.common.view.FirebaseDevView
- android:id="@+id/dev_view"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- app:dev_text="@string/dev_mode"
- android:layout_gravity="center"
- android:background="@color/colorAccent"
- android:visibility="gone"/>
- <com.nixbyte.masterandmodel.common.view.ProgressBarView
- android:id="@+id/progress_bar"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:focusable="true"
- android:clickable="true"
- android:visibility="gone"
- />
- <com.nixbyte.masterandmodel.common.view.CircleImageView
- android:id="@+id/photo"
- android:layout_width="95dp"
- android:layout_height="95dp"
- android:layout_marginStart="48dp"
- android:clickable="true"
- android:src="@drawable/ic_logox2"
- app:layout_anchor="@id/appbar"
- app:layout_anchorGravity="center|left|end"
- android:elevation="8dp"
- app:civ_border_color="@color/colorAccent"
- app:civ_border_width="2dp"
- app:layout_collapseMode="parallax"
- app:civ_collapsedTarget="@id/circle_collapsed_target"
- app:layout_behavior="com.nixbyte.masterandmodel.modules.actionbar.CollapsingImageBehavior"/>
- </androidx.coordinatorlayout.widget.CoordinatorLayout>
- </layout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement