grendio / XBottomSheet

Xamarin Customizable Bottomsheet - iOS & Android
MIT License
37 stars 3 forks source link

No resource identifier found for attribute #1

Closed CharafHormi closed 5 years ago

CharafHormi commented 5 years ago

Hello,

It looks like nuget doesn't actually install attr.xml which give me "No resource identifier found for attribute " compile error for

app:anchorOffset="320dp"
app:peekHeight="192dp"
app:defaultState="collapsed"

Adding it manually in my project resolves that error but then it gives me a weird behavior of the control taking half the screen while collapsed and not just the peekheight

AlexStefan commented 5 years ago

Hello,

There is a strange behaviour with the attr.xml because of the Nuget behaviour. Make sure that is added as a nuget, not as a nuget reference. (read more on https://stackoverflow.com/questions/50909751/copy-files-to-android-project-on-nuget-installation) For the weird behaviour, @butonium will come with details.

Thank you, Alexandru

butonium commented 5 years ago

Can you try to assign the values programmatically? I will investigate the parsing issue later today.

butonium commented 5 years ago

I couldn't reproduce the issue with your values. Can you give us some details about what device are you using? (perhaps we missed something)

CharafHormi commented 5 years ago

Ok so I just created a new Xamarin.Android project, installed the nuget , and added <XBottomSheet.Droid.Views.XBottomSheetView android:id="@+id/BottomSheet" app:anchorOffset="320dp" app:peekHeight="192dp" app:defaultState="collapsed" android:layout_width="match_parent" android:layout_height="match_parent"> </XBottomSheet.Droid.Views.XBottomSheetView>

I get 1

I then removed those from the axml, assigned PeekHeight programmaticaly (the other 2 are not accessible?) and deployed to emulator (Note that this is collapsed state) 2

The emulator is on API27 if that helps, Same as target Android version

AlexStefan commented 5 years ago

Ok, just to check if we understand it right: You have peakheight set at quite some height, but you'd expect it to be much lower, right? The collapsed state is represented by peakheight. What is you expected behaviour? Can you put the new Xamarin.Android project in a public repo and give use the link? After providing the link we'll look over and come with details or fixes for the mentioned problems. For the 'defaultState' and 'anchorOffset' you're right, they are not public, we will put that in the next release, which will happen after we fix the issues that you're mentioning.

AlexStefan commented 5 years ago

We've managed to repro your scenario and together with other changes we've published a new beta version on the NuGet. Please check it out and tell us if you still encounter issues. Also do note that in order to prevent any strange behaviour the control needs AppCompat theme within your app.

CharafHormi commented 5 years ago

After updating to the beta version it is resolved. Works both from xml attributes and programmaticaly.

Thanks,

butonium commented 5 years ago

Thank you for your report.