I'm a Principal Software Engineer and UX/UI Designer.
My areas of focus are Android, Jetpack Compose, Design Systems and Kotlin Multiplatform.
I'm based in Cape Town, South Africa πΏπ¦
You can find me on:
Sample code used for a series of Medium posts on Material Components for Android
Home Page: https://medium.com/@ricknout
I've noticed that if you show the BottomSheetDialogFragment via the sample, by clicking on "show modal bottom sheet", while on landscape , it gets shown much smaller:
Is this on purpose?
Why does it occur?
Is there an official way to handle this? To know if it's in this state? Is it possible to expand it by default?
The only thing I've found about it, is a workaround as such:
https://stackoverflow.com/a/55713263/878126
but it's not an official solution...
Good day,
your UI setup doesn't adhere to the device measurement guidelines. Please see attached video, the scrolling demo gets jumbled up with the System Bar:
This way, it can have multiple states for doing something, and an animation between the states.
Example:
When you go to this:
And then you press backspace, it won't go away. You need to press it multiple times.
See video:
device-2019-05-23-124415.zip
Hello,
I tried to follow the tutorial as per the medium comment here . But still I'm not getting round corners. I made sure I extended the BottomSheetDialog thru my xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme.BottomSheet" parent="Theme.MaterialComponents.DayNight" />
<style name="AppTheme.BottomSheet.Themed" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Global color attributes -->
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryVariant">@color/color_primary_variant</item>
<item name="colorOnPrimary">@color/color_on_primary</item>
<item name="colorSecondary">@color/color_secondary</item>
<item name="colorSecondaryVariant">@color/color_secondary_variant</item>
<item name="colorOnSecondary">@color/color_on_secondary</item>
<item name="colorError">@color/color_error</item>
<item name="colorOnError">@color/color_on_error</item>
<item name="colorSurface">@color/color_surface</item>
<item name="colorOnSurface">@color/color_on_surface</item>
<item name="android:colorBackground">@color/color_background</item>
<item name="colorOnBackground">@color/color_on_background</item>
<item name="android:statusBarColor">@color/color_status_bar</item>
<!-- Global type attributes -->
<item name="fontFamily">@font/roboto_mono</item>
<item name="android:fontFamily">@font/roboto_mono</item>
<!-- Global shape attributes -->
<item name="shapeAppearanceSmallComponent">@style/AppShapeAppearance.SmallComponent</item>
<item name="shapeAppearanceMediumComponent">@style/AppShapeAppearance.MediumComponent</item>
<item name="shapeAppearanceLargeComponent">@style/AppShapeAppearance.LargeComponent</item>
<!-- Bottom Sheet widget style attributes -->
<item name="bottomSheetStyle">@style/AppStandardBottomSheet</item>
<item name="bottomSheetDialogTheme">@style/AppModalBottomSheet</item>
</style>
<style name="AppStandardBottomSheet">
<item name="shapeAppearance">?attr/shapeAppearanceLargeComponent</item>
<item name="backgroundTint">?attr/colorSecondary</item>
<item name="android:elevation">8dp</item>
<item name="behavior_hideable">false</item>
<item name="behavior_draggable">true</item>
<item name="behavior_skipCollapsed">false</item>
<item name="behavior_peekHeight">80dp</item>
<item name="behavior_fitToContents">false</item>
<item name="behavior_halfExpandedRatio">0.5</item>
<item name="behavior_expandedOffset">0</item>
</style>
<style name="AppModalBottomSheet" parent="ThemeOverlay.MaterialComponents.DayNight.BottomSheetDialog">
<item name="bottomSheetStyle">@style/ModalBottomSheet</item>
</style>
<style name="ModalBottomSheet" parent="Widget.MaterialComponents.BottomSheet.Modal">
<!-- Apply attributes here -->
</style>
</resources>
But still, I'm not seeing the round corners
On Android 8.1 (and maybe 9.0) there is a way to set a wallpaper or live wallpaper that will (try to) change the theme of the OS, making it dark or not.
Is it possible to adjust the UI based on it? If so, how can I do it and detect the theme?
I know that on Android Q it should be possible, but what about previous versions?
Hi,
Wonderful tutorial! The android documentation is particularly lacking and your project merges that gap.
In the file chip.xml
the text seems hardcoded i.e. "ChipDrawable." Is this by design or can it be changed? I tried modifying chip.text
but it made no difference.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.