Skip to content

refactor(app-indexing): replace RelativeLayout with ConstraintLayout #1230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 27 additions & 28 deletions app-indexing/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,71 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#fff2f2f2"
android:paddingLeft="16dp"
android:paddingTop="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp">
android:padding="16dp">

<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:src="@drawable/firebase_lockup_400" />
android:src="@drawable/firebase_lockup_400"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/contentIndexLabel"
style="@style/TextAppearance.AppCompat.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/icon"
android:layout_alignParentStart="true"
android:text="@string/content_label" />
android:text="@string/content_label"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/icon" />

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/contentIndexLabel"
android:layout_alignParentStart="true"
android:text="@string/link_label" />
android:text="@string/link_label"
app:layout_constraintStart_toStartOf="@+id/contentIndexLabel"
app:layout_constraintTop_toBottomOf="@+id/contentIndexLabel" />

<TextView
android:id="@+id/link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/contentIndexLabel"
android:layout_toEndOf="@+id/textView"
android:text="@string/none" />
android:text="@string/none"
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintStart_toEndOf="@+id/textView"
app:layout_constraintTop_toTopOf="@+id/textView"/>

<TextView
android:id="@+id/stickerIndexLabel"
style="@style/TextAppearance.AppCompat.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView"
android:layout_alignParentStart="true"
android:text="@string/stickers_label"
android:layout_marginTop="20dp"
android:text="@string/stickers_label" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />

<Button
android:id="@+id/addStickersBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/stickerIndexLabel"
android:layout_alignEnd="@+id/clearStickersBtn"
android:layout_alignParentStart="true"
android:text="Add Stickers" />
android:text="Add Stickers"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/stickerIndexLabel" />

<Button
android:id="@+id/clearStickersBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/addStickersBtn"
android:layout_alignParentStart="true"
android:text="Clear Stickers" />
android:text="Clear Stickers"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/addStickersBtn" />

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