Yuito-app-android/app/src/main/res/values/styles.xml

189 lines
8.2 KiB
XML
Raw Normal View History

2017-01-03 00:30:27 +01:00
<resources>
<style name="TextSizeSmallest">
<item name="status_text_small">10sp</item>
<item name="status_text_medium">12sp</item>
<item name="status_text_large">14sp</item>
</style>
<style name="TextSizeSmall">
<item name="status_text_small">12sp</item>
<item name="status_text_medium">14sp</item>
<item name="status_text_large">16sp</item>
</style>
<style name="TextSizeMedium">
<item name="status_text_small">14sp</item>
<item name="status_text_medium">16sp</item>
<item name="status_text_large">18sp</item>
</style>
<style name="TextSizeLarge">
<item name="status_text_small">16sp</item>
<item name="status_text_medium">18sp</item>
<item name="status_text_large">20sp</item>
</style>
<style name="TextSizeLargest">
<item name="status_text_small">18sp</item>
<item name="status_text_medium">20sp</item>
<item name="status_text_large">22sp</item>
</style>
<style name="SplashTheme" parent="Theme.SplashScreen">
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_splash</item>
<item name="windowSplashScreenBackground">@color/tusky_grey_20</item>
<item name="postSplashScreenTheme">@style/TuskyTheme</item>
2017-05-10 04:36:05 +02:00
</style>
<style name="TuskyTheme" parent="TuskyBaseTheme" />
<style name="TuskyDialogActivityTheme" parent="@style/TuskyTheme" />
<style name="TuskyBaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Provide default text sizes. These are overwritten in BaseActivity, but
if they are missing then the Android Studio layout preview crashes
with java.lang.reflect.InvocationTargetException -->
<item name="status_text_small">14sp</item>
<item name="status_text_medium">16sp</item>
<item name="status_text_large">18sp</item>
<item name="colorPrimary">@color/tusky_blue</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorSecondary">@color/tusky_blue</item>
<item name="colorOnSecondary">@color/white</item>
<item name="colorSurface">@color/colorSurface</item>
2019-05-18 21:22:58 +02:00
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:colorBackground">@color/colorBackground</item>
<item name="colorBackgroundAccent">@color/colorBackgroundAccent</item>
<item name="colorBackgroundHighlight">@color/colorBackgroundHighlight</item>
<item name="windowBackgroundColor">@color/windowBackground</item>
<item name="android:textColorPrimary">@color/textColorPrimary</item>
<item name="android:textColorSecondary">@color/textColorSecondary</item>
<item name="android:textColorTertiary">@color/textColorTertiary</item>
Account activity redesign (#662) * Refactor-all-the-things version of the fix for issue #573 * Migrate SpanUtils to kotlin because why not * Minimal fix for issue #573 * Add tests for compose spanning * Clean up code suggestions * Make FakeSpannable.getSpans implementation less awkward * Add secondary validation pass for urls * Address code review feedback * Fixup type filtering in FakeSpannable again * Make all mentions in compose activity use the default link color * new layout for AccountActivity * fix the light theme * convert AccountActivity to Kotlin * introduce AccountViewModel * Merge branch 'master' into account-activity-redesign # Conflicts: # app/src/main/java/com/keylesspalace/tusky/AccountActivity.java * add Bot badge to profile * parse custom emojis in usernames * add possibility to cancel follow request * add third tab on profiles * add account fields to profile * add support for moved accounts * set click listener on account moved view * fix tests * use 24dp as statusbar size * add ability to hide reblogs from followed accounts * add button to edit own account to AccountActivity * set toolbar top margin programmatically * fix crash * add shadow behind statusbar * introduce ViewExtensions to clean up code * move code out of offsetChangedListener for perf reasons * clean up stuff * add error handling * improve type safety * fix ConstraintLayout warning * remove unneeded ressources * fix event dispatching * fix crash in event handling * set correct emoji on title * improve some things * wrap follower/foillowing/status views
2018-06-18 13:26:18 +02:00
<item name="iconColor">@color/iconColor</item>
<item name="android:listDivider">@drawable/status_divider</item>
<item name="dividerColor">@color/dividerColor</item>
<item name="textColorDisabled">@color/textColorDisabled</item>
<item name="materialDrawerStyle">@style/TuskyDrawerStyle</item>
<item name="materialDrawerHeaderStyle">@style/TuskyDrawerHeaderStyle</item>
<item name="alertDialogTheme">@style/TuskyDialog</item>
<item name="snackbarButtonStyle">@style/TuskyButton.TextButton</item>
<item name="appBarLayoutStyle">@style/Widget.MaterialComponents.AppBarLayout.Surface</item>
<item name="minTouchTargetSize">32dp</item> <!-- this affects RadioButton size -->
<item name="elevationOverlayEnabled">false</item> <!-- disable the automatic tinting of surfaces with elevation in dark mode -->
<item name="swipeRefreshLayoutProgressSpinnerBackgroundColor">?attr/colorSurface</item>
<item name="chipStyle">@style/Widget.MaterialComponents.Chip.Choice</item>
<item name="preferenceTheme">@style/TuskyPreferenceTheme</item>
Theming improvements (#502) * Split theme definitions into day and night * Add support for Night Mode in code * Add theme chooser in preferences * Fix translations * Adjust IDs * Adjust preferences for custom themes * UI tweaks for custom theme support * Added code for custom theme support 🍅 * Fixed resource display in Kotlin 🍅 * Restored styles * Updated strings * Fixed getIdentifier() to fit into setTheme() * Removed redundant resources * Reset default theme to "Dusky" * Fixed night mode handler to maintain compatibility * Refactor functions to use helper methods * Added license block * Added preview to theme selector * Added color identifier getter helper method * Fixed reference in AccountMediaFragment * Cleanup * Fixed navbar foreground not changing color * Fix fallback theme switch(){} * Enable location-based daylight trigger * Cleanup * Modified theming strategy to reduce clutter in preferences * Updated translations for latest version * Removed "Default" theme flavor from settings * Updated Polish translations 🇵🇱 * Modified TwilightManager handling code to support Android M's UiModeManager features and moved it to its own function * Updated Polish translations 🇵🇱 * Cleanup; Fixed hardcoded string * Added missing escape in string * Removed permission request dialog. As we now use native UiModeManager APIs that don't need special permission for Android 6.0 and above, we no longer need to bother user with Android M+ specific location permission request dialog. * Increased readability of ThemeUtil class * Refactored ThemeUtils.setAppNightMode method * Cleanup
2018-01-20 13:39:01 +01:00
</style>
<style name="ViewMediaActivity.AppBarLayout" parent="ThemeOverlay.AppCompat">
<item name="android:colorControlNormal">@color/white</item>
</style>
<style name="TuskyDialog" parent="@style/ThemeOverlay.MaterialComponents.Dialog.Alert">
2018-12-17 20:47:42 +01:00
<item name="android:letterSpacing">0</item>
<item name="dialogCornerRadius">8dp</item>
<item name="android:colorBackground">@color/colorBackground</item>
2017-01-03 00:30:27 +01:00
</style>
<style name="TuskyDialogFragmentStyle" parent="@style/ThemeOverlay.MaterialComponents.Dialog">
<item name="dialogCornerRadius">8dp</item>
</style>
<style name="TuskyTabAppearance" parent="Widget.MaterialComponents.TabLayout">
<item name="tabTextAppearance">?android:attr/textAppearanceButton</item>
<item name="android:textAllCaps">true</item>
<item name="tabIndicatorHeight">3dp</item>
</style>
<style name="TuskyPreferenceTheme" parent="@style/PreferenceThemeOverlay.v14.Material">
<item name="android:tint">?iconColor</item>
</style>
<style name="TuskyImageButton" parent="@style/Widget.MaterialComponents.Button.UnelevatedButton">
<item name="android:tint">?android:attr/textColorTertiary</item>
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
</style>
<style name="TuskyButton" parent="Widget.MaterialComponents.Button">
<item name="android:letterSpacing">0</item>
</style>
<style name="TuskyButton.Outlined" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="strokeColor">?attr/colorBackgroundAccent</item>
<item name="android:letterSpacing">0</item>
</style>
<style name="TuskyButton.TextButton" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:letterSpacing">0</item>
</style>
Keep scroll position when loading missing statuses (#3000) * Change "Load more" to load oldest statuses first in home timeline Previous behaviour loaded missing statuses by using "since_id" and "max_id". This loads the most recent N statuses, looking backwards from "max_id". Change to load the oldest statuses first, assuming the user is scrolling up through the timeline and will want to load statuses in reverse chronological order. * Scroll to the bottom of new entries added by "Load more" - Remember the position of the "Load more" placeholder - Check the position of inserted entries - If they match, scroll to the bottom * Change "Load more" to load oldest statuses first in home timeline Previous behaviour loaded missing statuses by using "since_id" and "max_id". This loads the most recent N statuses, looking backwards from "max_id". Change to load the oldest statuses first, assuming the user is scrolling up through the timeline and will want to load statuses in reverse chronological order. * Scroll to the bottom of new entries added by "Load more" - Remember the position of the "Load more" placeholder - Check the position of inserted entries - If they match, scroll to the bottom * Ensure the user can't have two simultaneous "Load more" coroutines Having two simultanous coroutines would break the calculation used to figure out which item in the list to scroll to after a "Load more" in the timeline. Do this by: - Creating a TimelineUiState and associated flow that tracks the "Load more" state - Updating this in the (Cached|Network)TimelineViewModel - Listening for changes to it in TimelineFragment, and notifying the adapter - The adapter will disable any placeholder views while "Load more" is active * Revert changes that loaded the oldest statuses instead of the newest * Be more robust about locating the status to scroll to Weirdness with the PagingData library meant that positionStart could still be wrong after "Load more" was clicked. Instead, remember the position of the "Load more" item and the ID of the status immediately after it. When new items are added, search for the remembered status at the position of the "Load more" item. This is quick, testing at most LOAD_AT_ONCE items in the adapter. If the remembered status is not visible on screen then scroll to it. * Lint * Add a preference to specify the reading order Default behaviour (oldest first) is for "load more" to load statuses and stay at the oldest of the new statuses. Alternative behaviour (if the user is reading from top to bottom) is to stay at the newest of the new statuses. * Move ReadingOrder enum construction logic in to the enum * Jump to top if swipe/refresh while preferring newest-first order * Show a circular progress spinner during "Load more" operations Remove a dedicated view, and use an icon on the button instead. Adjust the placeholder attributes and styles accordingly. * Remove the "loadMoreActive" property Complicates the code and doesn't really achieve the desired effect. If the user wants to tap multiple "Load more" buttons they can. * Update comments in TimelineFragment * Respect the user's reading order preference if it changes * Add developer tools This is for functionality that makes it easier for developers to interact with the app, or get it in to a known-state. These features are for use by users, so are only visible in debug builds. * Adjust how content is loaded based on preferred reading order - Add the readingOrder to TimelineViewModel so derived classes can use it. - Update the homeTimeline API to support the `minId` parameter and update calls in NetworkTimelineViewModel In CachedTimelineViewModel: - Set the bounds of the load to be the status IDs on either side of the placeholder ID (update TimelineDao with a new query for this) - Load statuses using either minId or sinceId depending on the reading order - Is there was no overlap then insert the new placeholder at the start/end of the list depending on reading order * Lint * Rename unused dialog parameter to _ * Update API arguments in tests * Simplify ReadingOrder preference handling * Fix bug with Placeholder and the "expanded" property If a status is a Placeholder the "expanded" propery is used to indicate whether or not it is loading. replaceStatusRange() set this property based on the old value, and the user's alwaysOpenSpoiler preference setting. This shouldn't have been used if the status is a Placeholder, as it can lead to incorrect loading states. Fix this. While I'm here, introduce an explicit computed property for whether a TimelineStatusEntity is a placeholder, and use that for code clarity. * Set the "Load more" button background to transparent * Fix typo. * Inline spec, update comment * Revert 1480c6aa3ac5c0c2d362fb271f47ea2259ab14e2 Turns out the behaviour is not desired. * Remove unnecessary Log call * Extract function * Change default to newest first
2023-01-13 19:26:24 +01:00
<style name="TuskyButton.TextButton.Icon">
<!-- Buttons with icons need additional padding -->
<item name="android:paddingLeft">@dimen/m3_btn_icon_btn_padding_left</item>
<item name="android:paddingRight">@dimen/m3_btn_icon_btn_padding_right</item>
</style>
<style name="TuskyTextInput" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense">
<item name="boxStrokeColor">@color/text_input_layout_box_stroke_color</item>
<item name="android:textColorHint">?android:attr/textColorTertiary</item>
</style>
<!--Black Application Theme Styles-->
<style name="TuskyBlackThemeBase" parent="TuskyBaseTheme">
<item name="colorPrimaryDark">@color/tusky_grey_05</item>
<item name="android:colorBackground">@color/black</item>
<item name="windowBackgroundColor">@color/black</item>
<item name="colorSurface">@color/tusky_grey_10</item>
<item name="iconColor">@color/tusky_grey_40</item>
<item name="colorBackgroundHighlight">@color/tusky_grey_40</item>
<item name="colorBackgroundAccent">@color/tusky_grey_20</item>
<item name="dividerColor">@color/tusky_grey_20</item>
</style>
<style name="TuskyBlackTheme" parent="TuskyBlackThemeBase" />
<style name="TuskyDrawerStyle" parent ="Widget.MaterialDrawerStyle">
<item name="materialDrawerBackground">?android:colorBackground</item>
<item name="materialDrawerPrimaryIcon">?iconColor</item>
<item name="materialDrawerSecondaryIcon">?iconColor</item>
<item name="materialDrawerDividerColor">?dividerColor</item>
</style>
<style name="TuskyDrawerHeaderStyle" parent ="Widget.MaterialDrawerHeaderStyle">
<item name="materialDrawerHeaderSelectionText">?android:textColorPrimary</item>
<item name="materialDrawerHeaderSelectionSubtext">?android:textColorPrimary</item>
</style>
<!-- customize the shape of the avatars in account selection list -->
<style name="BezelImageView">
<item name="materialDrawerMaskDrawable">@drawable/materialdrawer_shape_small</item>
<item name="materialDrawerDrawCircularShadow">false</item>
</style>
<!-- Used in exo_player_control_view.xml. Unmodified values are 5dp each -->
<style name="TuskyExoPlayerPlayPause" parent="ExoStyledControls.Button.Center.PlayPause">
<item name="android:layout_marginLeft">20dp</item>
<item name="android:layout_marginRight">20dp</item>
</style>
2017-01-03 00:30:27 +01:00
</resources>