Merge branch 'main' into fork

# Conflicts:
#	README.md
#	mastodon/build.gradle
#	mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java
#	mastodon/src/main/java/org/joinmastodon/android/fragments/HomeTimelineFragment.java
#	mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java
#	mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java
#	mastodon/src/main/res/color/button_text_primary_light_on_dark.xml
#	mastodon/src/main/res/drawable/logo.xml
#	mastodon/src/main/res/layout/item_settings_color_picker.xml
#	mastodon/src/main/res/menu/color_picker.xml
#	mastodon/src/main/res/values-night/styles.xml
#	mastodon/src/main/res/values-v27/colors.xml
#	mastodon/src/main/res/values/colors.xml
#	mastodon/src/main/res/values/strings.xml
#	mastodon/src/main/res/values/styles.xml
This commit is contained in:
LucasGGamerM
2022-12-09 19:08:35 -03:00
189 changed files with 3412 additions and 902 deletions

View File

@@ -17,6 +17,28 @@
<attr name="colorTabInactive" format="color"/>
<attr name="colorAccentLightest" format="color"/>
<attr name="profileHeaderBackground" format="color"/>
<attr name="colorM3Primary" format="color"/>
<attr name="colorM3OnPrimary" format="color"/>
<attr name="colorM3PrimaryContainer" format="color"/>
<attr name="colorM3OnPrimaryContainer" format="color"/>
<attr name="colorM3Secondary" format="color"/>
<attr name="colorM3OnSecondary" format="color"/>
<attr name="colorM3SecondaryContainer" format="color"/>
<attr name="colorM3OnSecondaryContainer" format="color"/>
<attr name="colorM3Tertiary" format="color"/>
<attr name="colorM3OnTertiary" format="color"/>
<attr name="colorM3TertiaryContainer" format="color"/>
<attr name="colorM3OnTertiaryContainer" format="color"/>
<attr name="colorM3Background" format="color"/>
<attr name="colorM3OnBackground" format="color"/>
<attr name="colorM3Surface" format="color"/>
<attr name="colorM3OnSurface" format="color"/>
<attr name="colorM3SurfaceVariant" format="color"/>
<attr name="colorM3OnSurfaceVariant" format="color"/>
<attr name="colorM3Outline" format="color"/>
<attr name="colorM3DisabledBackground" format="color"/>
<attr name="colorM3PressedOverlay" format="color"/>
<attr name="primaryLargeButtonStyle" format="reference"/>
<attr name="secondaryLargeButtonStyle" format="reference"/>
@@ -24,4 +46,9 @@
<declare-styleable name="MaxWidthFrameLayout">
<attr name="android:maxWidth" format="dimension"/>
</declare-styleable>
<declare-styleable name="FloatingHintEditTextLayout">
<attr name="editTextOffsetY" format="dimension"/>
<attr name="android:labelTextSize" format="dimension"/>
</declare-styleable>
</resources>

View File

@@ -213,4 +213,50 @@
<color name="boost_selected">?android:colorPrimary</color>
<color name="shortcut_icon_background">#282C37</color>
<!-- <color name="shortcut_icon_foreground">@color/primary_700</color>-->
<!-- M3 dynamic colors -->
<!-- light theme -->
<color name="m3_sys_light_primary">#6750A4</color>
<color name="m3_sys_light_on_primary">#FFFFFF</color>
<color name="m3_sys_light_primary_container">#EADDFF</color>
<color name="m3_sys_light_on_primary_container">#21005D</color>
<color name="m3_sys_light_secondary">#625B71</color>
<color name="m3_sys_light_on_secondary">#FFFFFF</color>
<color name="m3_sys_light_secondary_container">#E8DEF8</color>
<color name="m3_sys_light_on_secondary_container">#1D192B</color>
<color name="m3_sys_light_tertiary">#7D5260</color>
<color name="m3_sys_light_on_tertiary">#FFF</color>
<color name="m3_sys_light_tertiary_container">#FFD8E4</color>
<color name="m3_sys_light_on_tertiary_container">#31111D</color>
<color name="m3_sys_light_background">#FFFBFE</color>
<color name="m3_sys_light_on_background">#1C1B1F</color>
<color name="m3_sys_light_surface">#FFFBFE</color>
<color name="m3_sys_light_on_surface">#1C1B1F</color>
<color name="m3_sys_light_surface_variant">#E7E0EC</color>
<color name="m3_sys_light_on_surface_variant">#49454F</color>
<color name="m3_sys_light_outline">#79747E</color>
<!-- dark theme -->
<color name="m3_sys_dark_primary">#D0BCFF</color>
<color name="m3_sys_dark_on_primary">#381E72</color>
<color name="m3_sys_dark_primary_container">#4F378B</color>
<color name="m3_sys_dark_on_primary_container">#EADDFF</color>
<color name="m3_sys_dark_secondary">#CCC2DC</color>
<color name="m3_sys_dark_on_secondary">#332D41</color>
<color name="m3_sys_dark_secondary_container">#4A4458</color>
<color name="m3_sys_dark_on_secondary_container">#E8DEF8</color>
<color name="m3_sys_dark_tertiary">#EFB8C8</color>
<color name="m3_sys_dark_on_tertiary">#492532</color>
<color name="m3_sys_dark_tertiary_container">#633B48</color>
<color name="m3_sys_dark_on_tertiary_container">#FFD8E4</color>
<color name="m3_sys_dark_background">#1C1B1F</color>
<color name="m3_sys_dark_on_background">#E6E1E5</color>
<color name="m3_sys_dark_surface">#1C1B1F</color>
<color name="m3_sys_dark_on_surface">#E6E1E5</color>
<color name="m3_sys_dark_surface_variant">#49454F</color>
<color name="m3_sys_dark_on_surface_variant">#CAC4D0</color>
<color name="m3_sys_dark_outline">#938F99</color>
</resources>

View File

@@ -5,9 +5,9 @@
<string name="get_started">Get started</string>
<string name="log_in">Log in</string>
<string name="next">Next</string>
<string name="loading_instance">Getting instance info…</string>
<string name="loading_instance">Retrieving server info…</string>
<string name="error">Error</string>
<string name="not_a_mastodon_instance">%s doesn\'t appear to be a Mastodon instance.</string>
<string name="not_a_mastodon_instance">%s doesn\'t appear to be a Mastodon server.</string>
<string name="ok">OK</string>
<string name="preparing_auth">Preparing for authentication…</string>
<string name="finishing_auth">Finishing authentication…</string>
@@ -47,7 +47,6 @@
</plurals>
<string name="posts">Posts</string>
<string name="posts_and_replies">Posts and Replies</string>
<string name="pinned_posts">Pinned</string>
<string name="media">Media</string>
<string name="profile_about">About</string>
<string name="button_follow">Follow</string>
@@ -127,20 +126,9 @@
<string name="action_vote">Vote</string>
<string name="tap_to_reveal">Tap to reveal</string>
<string name="delete">Delete</string>
<string name="delete_and_redraft">Delete and re-draft</string>
<string name="confirm_delete_title">Delete Post</string>
<string name="confirm_delete_and_redraft_title">Delete and re-draft Post</string>
<string name="confirm_delete">Are you sure you want to delete this post?</string>
<string name="confirm_delete_and_redraft">Are you sure you want to delete and re-draft this post?</string>
<string name="deleting">Deleting…</string>
<string name="pin_post">Pin to profile</string>
<string name="confirm_pin_post_title">Pin post to profile</string>
<string name="confirm_pin_post">Do you want to pin this post to your profile?</string>
<string name="pinning">Pinning post…</string>
<string name="unpin_post">Unpin from profile</string>
<string name="confirm_unpin_post_title">Unpin post from profile</string>
<string name="confirm_unpin_post">Are you sure you want to unpin this post?</string>
<string name="unpinning">Unpinning post…</string>
<string name="notification_channel_audio_player">Audio playback</string>
<string name="play">Play</string>
<string name="pause">Pause</string>
@@ -221,7 +209,6 @@
<string name="compose_hint">Type or paste what\'s on your mind</string>
<string name="content_warning">Content warning</string>
<string name="add_image_description">Add image description…</string>
<string name="image_description">Image description</string>
<string name="retry_upload">Retry upload</string>
<string name="edit_image">Edit image</string>
<string name="save">Save</string>
@@ -229,7 +216,6 @@
<string name="alt_text_subtitle">Alt text describes your photos for people with low or no vision. Try to only include enough detail to understand the context.</string>
<string name="alt_text_hint">e.g. A dog looking around suspiciously with narrowed eyes at the camera.</string>
<string name="visibility_public">Public</string>
<string name="visibility_unlisted">Unlisted</string>
<string name="visibility_followers_only">Followers only</string>
<string name="visibility_private">Only people I mention</string>
<string name="search_all">All</string>
@@ -256,12 +242,8 @@
<string name="theme_dark">Dark</string>
<string name="theme_true_black">True black mode</string>
<string name="settings_behavior">Behavior</string>
<string name="settings_show_replies">Show replies</string>
<string name="settings_show_boosts">Show boosts</string>
<string name="settings_load_new_posts">Automatically load new posts</string>
<string name="settings_gif">Play animated avatars and emoji</string>
<string name="settings_custom_tabs">Use in-app browser</string>
<string name="settings_show_interaction_counts">Show interaction counts</string>
<string name="settings_notifications">Notifications</string>
<string name="notify_me_when">Notify me when</string>
<string name="notify_anyone">anyone</string>
@@ -279,7 +261,7 @@
<string name="settings_privacy_policy">Privacy policy</string>
<string name="settings_spicy">The spicy zone</string>
<string name="settings_clear_cache">Clear media cache</string>
<string name="settings_app_version">Megalodon v%1$s (%2$d)</string>
<string name="settings_app_version">Mastodon for Android v%1$s (%2$d)</string>
<string name="media_cache_cleared">Media cache cleared</string>
<string name="confirm_log_out">Are you sure you want to sign out?</string>
<string name="sensitive_content">Sensitive content</string>
@@ -294,10 +276,8 @@
<string name="button_reblog">Reblog</string>
<string name="button_favorite">Favorite</string>
<string name="button_share">Share</string>
<string name="button_bookmark">Bookmark</string>
<string name="media_no_description">Media without description</string>
<string name="add_media">Add media</string>
<string name="mark_media_as_sensitive">Mark media as sensitive</string>
<string name="add_poll">Add a poll</string>
<string name="emoji">Emoji</string>
<string name="post_visibility">Post visibility</string>
@@ -310,8 +290,6 @@
<string name="open_in_browser">Open in browser</string>
<string name="hide_boosts_from_user">Hide reblogs from %s</string>
<string name="show_boosts_from_user">Show reblogs from %s</string>
<string name="user_post_notifications_on">Turned on post notifications for %s</string>
<string name="user_post_notifications_off">Turned off post notifications for %s</string>
<string name="signup_reason">why do you want to join?</string>
<string name="signup_reason_note">This will help us review your application.</string>
<string name="clear">Clear</string>
@@ -326,13 +304,11 @@
<string name="file_saved">File saved</string>
<string name="downloading">Downloading…</string>
<string name="no_app_to_handle_action">There\'s no app to handle this action</string>
<string name="local_timeline">Local</string>
<string name="federated_timeline">Federation</string>
<string name="local_timeline">Community</string>
<string name="trending_posts_info_banner">These are the posts gaining traction in your corner of Mastodon.</string>
<string name="trending_hashtags_info_banner">These are the hashtags gaining traction in your corner of Mastodon.</string>
<string name="trending_links_info_banner">These are the news stories being shared the most in your corner of Mastodon.</string>
<string name="local_timeline_info_banner">These are the most recent posts by the people who use the same Mastodon server as you.</string>
<string name="federated_timeline_info_banner">These are the most recent posts by the people in your federation.</string>
<string name="dismiss">Dismiss</string>
<string name="see_new_posts">See new posts</string>
<string name="load_missing_posts">Load missing posts</string>
@@ -402,22 +378,15 @@
<string name="upload_error_connection_lost">Your device lost connection to the internet</string>
<string name="upload_processing">Processing…</string>
<!-- %s is version like 1.2.3 -->
<string name="update_available">Megalodon %s is ready to download.</string>
<string name="update_available">Mastodon for Android %s is ready to download.</string>
<!-- %s is version like 1.2.3 -->
<string name="update_ready">Megalodon %s is downloaded and ready to install.</string>
<string name="update_ready">Mastodon for Android %s is downloaded and ready to install.</string>
<!-- %s is file size -->
<string name="download_update">Download (%s)</string>
<string name="install_update">Install</string>
<string name="check_for_update">Check for update</string>
<string name="no_update_available">No update available</string>
<string name="privacy_policy_title">Mastodon and your privacy</string>
<string name="privacy_policy_subtitle">Although the Megalodon app does not collect any data, the server you sign up through may have a different policy. Take a minute to review and agree to the Mastodon app privacy policy and your server\'s privacy policy.</string>
<string name="privacy_policy_subtitle">Although the Mastodon app does not collect any data, the server you sign up through may have a different policy. Take a minute to review and agree to the Mastodon app privacy policy and your server\'s privacy policy.</string>
<string name="i_agree">I Agree</string>
<string name="list_timelines">Lists</string>
<string name="follow_requests">Follow requests</string>
<string name="accept_follow_request">Accept follow request</string>
<string name="reject_follow_request">Reject follow request</string>
<string name="lists_with_user">Lists with %s</string>
<string name="empty_list">This list is empty</string>
<string name="instance_signup_closed">This server does not accept new registrations.</string>
<string name="text_copied">Copied to clipboard</string>
@@ -436,4 +405,7 @@
<string name="orange_color">Orange</string>
<string name="yellow_color">Yellow</string>
<string name="translate">Translate</string>
<string name="login_title">Welcome Back</string>
<string name="login_subtitle">Log in with the server where you created your account.</string>
<string name="server_url">Server URL</string>
</resources>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="sk_app_name">Megalodon</string>
<string name="sk_pinned_posts">Pinned</string>
<string name="sk_delete_and_redraft">Delete and re-draft</string>
<string name="sk_confirm_delete_and_redraft_title">Delete and re-draft Post</string>
<string name="sk_confirm_delete_and_redraft">Are you sure you want to delete and re-draft this post?</string>
<string name="sk_pin_post">Pin to profile</string>
<string name="sk_confirm_pin_post_title">Pin post to profile</string>
<string name="sk_confirm_pin_post">Do you want to pin this post to your profile?</string>
<string name="sk_pinning">Pinning post…</string>
<string name="sk_unpin_post">Unpin from profile</string>
<string name="sk_confirm_unpin_post_title">Unpin post from profile</string>
<string name="sk_confirm_unpin_post">Are you sure you want to unpin this post?</string>
<string name="sk_unpinning">Unpinning post…</string>
<string name="sk_image_description">Image description</string>
<string name="sk_visibility_unlisted">Unlisted</string>
<string name="sk_settings_show_replies">Show replies</string>
<string name="sk_settings_show_boosts">Show boosts</string>
<string name="sk_settings_load_new_posts">Automatically load new posts</string>
<string name="sk_settings_show_interaction_counts">Show interaction counts</string>
<string name="sk_settings_app_version">Megalodon v%1$s (%2$d)</string>
<string name="sk_mark_media_as_sensitive">Mark media as sensitive</string>
<string name="sk_user_post_notifications_on">Turned on post notifications for %s</string>
<string name="sk_user_post_notifications_off">Turned off post notifications for %s</string>
<string name="sk_federated_timeline">Federation</string>
<string name="sk_federated_timeline_info_banner">These are the most recent posts by the people in your federation.</string>
<string name="sk_update_available">Megalodon %s is ready to download.</string>
<string name="sk_update_ready">Megalodon %s is downloaded and ready to install.</string>
<string name="sk_check_for_update">Check for update</string>
<string name="sk_no_update_available">No update available</string>
<string name="sk_list_timelines">Lists</string>
<string name="sk_follow_requests">Follow requests</string>
<string name="sk_accept_follow_request">Accept follow request</string>
<string name="sk_reject_follow_request">Reject follow request</string>
<string name="sk_lists_with_user">Lists with %s</string>
<string name="sk_settings_always_reveal_content_warnings">Always reveal content warnings</string>
<string name="sk_disable_marquee">Disable scrolling text in title bars</string>
<string name="sk_settings_contribute">Contribute to Megalodon</string>
<string name="sk_settings_show_federated_timeline">Show federated timeline</string>
<string name="sk_notification_type_status">Posts</string>
<string name="sk_notify_posts">Post notifications</string>
<string name="sk_settings_color_picker">Color theme</string>
<string name="sk_color_theme_pink">Pink</string>
<string name="sk_color_theme_purple">Purple</string>
<string name="sk_color_theme_green">Green</string>
<string name="sk_color_theme_blue">Blue</string>
<string name="sk_color_theme_brown">Brown</string>
<string name="sk_color_theme_yellow">Yellow</string>
</resources>

View File

@@ -45,8 +45,30 @@
<item name="android:windowLightNavigationBar" tools:ignore="NewApi">true</item>
<item name="android:popupMenuStyle">@style/Widget.Mastodon.PopupMenu</item>
<item name="android:actionOverflowMenuStyle">@style/Widget.Mastodon.PopupMenu</item>
</style>
<!-- M3 colors -->
<item name="colorM3Primary">@color/m3_sys_light_primary</item>
<item name="colorM3OnPrimary">@color/m3_sys_light_on_primary</item>
<item name="colorM3PrimaryContainer">@color/m3_sys_light_primary_container</item>
<item name="colorM3OnPrimaryContainer">@color/m3_sys_light_on_primary_container</item>
<item name="colorM3Secondary">@color/m3_sys_light_secondary</item>
<item name="colorM3OnSecondary">@color/m3_sys_light_on_secondary</item>
<item name="colorM3SecondaryContainer">@color/m3_sys_light_secondary_container</item>
<item name="colorM3OnSecondaryContainer">@color/m3_sys_light_on_secondary_container</item>
<item name="colorM3Tertiary">@color/m3_sys_light_tertiary</item>
<item name="colorM3OnTertiary">@color/m3_sys_light_on_tertiary</item>
<item name="colorM3TertiaryContainer">@color/m3_sys_light_tertiary_container</item>
<item name="colorM3OnTertiaryContainer">@color/m3_sys_light_on_tertiary_container</item>
<item name="colorM3Background">@color/m3_sys_light_background</item>
<item name="colorM3OnBackground">@color/m3_sys_light_on_background</item>
<item name="colorM3Surface">@color/m3_sys_light_surface</item>
<item name="colorM3OnSurface">@color/m3_sys_light_on_surface</item>
<item name="colorM3SurfaceVariant">@color/m3_sys_light_surface_variant</item>
<item name="colorM3OnSurfaceVariant">@color/m3_sys_light_on_surface_variant</item>
<item name="colorM3Outline">@color/m3_sys_light_outline</item>
<item name="colorM3DisabledBackground">#1F1F1F1F</item>
<item name="colorM3PressedOverlay">@color/m3_sys_light_on_primary</item>
</style>
<style name="Theme.Mastodon.Dark" parent="Theme.AppKit">
<!-- needed to disable scrim on API 29+ -->
@@ -95,6 +117,29 @@
<item name="android:windowLightNavigationBar" tools:ignore="NewApi">false</item>
<item name="android:popupMenuStyle">@style/Widget.Mastodon.PopupMenu</item>
<item name="android:actionOverflowMenuStyle">@style/Widget.Mastodon.PopupMenu</item>
<!-- M3 colors -->
<item name="colorM3Primary">@color/m3_sys_dark_primary</item>
<item name="colorM3OnPrimary">@color/m3_sys_dark_on_primary</item>
<item name="colorM3PrimaryContainer">@color/m3_sys_dark_primary_container</item>
<item name="colorM3OnPrimaryContainer">@color/m3_sys_dark_on_primary_container</item>
<item name="colorM3Secondary">@color/m3_sys_dark_secondary</item>
<item name="colorM3OnSecondary">@color/m3_sys_dark_on_secondary</item>
<item name="colorM3SecondaryContainer">@color/m3_sys_dark_secondary_container</item>
<item name="colorM3OnSecondaryContainer">@color/m3_sys_dark_on_secondary_container</item>
<item name="colorM3Tertiary">@color/m3_sys_dark_tertiary</item>
<item name="colorM3OnTertiary">@color/m3_sys_dark_on_tertiary</item>
<item name="colorM3TertiaryContainer">@color/m3_sys_dark_tertiary_container</item>
<item name="colorM3OnTertiaryContainer">@color/m3_sys_dark_on_tertiary_container</item>
<item name="colorM3Background">@color/m3_sys_dark_background</item>
<item name="colorM3OnBackground">@color/m3_sys_dark_on_background</item>
<item name="colorM3Surface">@color/m3_sys_dark_surface</item>
<item name="colorM3OnSurface">@color/m3_sys_dark_on_surface</item>
<item name="colorM3SurfaceVariant">@color/m3_sys_dark_surface_variant</item>
<item name="colorM3OnSurfaceVariant">@color/m3_sys_dark_on_surface_variant</item>
<item name="colorM3Outline">@color/m3_sys_dark_outline</item>
<item name="colorM3DisabledBackground">#1FE3E3E3</item>
<item name="colorM3PressedOverlay">@color/m3_sys_dark_primary</item>
</style>
<style name="Theme.Mastodon.Dark.TrueBlack">
@@ -103,12 +148,14 @@
<item name="android:statusBarColor">@color/black</item>
<item name="android:actionBarTheme">@style/Theme.Mastodon.Toolbar.Dark.TrueBlack</item>
<item name="colorBackgroundLight">@color/black</item>
<item name="colorWindowBackground">@color/black</item>
<item name="colorButtonText">@color/black</item>
<item name="colorPollVoted">@color/gray_800</item>
<item name="colorSearchField">@color/gray_900</item>
<item name="colorBackgroundLightest">@color/black</item>
<item name="colorBackgroundPopup">@color/gray_900</item>
<item name="colorWindowBackground">@color/black</item>
<item name="colorM3Background">#000</item>
</style>
<style name="Theme.Mastodon.AutoLightDark" parent="Theme.Mastodon.Light"/>
@@ -682,6 +729,20 @@
<item name="android:popupBackground">@drawable/bg_popup</item>
</style>
<style name="Widget.Mastodon.M3.Button" parent="android:Widget.Material.Button">
<item name="android:textAllCaps">false</item>
<item name="android:textSize">14dp</item>
<item name="android:minHeight">40dp</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:stateListAnimator">@null</item>
</style>
<style name="Widget.Mastodon.M3.Button.Filled">
<item name="android:background">@drawable/bg_button_m3_filled</item>
<item name="android:textColor">@color/button_text_m3_filled</item>
<item name="android:paddingLeft">24dp</item>
<item name="android:paddingRight">24dp</item>
</style>
<style name="alert_title">
<item name="android:textColor">?android:textColorPrimary</item>