Skip to content

Commit

Permalink
refactor(config): replace RelativeLayout with ConstraintLayout (fireb…
Browse files Browse the repository at this point in the history
  • Loading branch information
thatfiredev authored Dec 21, 2020
1 parent e8743a6 commit 7242047
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions config/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -12,24 +13,30 @@
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginBottom="16dp"
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/welcomeTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/icon"
android:layout_centerHorizontal="true"
android:text="Welcome..." />
android:layout_marginTop="16dp"
android:text="Welcome..."
app:layout_constraintEnd_toEndOf="@+id/icon"
app:layout_constraintStart_toStartOf="@+id/icon"
app:layout_constraintTop_toBottomOf="@+id/icon" />

<Button
android:id="@+id/fetchButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/fetch_remote_welcome_message"
android:id="@+id/fetchButton"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/welcomeTextView" />

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

0 comments on commit 7242047

Please sign in to comment.