Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

App Widget

 
Sahil Reddy
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have and App widget on home screen and i want to launch Quick action bar (same as Quick contacts in Contacts application) on home screen itself.
I know how to show quick action bar, but i am unable to get the click listener to App widget. So my problem is to just listen when my app widget is being clicked.

Thanks and Regards
 
Pranav Raulkar
Ranch Hand
Posts: 73
Android Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sahil,

Lets say that you want to execute something on click so you create an Intent for it,
Then you override the onRecieve method and check to see if Intent's action matches the one you set,
Hope this helps.
 
Sahil Reddy
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Pranav

But the problem is that this will execute one new activity and i dont want it ..... i want everything happens over home screen only. Let me tell you once again

I have an Icon (App Widget) over the Home screen and when i click it...there would be number of options shown as a part of quick action bar over the home screen only.....i dont want to go somewhere else.


Thanks and Regards
 
Pranav Raulkar
Ranch Hand
Posts: 73
Android Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sahil,

Sorry for late reply. I guess you might have figured this by now.
If you haven't I guess we can use ActionBar for creating action bar, just like in contacts.

Have a look at this http://www.xoriant.com/blog/mobile-application-development/android-ui-design-pattern-%E2%80%93-quick-action-bar.html

Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic