Source code

Revision control

Copy as Markdown

Other Tools

<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/createShortcutWrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?scrim"
android:fitsSystemWindows="true"
tools:context="org.mozilla.fenix.shortcut.PwaOnboardingDialogFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="32dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="16dp"
android:background="@drawable/dialog_background"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp">
<TextView
android:id="@+id/dialog_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add_to_homescreen_title"
android:textAppearance="@style/HeaderTextStyle"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/home_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="0dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:importantForAccessibility="no"
app:layout_constraintEnd_toStartOf="@id/description"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/dialog_title"
app:srcCompat="@drawable/mozac_ic_add_to_homescreen_24" />
<TextView
android:id="@+id/description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/add_to_homescreen_description_2"
android:textColor="?attr/textPrimary"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/home_icon"
app:layout_constraintTop_toTopOf="@id/home_icon" />
<com.google.android.material.button.MaterialButton
android:id="@+id/add_button"
style="@style/PositiveButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:letterSpacing="0"
android:text="@string/add_to_homescreen_title"
android:textAllCaps="false"
android:textColor="?textActionPrimary"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/cancel_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/description" />
<com.google.android.material.button.MaterialButton
android:id="@+id/cancel_button"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:letterSpacing="0"
android:text="@string/add_to_homescreen_continue"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="?attr/textPrimary"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/add_button" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>