MatthiasRobbers / shortbread

Android library that creates app shortcuts from annotations
Apache License 2.0
1.78k stars 149 forks source link

Multiple shortcuts in same Activity #19

Closed THMCombine closed 7 years ago

THMCombine commented 7 years ago

Hello,

First of all, it's a very lovely library. My application is very fragment heavy, and I wish to add multiple @Shortcut to the same activity. Is this possible in the current iteration? Or could it be solved using the @Repeatable annotation? http://docs.oracle.com/javase/tutorial/java/annotations/repeating.html

MatthiasRobbers commented 7 years ago

This should be no problem with version 1.0.2. You just need one Shortcut annotation per method. So for example you can use one public method show fragment A and another public method to show fragment B.

THMCombine commented 7 years ago

Right, not sure why I had gotten the idea that it was only for annotating Classes. Thanks a lot for the quick answer.