3

Unfortunately I unable to understand the below design that's why asked like semi-oval footer.

enter image description here

Actually this is the footer design of a layout with two side buttons comes from one of the ios app. First I thought it like a bottom tab, but after some research i got to know that ,it is a footer with a FramaLayout, two buttons and one text to show the count, but still not sure what is this and how to do..

I added one footer in my layout and give it transparent-black background, but still unable to do this particular semi-oval style. suggestions and helps will be mostly appreciable. Please suggest.

Thanks

Ranjit
  • 5,130
  • 3
  • 30
  • 66

2 Answers2

3

I imagine your footer being a container: a LinearLayout (so that you can use weights) or a RelativeLayout.

Then it has a couple of clickable elements disposed horizontally (not giving details on this, assuming you can manage it by yourself)

Now, these two "clickables" (I'd use TextViews, so I can put the images and even text inside) have a semitransparent (50% black) background like these:

enter image description here (rect_left)

and

enter image description here (rect_rite)

To let the container background image see through.

I'm not so great at graphics, you will be able to make better pictures than mine. ;)
These ones just illustrate the concept.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • Great Frank.you are so great at graphics also. Thanks for your help. – Ranjit Jul 11 '14 at 09:35
  • how do you manage that the white area above the gray "semi-oval" shape is not clickable? – Philipp Jahoda Jul 11 '14 at 09:35
  • @PhilippJahoda no, the "white" (but it's really **transparent**) area is clickable, but you don't even notice that. – Phantômaxx Jul 11 '14 at 09:37
  • 1
    @RanjitPati no, I'm not. You see it looks like a saw (it's called aliasing). I should spend more time over it, to make it look good. But time is so precious in this week-end... ;) – Phantômaxx Jul 11 '14 at 09:39
1

You should create a new Drawable and use it as a background on a Relative/Linear Layout or View

Check this SO question and answer: Can I draw rectangle in XML?

As the question answer pair above gives an example of a rectangle you can modify it to be ovular:

<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">

   <solid 
       android:color="#666666"/>

   <size 
       android:width="120dp"
        android:height="120dp"/>
</shape>
Community
  • 1
  • 1
Ryno Coetzee
  • 516
  • 4
  • 13