Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
fenix
Commits
540b0939
Commit
540b0939
authored
May 27, 2019
by
Jonathan Almeida
Committed by
Sawyer Blatz
May 28, 2019
Browse files
Closes #2878: Cleanup with card-like styling
parent
336ec84a
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/share/ShareFragment.kt
View file @
540b0939
...
...
@@ -40,7 +40,7 @@ class ShareFragment : AppCompatDialogFragment(), CoroutineScope {
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setStyle
(
STYLE_NO_TITLE
,
R
.
style
.
CreateCollection
DialogStyle
)
setStyle
(
STYLE_NO_TITLE
,
R
.
style
.
Share
DialogStyle
)
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
?
{
...
...
app/src/main/res/drawable/bottom_sheet_dialog_fragment_background.xml
0 → 100644
View file @
540b0939
<?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>
\ No newline at end of file
app/src/main/res/layout/component_share.xml
View file @
540b0939
...
...
@@ -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>
app/src/main/res/values/dimens.xml
View file @
540b0939
...
...
@@ -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>
\ No newline at end of file
app/src/main/res/values/styles.xml
View file @
540b0939
...
...
@@ -152,7 +152,7 @@
<item
name=
"android:paddingEnd"
>
24dp
</item>
</style>
<style
name=
"
CreateCollection
DialogStyle"
parent=
"NormalTheme"
>
<style
name=
"DialogStyle
Base
"
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>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment