michael-rapp / AndroidBottomSheet

Provides a bottom sheet as proposed by Android's Material design guidelines.
Apache License 2.0
329 stars 32 forks source link

Improvement: Add the ability to pass an index to setItemColor() #12

Open hansemannn opened 5 years ago

hansemannn commented 5 years ago

Hey there,

first things first: This library is amazing! We from the Appcelerator cross-platform community already wrapped it to be used from JavaScript via Ti.BottomSheet and it works great.

One suggestion that's open for discussion: On iOS, there is a destructive property on the UIAlertController which, presented as an ActionSheet shows the selected option as a "critical" option. So if setIconColor would not only allow to pass a color resource-id but also an index, the developer (especially in the cross platform world) could construct the same concept on Android.

I am not sure if this would still be "full native Android" then and would love to hear your feedback on this. As bottom sheets gain more and more popularity these days, it would be a great addition!

michael-rapp commented 5 years ago

You are talking about the setItemColor-method, not the setIconColor-method (there isn't such methody), right? I guess it would be better to specify the id of the item for which the color should be set (instead of its index) because indices can change over time.

In general, I agree that this would be a nice feature and I guess it can be implemented without great effort. Personally, implementing such new features is not a top priority for me so I cannot promise that this will be implemented soon. However, if you are able to implement it on your own, I am eager to accept pull requests and I am willing to help with the implementation if necessary.

hansemannn commented 5 years ago

Sorry for the typo, yeah! I can take a look at this over the next weeks.