2

I'm trying to develop an android app, and I'm lost at something that I did in 10 minutes on iOS :(

I'm trying to create a rounded corner VIEW or Layout that contains an image, a bottom shadow, and a label with content such as a number.

Here is an example of what I wish to create:

enter image description here

As you can see, it is not just the image which has a round cornered, but the complete element.

I would really appreciate it if someone could help me!

Johnny Bones
  • 8,786
  • 7
  • 52
  • 117

1 Answers1

2

Short answer: android doesn't support clipping children to a background image and android does not support non rectangular views (feel free to correct me if i am wrong)

you can accomplish this using some hackery i won't personally give you myself, see: https://stackoverflow.com/a/8313096/623683

The real answer is: stop copying the "iOS look and feel" you won't get far and it goes against Google's own android style guide... probably not what you wanted to hear but android isn't iOS so we shouldn't treat it as such...

sorry i couldn't be more help -ck

Community
  • 1
  • 1
ckozl
  • 6,751
  • 3
  • 33
  • 50
  • 1
    sure the idea is not to "copy" iOS, but to have an app that looks at least a little the same on both platform.. this is just some style, because rounded images are something less ugly that rectangural images that's all... the solution you gave is indeed an ugly hack, i agree with you :( If really there is no other way i may try this... i really have a bad fealing there ... people should really have the ability to design their app without needing some dark hack... its like doing some crazy IE fixing :( – user1499670 Jul 03 '12 at 21:29
  • @user1499670 i am not defending android as a matter of fact i feel programming for it is a chore.. however, i do feel you should always follow the platform's UI design guidelines in some extent, not doing so is like swimming upstream... which is what you are doing right now, they can look "similar" without looking "identical", do the right thing, ditch the round corners... they are very 2005 anyway -ck – ckozl Jul 03 '12 at 21:37
  • I agree with you, following the guideline is indeed better. Maybe i'll add some kind of black border and other cool effects to make it looks great without doing some dark tricks or hacking for it. for the round corner, well they may me very 2005, but are still used even in new services like google+ ... and rectangural content is very 1990 ^^ (yes i'm trolling a bit ^^ ) – user1499670 Jul 04 '12 at 05:56