forked from firebase/quickstart-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(admob): replace RelativeLayout with ConstraintLayout (fireba…
- Loading branch information
1 parent
b3db77e
commit 3b639ec
Showing
2 changed files
with
46 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
<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" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
tools:viewBindingIgnore="true" | ||
tools:context="com.google.samples.quickstart.admobexample.java.SecondActivity"> | ||
tools:context="com.google.samples.quickstart.admobexample.java.SecondActivity" | ||
tools:viewBindingIgnore="true"> | ||
|
||
<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_constraintBottom_toTopOf="@+id/guideline" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_below="@+id/icon" | ||
android:layout_centerHorizontal="true" | ||
android:text="@string/second_activity_content" /> | ||
android:layout_gravity="center_horizontal" | ||
android:text="@string/second_activity_content" | ||
android:textAlignment="center" | ||
app:layout_constraintEnd_toEndOf="@+id/icon" | ||
app:layout_constraintStart_toStartOf="@+id/icon" | ||
app:layout_constraintTop_toBottomOf="@+id/icon" /> | ||
|
||
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/guideline" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
app:layout_constraintGuide_percent="0.5" /> | ||
|
||
</RelativeLayout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |