Skip to content

Instantly share code, notes, and snippets.

@ibrajix
Last active Aug 10, 2021
Embed
What would you like to do?
Fragment Map Layout
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".ui.fragments.MapFragment">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.fragment.app.FragmentContainerView>
<ImageView
android:id="@+id/ic_profile_pic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="2dp"
android:layout_marginTop="10dp"
android:layout_marginStart="10dp"
android:src="@drawable/ic_profile_pic_round_transparent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView28"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity=""
android:layout_marginStart="10dp"
android:src="@drawable/ic_search_round_transparent"
app:layout_constraintStart_toEndOf="@+id/ic_profile_pic"
app:layout_constraintTop_toTopOf="@+id/ic_profile_pic" />
<TextView
android:id="@+id/textView33"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/avenir_black"
android:gravity="center"
android:text="@string/snap_map"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/imageView28"
app:layout_constraintEnd_toStartOf="@+id/settings"
app:layout_constraintStart_toEndOf="@+id/imageView28"
app:layout_constraintTop_toTopOf="@+id/imageView28" />
<ImageView
android:id="@+id/settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginEnd="10dp"
android:src="@drawable/ic_settings_round_transparent"
app:layout_constraintBottom_toBottomOf="@+id/textView33"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView33" />
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment