I know that Rating bar is not in the list of remoteView compatibile classes, but I saw some widget with a rating bar working fine, how is it possible?
Should I simulate it with some star buttons?
Thanks
I solved in a bad way. I put on the widget a button (with a star drawable) for each star in need in the rating bar, then for each button star I give different OnClickListeners that corresponds to the star number. For example, the first star button has the OnclickLister 'firstStarPressed'. In this method the button star drawable is updated to a filled star drawable.
I got rid of ugly, but it works
Related
I am working on an android application that requires me to give an option of marking objects as favorite. I am planning of creating a clickable star on the right corner of the toolbar. So, when I click on that star it should become yellow and should be dull color star otherwise. Is there a way I can do that ?
You can create two images. One of the star without the yellow background. set an on click listener for it. and on click you can change the image to the one which has the yellow background.
hope this helps
I have a problem with the design of my ActionBar.
The problem is that I want to create an Action Button on my Action Bar that is a text only button an then I want move it around with margins and make the text bigger then the default (Not programmatically).
I tried to achive this using a style but it did not work and the size and the location of the botton stayed as the defalut. How can I achive this kind of result?
I've been wondering about this question quite long time. How do they do that? Is the title just disabled and the HomeAsUp button is custom and contains the logo, arrow and text?
Do you know any other ways how to accomplish this?
You can achieve this by making a single image that contain both
- arrow.
- text.
- icon.
And the work on this single image action
Many apps (Instagram for example) have these navigation buttons at the bottom of the screens for switching activities. A button is highlighted AFTER clicking and stays highlighted during the activity until the user switches to other activities.
I'm trying to implement these buttons in my app. Are these buttons part of the split action bar, or tabs placed at the bottom, or just regular image buttons in a group (like push-buttons/radio-buttons)? I tried using split action bar. It works well, however, I cannot figure out how to highlight or change the background of the button which was clicked. I searched but couldn't find a solution. There are postings about changing the background color of the action bar item using custom selector, but it only applies to the time the button is pressed. Since so many apps these days have these buttons, I believe there are must be solutions that I'm not aware. Please help! Thanks.
try to use the tabwidget for highlighting the tab(or)button for switching in bottom
I have a custom style for my rating bar. I want to change the star image from the code (deending on some user operation).
Is there anyway to change the style? the image?
I may try to re-inflate the ratingbar but I am not sure it will be OK, or if it is the correct way.