Open
Conversation
billmote
reviewed
Jul 17, 2024
| } | ||
|
|
||
| override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
| super.onViewCreated(view, savedInstanceState) |
| override fun onResume() { | ||
| webView.onResume() | ||
| super.onResume() | ||
| webView.onResume() |
| override fun onDestroy() { | ||
| webView.destroy() | ||
| super.onDestroy() | ||
| webView.destroy() |
Contributor
There was a problem hiding this comment.
This one, however, is not correct. The application's onDestroy might rely on something that is torn down in the super class. Google's recommendation is to call super first when creating/starting things, but last when pausing/stopping things.
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:orientation="vertical"> | ||
| android:layout_height="match_parent"> |
| companion object { | ||
| val DATE_FORMAT: DateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.ENGLISH) | ||
| } | ||
| private val dateFormat: DateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.getDefault()) |
| } | ||
|
|
||
| internal fun String.showSnackbar(length: Int = Snackbar.LENGTH_SHORT) { | ||
| protected fun String.showSnackbar(length: Int = Snackbar.LENGTH_SHORT) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ViewSwitcher Orientation Feature:
Change: Removed orientation property from ViewSwitcher.
Reason: This property was unused and caused confusion, so it was removed to simplify the code.
showSnackbar Function:
Change: Changed the access level of showSnackbar from internal to protected.
Reason: The function was only accessible to classes within the same module when it was internal. However, this function can only be used by subclasses of the SdkFragment class. Making it protected ensures that the function can only be accessed by subclasses of SdkFragment.
InboxViewer Class Lifecycle Functions:
Change: Super calls were made first in the onResume, onDestroy, and onViewCreated functions.
Reason: This change ensures that the class is protected from unexpected behavior by performing the default actions of the lifecycle functions first, and also increases overall compatibility.
Inbox Class Date Format:
Change: Proposed that the date format in the Inbox class be set according to locale.
Reason: It is suggested that the date format be determined according to the user's locale to improve the user experience. This way, users can view dates in a format that they are more familiar with.