1
0
Fork 0

Closes #2878: Cleanup with card-like styling

master
Jonathan Almeida 2019-05-27 00:10:50 -04:00 committed by Sawyer Blatz
parent 336ec84a52
commit 540b0939d2
5 changed files with 26 additions and 10 deletions

View File

@ -40,7 +40,7 @@ class ShareFragment : AppCompatDialogFragment(), CoroutineScope {
override fun onCreate(savedInstanceState: Bundle?) {
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? {

View File

@ -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>

View File

@ -25,19 +25,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.cardview.widget.CardView
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="?above"
app:cardCornerRadius="@dimen/tab_corner_radius"
app:cardElevation="5dp"
android:backgroundTint="?above"
android:background="@drawable/bottom_sheet_dialog_fragment_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.Group
android:id="@+id/send_tab_group"
@ -53,11 +52,12 @@
android:textSize="12sp"
android:textStyle="bold"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/account_header"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="12dp"/>
app:layout_constraintTop_toTopOf="parent" />
<org.mozilla.fenix.share.AccountDevicesShareRecyclerView
android:id="@+id/account_devices_recyclerview"
@ -122,6 +122,6 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -35,4 +35,7 @@
<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>

View File

@ -152,7 +152,7 @@
<item name="android:paddingEnd">24dp</item>
</style>
<style name="CreateCollectionDialogStyle" parent="NormalTheme">
<style name="DialogStyleBase" parent="NormalTheme">
<item name="android:textAppearance">@style/TextAppearance.AppCompat</item>
<item name="android:colorControlNormal">?accentHighContrast</item>
<item name="android:colorControlActivated">?accentHighContrast</item>
@ -262,4 +262,8 @@
<style name="OnboardingCardDark" parent="OnboardingCardLight">
<item name="android:background">@drawable/onboarding_card_background_dark</item>
</style>
<style name="CreateCollectionDialogStyle" parent="DialogStyleBase"/>
<style name="ShareDialogStyle" parent="DialogStyleBase"/>
</resources>