Closes #2878: Cleanup with card-like styling
parent
336ec84a52
commit
540b0939d2
|
@ -40,7 +40,7 @@ class ShareFragment : AppCompatDialogFragment(), CoroutineScope {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setStyle(STYLE_NO_TITLE, R.style.CreateCollectionDialogStyle)
|
setStyle(STYLE_NO_TITLE, R.style.ShareDialogStyle)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners
|
||||||
|
android:topLeftRadius="@dimen/bottom_sheet_corner_radius"
|
||||||
|
android:topRightRadius="@dimen/bottom_sheet_corner_radius" />
|
||||||
|
<padding android:top="@dimen/bottom_sheet_top_padding" />
|
||||||
|
<solid android:color="?colorPrimary" />
|
||||||
|
</shape>
|
|
@ -25,19 +25,18 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:cardBackgroundColor="?above"
|
android:backgroundTint="?above"
|
||||||
app:cardCornerRadius="@dimen/tab_corner_radius"
|
android:background="@drawable/bottom_sheet_dialog_fragment_background"
|
||||||
app:cardElevation="5dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
<androidx.constraintlayout.widget.Group
|
||||||
android:id="@+id/send_tab_group"
|
android:id="@+id/send_tab_group"
|
||||||
|
@ -53,11 +52,12 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/account_header"
|
android:id="@+id/account_header"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="12dp"/>
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<org.mozilla.fenix.share.AccountDevicesShareRecyclerView
|
<org.mozilla.fenix.share.AccountDevicesShareRecyclerView
|
||||||
android:id="@+id/account_devices_recyclerview"
|
android:id="@+id/account_devices_recyclerview"
|
||||||
|
@ -122,6 +122,6 @@
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</FrameLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -35,4 +35,7 @@
|
||||||
|
|
||||||
<dimen name="onboarding_header_icon_height_width">32dp</dimen>
|
<dimen name="onboarding_header_icon_height_width">32dp</dimen>
|
||||||
|
|
||||||
|
<!-- Bottom Sheet Fragment card -->
|
||||||
|
<dimen name="bottom_sheet_corner_radius">16dp</dimen>
|
||||||
|
<dimen name="bottom_sheet_top_padding">8dp</dimen>
|
||||||
</resources>
|
</resources>
|
|
@ -152,7 +152,7 @@
|
||||||
<item name="android:paddingEnd">24dp</item>
|
<item name="android:paddingEnd">24dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="CreateCollectionDialogStyle" parent="NormalTheme">
|
<style name="DialogStyleBase" parent="NormalTheme">
|
||||||
<item name="android:textAppearance">@style/TextAppearance.AppCompat</item>
|
<item name="android:textAppearance">@style/TextAppearance.AppCompat</item>
|
||||||
<item name="android:colorControlNormal">?accentHighContrast</item>
|
<item name="android:colorControlNormal">?accentHighContrast</item>
|
||||||
<item name="android:colorControlActivated">?accentHighContrast</item>
|
<item name="android:colorControlActivated">?accentHighContrast</item>
|
||||||
|
@ -262,4 +262,8 @@
|
||||||
<style name="OnboardingCardDark" parent="OnboardingCardLight">
|
<style name="OnboardingCardDark" parent="OnboardingCardLight">
|
||||||
<item name="android:background">@drawable/onboarding_card_background_dark</item>
|
<item name="android:background">@drawable/onboarding_card_background_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="CreateCollectionDialogStyle" parent="DialogStyleBase"/>
|
||||||
|
|
||||||
|
<style name="ShareDialogStyle" parent="DialogStyleBase"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue