I want to show/hide a widget when clicking on a button in GUI ? is it possible to control the appearance of the widget in the home screen grammatically ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you mean an app-widget that seats on the home screen, I don’t think it’s possible unless the home screen application is yours also. App-widgets are running in the process of the home screen application and the API for them is very tight, they are using remoteviews instead of views and there are very little things you can do with remoteviews.
The appearance basics of an app-widget like the position and the visibility are controlled by the home screen application. It is possible though to change the visibility or the appearance of the elements inside the app-widget but not for the app-widget itself.
For example you can hide all of the elements of an app-widget so the user can not see it but the space it consumes will not be available for other widgets. I am also quite sure that you can not control the position of the app-widget on the home screen, I have developed some of them and I can not find a way to know where are they positioned by the user.
Hope this helps…