0

My designer says that the white area on this image has too much shadow on the top.

this image

This is my code:

<LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentTop="true"
        android:background="@color/the_blue_you_see"
        android:orientation="vertical"
        android:paddingRight="12dp"
        android:paddingTop="12dp"
        android:paddingBottom="12dp"
        android:paddingLeft="4dp"
        android:clipToPadding="false"
        >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/round_corner_2dp"
            android:orientation="horizontal"
            android:elevation="2dp"
            >

            <ImageButton
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:layout_centerVertical="true"
                android:layout_gravity="center"
                android:layout_margin="4dp"
                android:alpha="0.54"
                android:gravity="center_vertical"
                android:src="@drawable/some_image"
                android:visibility="gone"
                />


            <android.support.v7.widget.AppCompatAutoCompleteTextView
                android:layout_width="wrap_content"
                android:layout_height="32dp"
                android:layout_centerVertical="true"
                android:layout_gravity="center"
                android:layout_marginLeft="8dp"
                android:layout_marginRight="8dp"
                android:layout_weight="1"
                android:alpha="0.87"
                android:background="@color/white"
                android:gravity="center_vertical"
                android:popupBackground="@color/color_primary_light"
                android:selectAllOnFocus="true"
                android:singleLine="true"
                android:textColor="@color/primary_text"
                android:textSize="14sp"/>

             ....

And the round_corner_2dp xml looks like this:

<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle"  >
    <solid android:color="@color/color_white"/>
    <corners
        android:bottomRightRadius="2dp"
        android:bottomLeftRadius="2dp"
        android:topLeftRadius="2dp"
        android:topRightRadius="2dp"/>
</shape>

So is the elevation wrong? and what can I do to fix it?

Thanks.

EDIT: My question is whether I am doing elevations right and if that is the look I should be getting with a 2dp elevation or if that looks wrong?

casolorz
  • 8,486
  • 19
  • 93
  • 200
  • I am not sure what we can help you with, change the elevation and see what your designer things. 2dp elevation isnt that much but if he does not like it then what can we do about that – tyczj Mar 28 '16 at 20:20
  • This is my first time using elevation, I guess my question is whether that elevation looks right or if I screwed it up somehow? – casolorz Mar 28 '16 at 23:53
  • there isnt much to mess up, to set elevation all you do is use the elevation tag like you are already. Why dont you use a `CardView` instead of a shape – tyczj Mar 29 '16 at 12:27
  • Interesting suggestion, I'll try it and see how that turns out. – casolorz Mar 29 '16 at 13:08

1 Answers1

0

When I test it with CardView, I see no elevation on the top. Maybe you should use CardView.

ozo
  • 763
  • 7
  • 13