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.
Related
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.
I'm new in xamarin and I wanted to put my TabbedPage in the bottom in Xaml by using this tutorial:
https://learn.microsoft.com/fr-fr/xamarin/xamarin-forms/platform/android/tabbedpage-toolbar-placement-color
Then, when it didn't work, I tried to rebuild the project like suggested in this stackoverflow question:
Where can I find ToolbarPlacement attribute of TabbedPage?
I saw some people using a old nugget package, but I don't really want to use it, especially if there is a native way of doing it.
Xamarin forms version : 4.1.0.555618
Android version : 9
I hope there is someone that have the same problem as me,
Thank you in advance,
halonico,
Setting the placement and color of the toolbar on a TabbedPage, you just add the following code:
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
android:TabbedPage.BarItemColor="#666666"
android:TabbedPage.BarSelectedItemColor="Red"
android:TabbedPage.ToolbarPlacement="Bottom"
Although there are still many mistakes, you don't meed to worry about these, you try to clean your project, then build your project directly, you will see it works fine.
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.
I have a question about theme for Android app in Android Studio. When I'm creating a new project I would like to have an material design theme, but I don't get this activity theme to choose.
On first picture you can see my view for adding an activity and on second picture what I would like to have.
My current view
Material design view
Does anyone have a solution how to set up Android Studio so I can have a view which is showed on second picture?
I found the answer to this question.
To have this Project Template (Material design) available in Project Wizard, you need to have Android Studio version 1.4 or above.
For details see this link: Android Studio 1.4 Release
I don' t know if my as show that in the wizard. Bit materiale is a style. And this style is a guide line recommend by google. So you can make your app with material design also writing the code. For example you can use a floating action button, or a combo of beautiful color or pit simple animations inside yours views or using cards in listview.
If you have latest updated Android API, SDK, then you will get the material design by default; even if you would not use wizard for adding an activity.
Not sure if I'm barking up the wrong tree here, but just for reference, here are the Android SDK components I've got installed:
Here is the buildscript, android and dependency sections of my build.gradle:
And last but not least, Android Studio version:
If you couldn't find the tool fix, you can anyway inherit your activity from appcompactactivity.
And change your androidmanifest as follows to get material design feel
<application
//your stuff
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
Don't forget to add the following depenency in build.gradle and sync
compile 'com.android.support:appcompat-v7:22.0.0'
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