0

I'm trying to incorporate something like this: http://imgur.com/a/2fWDE?gallery I've seen where I can use a tabbed action bar, but what I'm need is to have the bubble tabs at the bottom along with the ability to send information between the activities. I haven't really tried fragments yet, and I'm not sure if that's the way to go either.

REAL O G
  • 693
  • 7
  • 23
  • 2
    As a quick comment, that looks like a ViewPager+Tabs setup to me, with bubbles on the bottom instead. If you know how to setup "sliding tabs", then all you need to do is create the bubbles (imagebuttons) on the bottom and sync their selected/not selected state with the ViewPager like the tabs. – DragonJawad Dec 11 '14 at 14:55
  • For the selected/not selected state, how would I implement that? I've got an imagebutton created that uses a ring shapedrawable for the not selected state. Do I just create another imagebutton with two ring shapedrawables (one for the ring, one for the center ellipse)? OR should I just try to create two .pngs in an external program to use? If that is the case, what size do I make them, as I've tried and they come out huge once I import them. – REAL O G Dec 12 '14 at 12:56
  • 1
    I feel bad not replying to you for a while. I've been procrastinating replying as I want to give you a good answer, but I have work deadlines + finals this week. Essentially, you can use an ImageButton with selected states [http://stackoverflow.com/questions/2604599/android-imagebutton-with-a-selected-state]. Just create two drawables then create a drawable xml file and set it up like the above link. I'll try to give you a full answer that tries to answer everything soon - hopefully tomorrow - but I can give short answers for now. Sorry about the delay. – DragonJawad Dec 14 '14 at 02:38
  • 1
    Note that you'll have to set which one is selected, and set all others to be "unselected." However, there's also an alternative method (which I'd personally prefer as it gives far more control). Basically, you MANUALLY [re-]set the drawables. All you need to do is keep track of the previously selected item and the newly selected item. [Note that there is more than one way to set the "selected" item visually, although not all may work as expected. Feel free to explore a few different methods!] – DragonJawad Dec 14 '14 at 02:40
  • Thank you for your time. This is incredibly helpful. Let me ask you one more thing: I've created the .png file multiple times in various programs(photoshop, inkscape, paint.net) and every time I use it for the imagebutton, it comes out grainy. Here is a side-by-side of the image I created vs the standard radio button (custom on the left) http://imgur.com/QvAsQ5Z . The standard radio button has much cleaner edges than anything I've been able to import so far. Do you have any idea why? – REAL O G Dec 15 '14 at 17:39
  • 1
    I'm pretty sure the radio button uses the built-in drawable features (ie, the drawable xml files) and is easily adjustable. For simple shapes like these, I suggest looking at how to make xml drawables- they can easily scale with different screen sizes, in my personal experience. Also, I don't have that much (recent) image editing experience, so I can't say what's making your personal image grainy, though. Encoding/compression [image itself]? Scale type? Opening another question may help with that. Also, sorry once again for not answering yet. I'm slowly drowning in work right now... – DragonJawad Dec 15 '14 at 20:30

0 Answers0