I'm glad to see compose material3 has updated to beta release of 1.0.0-beta03. Though, I notice they still haven't added the implementation of something like a BottomSheetLayout or BottomSheetScaffold, which I'd like to apply in my material3 project.
Of course I can at least add the original androidx.compose.material library as a dependency, but it's what I hope to avoid since I've already moved to the brand new material3 UI.
I wonder is there any solution or workaround to realize almost the same effect as a BottomSheetLayout in current version of compose material3. Many thanks!
My solution to have BottomSheetScaffold in material3 was to copy paste the implementation into my project and fixing all the dependencies to use material3 instead of material, or copy-pasting them as well if it wasn't possible. You can find my reply to a similar ticket along with the code over there:
https://stackoverflow.com/a/74175096/4373346
Hope it helps.
Related
I need to reproduce this.
I've made the code for the blue rectangle so far but I can't find a way to add that white blurr around the rectangle.
Does anyone know how to do it?
It's easy in all languages except Kotlin...
You need to make use of third party libraries. Such designs patterns are called neumorphisms . These can be achieved easily using these library :
Fornewid-Neumorphism
https://github.com/fornewid/neumorphism
Synth-CRED
https://github.com/CRED-CLUB/synth-android
Thank you all for your answers.
I've finally found Jetpack Compose (don't know why I didn't see it sooner) and I will be using that going forward.
It seems to be the better way of building an app's UI in Kotlin.
So i want to add Bottom Sheets in my app and looked into the material design steps for doing so but the problem is I am unable to add attributes like app:behavior_hideable , app:behavior_peekHeight, etc .
I have looked in others code as well but didn't found anything solution to it.
implementation 'androidx.appcompat:appcompat:1.1.0-beta05'
implementation 'com.google.android.material:material:1.1.0-alpha07'
I have included the latest dependencies available to me at this time.
Still there isn't any positive breakthrough.
Well I think that somehow android studio was not auto-detecting those attributes .
So, by just sheer luck i tried to copy paste those attributes from Material design site (https://material.io/develop/android/components/bottom-sheet-behavior/) and that seems to work just fine.
Hope this works for you as well.
I used Theme.MaterialComponents.Light.NoActionBar theme and it seems to be affecting constrained layout which is some of elements(such as buttons) can not see in the "Design and Blueprint". But they are appearing properly when the app is running.
I tried the following steps but no use.
1) Try to clean the project
2) Try to invalidate and restart Android Studio
3) Try Rebuilding the project
I tried adding Base key word but it seems to be wrong.
<style name="AppTheme" parent="Base.Theme.MaterialComponents.Light.NoActionBar">
I'm currently using the latest dependency which is 'com.google.android.material:material:1.1.0-alpha07'
It seems to be ok with early dependency such as 'com.google.android.material:material:1.0.0' but I'm wondering why it is not working with the latest releases.
I could use different theme which do not have material components and overcome this problem as well, but it is not what I'm expecting.
Your answers and comments are highly appreciated.
This issue is directly related to the version of material design. I used the latest version of android studio with latest version material design in the constraint layout. The same issue happened when I dropped a button from the palette to layout, it made the layout vanish and I changed the theme to the default, it also worked fine. But as u said, I should use material design. When I used latest material design version( com.google.android.material:material:1.7.0), it didn't work but when I used com.google.android.material:material:1.5.0, it worked fine. That's why u can change the version to find the one which is compatible and not buggy.
we're just starting a new project
And it seems like both butterknife and databinding are awesome tools to reduce boilerplate code.
We started with butterkife and added databinding later, the idea is to not have viewmodel classes in java instead express them in xml.
Is there any reason to keep butterkife around ?
The same situation happened in my current project. We used ButterKnife and DataBinding alongside. We decided to get rid of one of those as we used ButterKnife version 7.X (converting to 8.X would be quite painful in such a big app). We got much cleaner code with DataBinding and removing the other library reduced build time :)
BUT notice that DataBinding still won't work with enabled Jack&Jill compiler, which will change soon hopefully. Using neenbedankt-apt and Retrolambda is still OK.
TL;DR
Get rid of ButterKnife.
Butter Knife come with bind resource like color, animation,...etc.
that data binding can't do actually.
For a small XML view Data binding is good but as your view will become complex then it really hard to maintain it.
Please check the below link
https://medium.com/#Miqubel/4-reasons-im-not-using-android-data-binding-e62127c2650c
I'm looking over design support library examples in the "Cheesesquare" demo of newer components I want to use. On my OnePlus One, the Toolbar is barely off-screen.
I think CheeseDetailActivity.java, activity_detail.xml, and maybe styles.xml are pertinent here but I can't seem to make changes that correct the misalignment.
Marked fixed for future release in AOSP Issue Tracker #175069