<commit_before><?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright 2020 Google LLC
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<layout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools">

  <data>
    <import type="androidx.core.content.ContextCompat" />
    <import type="android.view.View" />
    <variable
      name="viewModel"
      type="com.google.android.gnd.ui.home.mapcontainer.MapContainerViewModel" />
    <variable
      name="homeScreenViewModel"
      type="com.google.android.gnd.ui.home.HomeScreenViewModel" />
  </data>

  <androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:background="@color/colorGrey800">

    <!-- TODO: Add highlighted icon overlay when showing feature sheet -->
    <ImageView
      android:id="@+id/map_crosshairs"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:adjustViewBounds="false"
      android:src="@drawable/ic_crosshairs"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
      android:id="@+id/map_type_btn"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:onClick="@{() -> viewModel.onMapTypeButtonClicked()}"
      android:tint="@color/colorGrey500"
      app:backgroundTint="@color/colorBackground"
      app:fabSize="mini"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@drawable/map_layers"
      app:useCompatPadding="true" />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
      android:id="@+id/location_lock_btn"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:enabled="@{viewModel.getLocationLockEnabled()}"
      android:onClick="@{() -> viewModel.onLocationLockClick()}"
      app:backgroundTint="@color/colorBackground"
      app:fabSize="normal"
      app:layout_constraintBottom_toTopOf="@id/add_feature_btn"
      app:layout_constraintEnd_toEndOf="parent"
      app:srcCompat="@drawable/ic_gps_lock"
      app:tint="@{viewModel.getIconTint()}"
      app:useCompatPadding="true" />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
      android:id="@+id/add_feature_btn"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:onClick="@{() -> viewModel.onAddFeatureBtnClick()}"
      app:visible="@{homeScreenViewModel.isAddFeatureButtonVisible()}"
      app:fabSize="normal"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:srcCompat="@drawable/ic_add"
      app:tint="@color/colorBackground"
      app:backgroundTintList="@{ContextCompat.getColorStateList(context, viewModel.getFeatureAddButtonBackgroundTint())}"
      app:useCompatPadding="true" />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
      android:id="@+id/hamburger_btn"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:onClick="@{() -> homeScreenViewModel.openNavDrawer()}"
      android:src="@drawable/ic_menu_black_24dp"
      app:tint="@{viewModel.getIconTint()}"
      app:backgroundTint="@color/colorBackground"
      app:layout_constraintStart_toStartOf="parent"
      app:fabSize="mini"
      app:layout_constraintTop_toTopOf="parent"
      app:useCompatPadding="true" />

  </androidx.constraintlayout.widget.ConstraintLayout>
</layout>
<commit_msg>Fix alignment of add feature button when initially hidden<commit_after><?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright 2020 Google LLC
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<layout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools">

  <data>
    <import type="androidx.core.content.ContextCompat" />
    <import type="android.view.View" />
    <variable
      name="viewModel"
      type="com.google.android.gnd.ui.home.mapcontainer.MapContainerViewModel" />
    <variable
      name="homeScreenViewModel"
      type="com.google.android.gnd.ui.home.HomeScreenViewModel" />
  </data>

  <androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:background="@color/colorGrey800">

    <!-- TODO: Add highlighted icon overlay when showing feature sheet -->
    <ImageView
      android:id="@+id/map_crosshairs"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:adjustViewBounds="false"
      android:src="@drawable/ic_crosshairs"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
      android:id="@+id/map_type_btn"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:onClick="@{() -> viewModel.onMapTypeButtonClicked()}"
      android:tint="@color/colorGrey500"
      app:backgroundTint="@color/colorBackground"
      app:fabSize="mini"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:srcCompat="@drawable/map_layers"
      app:useCompatPadding="true" />

    <LinearLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:gravity="center_horizontal"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent">

      <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/location_lock_btn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:enabled="@{viewModel.getLocationLockEnabled()}"
        android:onClick="@{() -> viewModel.onLocationLockClick()}"
        app:backgroundTint="@color/colorBackground"
        app:fabSize="normal"
        app:srcCompat="@drawable/ic_gps_lock"
        app:tint="@{viewModel.getIconTint()}"
        app:useCompatPadding="true" />

      <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/add_feature_btn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="@{() -> viewModel.onAddFeatureBtnClick()}"
        app:backgroundTintList="@{ContextCompat.getColorStateList(context, viewModel.getFeatureAddButtonBackgroundTint())}"
        app:fabSize="normal"
        app:srcCompat="@drawable/ic_add"
        app:tint="@color/colorBackground"
        app:useCompatPadding="true"
        app:visible="@{homeScreenViewModel.isAddFeatureButtonVisible()}" />
    </LinearLayout>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
      android:id="@+id/hamburger_btn"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:onClick="@{() -> homeScreenViewModel.openNavDrawer()}"
      android:src="@drawable/ic_menu_black_24dp"
      app:backgroundTint="@color/colorBackground"
      app:fabSize="mini"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:tint="@{viewModel.getIconTint()}"
      app:useCompatPadding="true" />

  </androidx.constraintlayout.widget.ConstraintLayout>
</layout>

{'fraction_non_alphanumeric': 0.12289823008849557, 'fraction_numerical': 0.0042035398230088495, 'mean_word_length': 4.394391408114559, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 2, '>': 49, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3859587', 'n_tokens_mistral': 2770, 'n_tokens_neox': 2633, 'n_words': 374}