-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[refactor] Use DevicesPreviews
annotation
#166
[refactor] Use DevicesPreviews
annotation
#166
Conversation
Great job, @mhmd-android! Could you please provide a screenshot of the new previews in Android Studio? |
@Kaaveh, Yes sure, but I don't know Why my Android Studio doesn't show the preview, this problem is only in this preview |
@mhmd-android I faced this issue before, so I made it a GitHub issue. Can you investigate the root cause? |
@Kaaveh, As long as I remember, I had this problem and I didn't understand what the problem is, but if you want to merge this PR and after that make it new an issue, if I succeed, I will definitely solve it. |
I think it cannot be handled with just |
Unfortunately, no. However, I think Jetpack Compose has made it easier to preview multiple screens in production. |
@Kaaveh |
Right, so let's close this PR. Thanks for your time ✌🏻 |
Thanks, dear @Kaaveh, And as the last issue, I should point out that we can't use code generation? |
What do you mean exactly? |
For example, let's write code generation (of course, I have to point out that I have not done this so far) that the annotation takes two inputs as width and height, and then the code is generated for us in the body of Something like this code:
And finally, be used in this way:
Of course, the problem here is that this annotation processor only produces this part of the code:
and I think we cannot use it anywhere else. Anyway, I said, keep this in mind, if you think this is a suitable solution, it should be researched and finally used. |
Great idea! Would you like to work on this in the future? There is no rush. |
Yes, I would, of course |
Could you please comment on #169 to assign it to you? |
Done 🙌 |
Removed individual
@Preview
functions for different device types and configurations and used the@DevicesPreviews
function#123 close