Mein Designer sagt, dass der weiße Bereich auf diesem Bild zu viel Schatten auf der Oberseite hat.Zu viel Schatten oben, wenn Höhenattribut verwendet wird
Dies ist mein 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"/>
....
Und die round_corner_2dp xml sieht wie folgt aus:
<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 ist die Höhe falsch? und was kann ich tun, um es zu reparieren?
Danke.
EDIT: Meine Frage ist, ob ich Höhen richtig mache und wenn das das Aussehen ist, das ich mit einer 2dp Höhe bekommen sollte oder wenn das falsch aussieht?
Ich bin nicht sicher, was wir Ihnen helfen können, ändern Sie die Höhe und sehen Sie, was Ihre Designer-Dinge. 2dp Elevation ist nicht so viel, aber wenn er es nicht mag, was können wir dann tun? – tyczj
Das ist das erste Mal, dass ich Elevation benutze. Ich denke, meine Frage ist, ob diese Elevation richtig aussieht oder ob ich sie irgendwie vermasselt habe? – casolorz
es gibt nicht viel zu vermasseln, Höheneinstellung alles, was Sie tun, ist das Höhen-Tag, wie Sie bereits sind. Warum verwenden Sie nicht eine "CardView" anstelle einer Form – tyczj