-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RTE] Change layout based on plain text / rich text mode #7621
[RTE] Change layout based on plain text / rich text mode #7621
Conversation
@@ -191,8 +197,7 @@ class RichTextComposerLayout @JvmOverloads constructor( | |||
} | |||
|
|||
views.composerFullScreenButton.apply { | |||
// There's no point in having full screen in landscape since there's almost no vertical space | |||
isInvisible = resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about tablets here? Maybe add a boolean in the resource to take care of that?
@@ -254,6 +259,33 @@ class RichTextComposerLayout @JvmOverloads constructor( | |||
views.richTextComposerEditText.isVisible = isTextFormattingEnabled | |||
views.richTextMenu.isVisible = isTextFormattingEnabled | |||
views.plainTextComposerEditText.isVisible = !isTextFormattingEnabled | |||
|
|||
// The layouts for formatted text mode and plain text mode are different, so we need to update the constraints | |||
val dp = { px: Int -> (px * resources.displayMetrics.density).toInt() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use DimensionConverter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 2 small remarks, else LGTM.
920489a
to
e9a99d8
Compare
SonarCloud Quality Gate failed. |
Type of change
Content
Motivation and context
Fixes #7620.
Screenshots / GIFs
Tests
Tested devices
Checklist