Bug 1812461 - Migrate private browsing recommend PopupWindow to CFRPopup
Because previously the `privateBrowsingRecommend` Popup was using PopupWindow from android widget, it could not be modified to respect to PopupWindow behaviors. Therefore, we decided to migrate it to the CFRPopup.fenix/119.0
parent
4f96cde8c5
commit
611df98d22
@ -1,20 +0,0 @@
|
||||
<?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/. -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="45"
|
||||
android:endColor="@color/fx_mobile_layer_color_gradient_end"
|
||||
android:startColor="@color/fx_mobile_layer_color_gradient_start"
|
||||
android:type="linear" />
|
||||
<size
|
||||
android:width="256dp"
|
||||
android:height="152dp" />
|
||||
<corners
|
||||
android:bottomLeftRadius="8dp"
|
||||
android:bottomRightRadius="8dp"
|
||||
android:topLeftRadius="8dp"
|
||||
android:topRightRadius="8dp" />
|
||||
</shape>
|
@ -1,8 +0,0 @@
|
||||
<?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/. -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/fx_mobile_action_color_secondary" />
|
||||
<corners android:radius="@dimen/tab_corner_radius"/>
|
||||
</shape>
|
@ -1,74 +0,0 @@
|
||||
<?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/. -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/cfr_triangle_width"
|
||||
android:layout_height="@dimen/cfr_triangle_height"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="@dimen/cfr_triangle_margin_edge"
|
||||
android:importantForAccessibility="no"
|
||||
app:srcCompat="@drawable/ic_cfr_triangle"
|
||||
app:tint="@color/fx_mobile_layer_color_gradient_end" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/cfr_background_gradient">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cfr_message"
|
||||
style="@style/Header16TextStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:lineSpacingExtra="2dp"
|
||||
android:text="@string/private_mode_cfr_message_2"
|
||||
android:textColor="@color/fx_mobile_text_color_oncolor_primary"
|
||||
app:layout_constraintBottom_toTopOf="@id/cfr_pos_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/cfr_pos_button"
|
||||
style="@style/NeutralButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/rounded_gray_corners"
|
||||
android:text="@string/private_mode_cfr_pos_button_text"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/photonDarkGrey50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/cfr_neg_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cfr_message" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/cfr_neg_button"
|
||||
style="@style/NeutralButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="@string/cfr_neg_button_text"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/fx_mobile_text_color_oncolor_primary"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cfr_pos_button" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue