Как я могу удалить пустое пространство внутри карты? - PullRequest
0 голосов
/ 26 октября 2018

Я создаю приложение для Android cv, но после TextView внутри CardView есть пустые

 below image  

screenshot of ui

ниже моего xml-кода, в котором я реализовалCardView как родительский дочерний как LinearLayout.

ниже моего xml-кода, где я реализовал CardView как родительский дочерний как LinearLayout.

    <?xml version="1.0" encoding="utf-8"?>

    <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">


            <ImageView
                android:id="@+id/imageView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="30dp"
                android:scaleType="fitXY" />


            <Space
                android:layout_width="50dp"
                android:layout_height="20dp" />


            <TextView
                android:id="@+id/about"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:layout_marginRight="250dp"
                android:gravity="center"
                android:text="@string/about_me"
                android:textSize="16sp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/introduction"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="16dp"
                android:layout_marginTop="16dp"
                android:gravity="start" />

        </LinearLayout>

    </android.support.v7.widget.CardView>

1 Ответ

0 голосов
/ 26 октября 2018

удалить эту строку из imageView

 android:layout_margin="30dp"

и дать

 android:layout_marginTop="30dp"
 android:layout_marginRight="30dp"
 android:layout_marginLeft="30dp"
...