Я делаю приложение с google теперь-как интерфейс, с картами для контента.Изображение на карте границы - как ее решить?
Во-первых, пожалуйста, посмотрите на это изображение: http://imgur.com/oLSSvIn
мне удалось создать карту и добавить содержимое к нему, но мой ImageView становится все на верхней границе карты (теневая линия), как синяя стрелка указывает на то.
Как я могу сделать карту серой граничной звезды под изображением? Я попытался добавить маржу к изображению и нижнему/верхнему отступу на карту, но без каких-либо успехов.
Heres к коду для Б.Г. карты:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle"
android:dither="true">
<corners android:radius="0dp"/>
<solid android:color="#bdbdbd" />
</shape>
</item>
<item android:bottom="2dp">
<shape android:shape="rectangle"
android:dither="true">
<corners android:radius="0dp" />
<solid android:color="@android:color/white" />
</shape>
</item>
</layer-list>
и деятельности с содержимым:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp"
android:background="@drawable/friend_card_profile_bg" >
<ImageView
android:id="@+id/friendPic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/friend_testpic" />
<TextView
android:id="@+id/friendUsername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:layout_marginLeft="6dp"
android:layout_marginTop="4dp"
android:layout_toRightOf="@+id/friendPic"
android:fontFamily="sans-serif-condensed"
android:text="@string/profile_username"
android:textColor="#7f7f7f"
android:textSize="19dp" />
<TextView
android:id="@+id/friendLinksCounter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/friendUsername"
android:layout_marginLeft="6dp"
android:layout_toRightOf="@+id/friendPic"
android:fontFamily="sans-serif"
android:text="@string/profile_links_counter"
android:textColor="#acacac"
android:textSize="14dp" />
<TextView
android:id="@+id/friendFriendsCounter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/friendLinksCounter"
android:layout_marginLeft="6dp"
android:layout_toRightOf="@+id/friendPic"
android:fontFamily="sans-serif"
android:text="@string/profile_friends_counter"
android:textColor="#acacac"
android:textSize="14dp" />
</RelativeLayout>
Спасибо Вам
Работала, добавлена обивка, как вы сказали! – guilhermexot
Рад, что я мог бы помочь :) – Eluvatar