Skip to content
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

Use drawable picture for background and stick button #5

Open
Spettacolo83 opened this issue Mar 14, 2017 · 5 comments
Open

Use drawable picture for background and stick button #5

Spettacolo83 opened this issue Mar 14, 2017 · 5 comments

Comments

@Spettacolo83
Copy link

Hello there,
thank you for your wonderful class.
I'm trying to use it for my drone app.
Is there a way to customize background image and stick button image?
If I remove "custom:JV_" values in layout xml and just add android:background="@drawable/my_picture", I see only the background picture but I think there is not a way to modify the stick button image.
Thank you for your help!

@makowildcat
Copy link
Member

makowildcat commented Mar 19, 2017

Hello @Spettacolo83 ! (sorry for the delay)
Thanks for your feedback, indeed, that’s a great idea to use images too!
I will try to find different solutions this week and I’ll let you know :)
Kindly
Damien

@makowildcat
Copy link
Member

Hello @Spettacolo83 !
Here it is ! I updated the library (gradle too) with the custom image button feature :)
Now there is JV_buttonImage attribute where you can specify a drawable.
Sorry for being a bit long. Thank you again for your comment !
I let this issue open a bit, in case there is any problem let me know.
Kindly,
Damien

@Spettacolo83
Copy link
Author

Thank you so much @makowildcat !
I really appreciated!
Ciao
Stefano

@Spettacolo83
Copy link
Author

Hi @makowildcat I've just tried the update and it works great.
Do you think it would be possible to set the background size?
Actually I've set the joystick layout to half of full screen in order to get touches everywhere but the background fills all screen.
I think android:background does not allow that, so maybe it's possible by adding another custom:JV_ value. Thank you for your hard work!

@makowildcat
Copy link
Member

Hi @Spettacolo83 !
Yeah everything is possible :) I just need to find a way to keep it simple.
If I understood properly, another solution (not the best one) would be to add extra transparent margin in the picture itself.
I will have a look probably this week-end or the next.
Kindly,
Damien

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants