kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove bottomsheet elevation tinting.
rodzic
a316650aee
commit
2a9d2cf580
|
@ -1,6 +1,8 @@
|
|||
package org.thoughtcrime.securesms.components
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.ContextThemeWrapper
|
||||
|
@ -31,6 +33,8 @@ abstract class FixedRoundedCornerBottomSheetDialogFragment : BottomSheetDialogFr
|
|||
@ColorInt
|
||||
protected var backgroundColor: Int = Color.TRANSPARENT
|
||||
|
||||
private lateinit var dialogBackground: MaterialShapeDrawable
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setStyle(STYLE_NORMAL, themeResId)
|
||||
|
@ -46,11 +50,11 @@ abstract class FixedRoundedCornerBottomSheetDialogFragment : BottomSheetDialogFr
|
|||
.setTopRightCorner(CornerFamily.ROUNDED, ViewUtil.dpToPx(requireContext(), 18).toFloat())
|
||||
.build()
|
||||
|
||||
val dialogBackground = MaterialShapeDrawable(shapeAppearanceModel)
|
||||
dialogBackground = MaterialShapeDrawable(shapeAppearanceModel)
|
||||
|
||||
val bottomSheetStyle = ThemeUtil.getThemedResourceId(ContextThemeWrapper(requireContext(), themeResId), R.attr.bottomSheetStyle)
|
||||
backgroundColor = ThemeUtil.getThemedColor(ContextThemeWrapper(requireContext(), bottomSheetStyle), R.attr.backgroundTint)
|
||||
dialogBackground.setTint(backgroundColor)
|
||||
dialogBackground.fillColor = ColorStateList.valueOf(backgroundColor)
|
||||
|
||||
dialog.behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
|
||||
override fun onStateChanged(bottomSheet: View, newState: Int) {
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/more"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_download_24"
|
||||
app:srcCompat="@drawable/ic_save_24"
|
||||
app:tint="@color/signal_colorOnSecondaryContainer" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
|
|
@ -77,10 +77,10 @@
|
|||
android:background="?selectableItemBackground"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/Signal.Text.Body"
|
||||
android:textColor="@color/signal_text_primary"
|
||||
android:textColor="@color/signal_colorOnSurface"
|
||||
app:iconGravity="textStart"
|
||||
app:iconSize="20dp"
|
||||
app:iconTint="@color/signal_text_primary"
|
||||
app:iconTint="@color/signal_colorOnSurface"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -122,7 +122,8 @@
|
|||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:gravity="bottom"
|
||||
android:textAppearance="@style/Signal.Text.Body"
|
||||
android:textColor="@color/signal_colorNeutralInverse"
|
||||
android:textAppearance="@style/Signal.Text.BodyLarge"
|
||||
tools:text="Ugh." />
|
||||
</FrameLayout>
|
||||
|
||||
|
@ -163,7 +164,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/story_content_card_touch_interceptor"
|
||||
app:srcCompat="@drawable/ic_x_24"
|
||||
app:tint="@color/core_white" />
|
||||
app:tint="@color/signal_colorNeutralInverse" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.AvatarImageView
|
||||
android:id="@+id/sender_avatar"
|
||||
|
@ -199,7 +200,7 @@
|
|||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Body2.Bold"
|
||||
android:textColor="@color/core_white"
|
||||
android:textColor="@color/signal_colorNeutralInverse"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/distribution_list"
|
||||
app:layout_constraintEnd_toStartOf="@id/date"
|
||||
|
@ -215,8 +216,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:alpha="0.8"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Caption"
|
||||
android:alpha="0.64"
|
||||
android:textColor="@color/signal_colorNeutralVariantInverse"
|
||||
android:textAppearance="@style/Signal.Text.MaterialCaption"
|
||||
app:layout_constraintBottom_toBottomOf="@id/from"
|
||||
app:layout_constraintEnd_toStartOf="@id/more"
|
||||
app:layout_constraintStart_toEndOf="@id/from"
|
||||
|
@ -231,7 +233,7 @@
|
|||
android:drawablePadding="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Subtitle"
|
||||
android:textAppearance="@style/Signal.Text.MaterialCaption"
|
||||
android:visibility="gone"
|
||||
app:drawableStartCompat="@drawable/ic_lock_16"
|
||||
app:drawableTint="@color/transparent_white_80"
|
||||
|
@ -250,7 +252,7 @@
|
|||
app:layout_constraintBottom_toTopOf="@id/progress"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_more_vert_24"
|
||||
app:tint="@color/core_white" />
|
||||
app:tint="@color/signal_colorNeutralInverse" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.segmentedprogressbar.SegmentedProgressBar
|
||||
android:id="@+id/progress"
|
||||
|
@ -265,9 +267,9 @@
|
|||
app:segmentBackgroundColor="@color/transparent_white_40"
|
||||
app:segmentCornerRadius="10dp"
|
||||
app:segmentMargins="2dp"
|
||||
app:segmentSelectedBackgroundColor="@color/core_white"
|
||||
app:segmentSelectedStrokeColor="@color/core_white"
|
||||
app:segmentStrokeColor="@color/core_white"
|
||||
app:segmentSelectedBackgroundColor="@color/signal_colorNeutralInverse"
|
||||
app:segmentSelectedStrokeColor="@color/signal_colorNeutralInverse"
|
||||
app:segmentStrokeColor="@color/signal_colorNeutralInverse"
|
||||
app:totalSegments="0"
|
||||
tools:totalSegments="5" />
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
app:tabIndicatorColor="@color/signal_inverse_primary"
|
||||
app:tabIndicatorColor="@color/signal_colorOnSurface"
|
||||
app:tabIndicatorFullWidth="false"
|
||||
app:tabMode="fixed"
|
||||
app:tabSelectedTextColor="@color/signal_text_primary"
|
||||
app:tabSelectedTextColor="@color/signal_colorOnSurface"
|
||||
app:tabTextAppearance="@style/TextAppearance.Signal.Body2"
|
||||
app:tabTextColor="@color/signal_text_secondary" />
|
||||
app:tabTextColor="@color/signal_colorOnSurfaceVariant" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/pager"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
</style>
|
||||
|
||||
<style name="TextSecure.DarkNoActionBar.StoryViewer">
|
||||
<item name="android:windowBackground">@color/signal_colorSurface</item>
|
||||
<item name="android:windowContentTransitions">true</item>
|
||||
<item name="android:windowSharedElementEnterTransition">@transition/change_transform</item>
|
||||
<item name="android:windowSharedElementExitTransition">@transition/change_transform</item>
|
||||
|
|
|
@ -168,6 +168,11 @@
|
|||
<item name="cornerSize">8dp</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearance.Signal.MaterialAlertDialog" parent="ShapeAppearance.Material3.MediumComponent">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerRadius">28dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Signal.DayNight.Popup.OverflowMenu" parent="ThemeOverlay.Material3">
|
||||
<item name="overlapAnchor">false</item>
|
||||
<item name="android:popupElevation" tools:ignore="NewApi">4dp</item>
|
||||
|
@ -180,8 +185,7 @@
|
|||
<item name="shapeAppearance">@style/Signal.ShapeOverlay.Rounded</item>
|
||||
</style>
|
||||
|
||||
<style name="Signal.MaterialAlertDialog.Wide" parent="MaterialAlertDialog.Material3">
|
||||
<item name="shapeAppearance">@style/Signal.ShapeOverlay.Rounded</item>
|
||||
<style name="Signal.MaterialAlertDialog.Wide">
|
||||
<item name="backgroundInsetStart">0dp</item>
|
||||
<item name="backgroundInsetEnd">0dp</item>
|
||||
</style>
|
||||
|
@ -203,6 +207,7 @@
|
|||
<style name="ThemeOverlay.Signal.MaterialAlertDialog" parent="@style/ThemeOverlay.Material3.MaterialAlertDialog">
|
||||
<item name="alertDialogStyle">@style/Signal.MaterialAlertDialog</item>
|
||||
<item name="android:background">@color/signal_colorSurface1</item>
|
||||
<item name="android:dialogCornerRadius" tools:ignore="NewApi">28dp</item>
|
||||
<item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialog.Signal.Title.Text</item>
|
||||
<item name="materialAlertDialogBodyTextStyle">@style/MaterialAlertDialog.Signal.Body.Text</item>
|
||||
<item name="buttonBarPositiveButtonStyle">@style/Signal.Widget.Button.Dialog</item>
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
</style>
|
||||
|
||||
<style name="TextSecure.DarkNoActionBar.StoryViewer">
|
||||
<item name="android:windowBackground">@color/signal_colorSurface</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.BaseMediaPreview" parent="@style/TextSecure.BaseDarkNoActionBar">
|
||||
|
@ -463,20 +464,22 @@
|
|||
<item name="android:navigationBarColor" tools:targetApi="lollipop">@color/signal_colorSurface1</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Signal.FixedRoundedCorners.BottomSheet" parent="Widget.Material3.BottomSheet">
|
||||
<style name="Widget.Signal.FixedRoundedCorners.BottomSheet" parent="Widget.Material3.BottomSheet.Modal">
|
||||
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.BottomSheet.Rounded</item>
|
||||
<item name="backgroundTint">@color/signal_colorSurface1</item>
|
||||
<item name="android:elevation" tools:ignore="NewApi">0dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Signal.FixedRoundedCorners.Stories">
|
||||
<item name="bottomSheetStyle">@style/Widget.Signal.FixedRoundedCorners.BottomSheet.Stories</item>
|
||||
<item name="android:navigationBarColor" tools:targetApi="lollipop">@color/signal_colorSurface</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Signal.FixedRoundedCorners.BottomSheet.Stories">
|
||||
<item name="backgroundTint">@color/signal_background_tertiary</item>
|
||||
<item name="backgroundTint">@color/signal_colorSurface</item>
|
||||
<item name="android:elevation" tools:ignore="NewApi">0dp</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="ShapeAppearanceOverlay.Signal.BottomSheet.Rounded" parent="">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSizeTopRight">18dp</item>
|
||||
|
|
Ładowanie…
Reference in New Issue