Я создаю пользовательскую карту, комбинируя различные ImageViews
(изображения, векторная графика). Я использовал ConstraintLayout
для этой цели и сделал в 5,0 дюйма после изменения размера экрана 5,5, 6, 7,7, карта повреждена, и ImageViews расположены в разных областях ...
Как я могу достичь, пожалуйста, помогите мне?
ImageViews - векторные изображения
(может быть, это глупый или глупый вопрос, пожалуйста, помогите мне, я не могу справиться с этой проблемой, я потратил больше недели, чтобы дроу каждый ImageView в векторе .. до downvote, пожалуйста, поймите мою ситуацию :()
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
>
<android.support.constraint.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="294dp"
android:layout_height="match_parent"
android:layout_marginEnd="33dp"
android:layout_marginStart="33dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:id="@+id/kasargod"
android:layout_width="47dp"
android:layout_height="75dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.118"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.295"
app:srcCompat="@drawable/kasargod" />
<ImageView
android:id="@+id/kannur"
android:layout_width="69dp"
android:layout_height="95dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.229"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.362"
app:srcCompat="@drawable/kannur" />
<ImageView
android:id="@+id/wayand"
android:layout_width="91dp"
android:layout_height="108dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.426"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.405"
app:srcCompat="@drawable/wayand" />
<ImageView
android:id="@+id/kozhikode"
android:layout_width="60dp"
android:layout_height="98dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.355"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.457"
app:srcCompat="@drawable/kozhikode" />
<ImageView
android:id="@+id/malappuram"
android:layout_width="115dp"
android:layout_height="119dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.611"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.563"
app:srcCompat="@drawable/malppuram" />
<ImageView
android:id="@+id/palakd"
android:layout_width="88dp"
android:layout_height="105dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.57"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.59"
app:srcCompat="@drawable/palakad" />
<ImageView
android:id="@+id/tcr"
android:layout_width="85dp"
android:layout_height="103dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.56"
app:layout_constraintStart_toEndOf="@+id/malappuram"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.624"
app:srcCompat="@drawable/tcr" />
<ImageView
android:id="@+id/ern"
android:layout_width="85dp"
android:layout_height="93dp"
android:layout_marginBottom="17dp"
app:layout_constraintBottom_toTopOf="@+id/pathnm"
app:layout_constraintEnd_toStartOf="@+id/kottayam"
app:layout_constraintHorizontal_bias="0.404"
app:layout_constraintStart_toEndOf="@+id/malappuram"
app:layout_constraintTop_toBottomOf="@+id/palakd"
app:layout_constraintVertical_bias="0.495"
app:srcCompat="@drawable/ernakulam" />
<ImageView
android:id="@+id/idukki"
android:layout_width="0dp"
android:layout_height="116dp"
android:layout_marginBottom="132dp"
android:layout_marginEnd="18dp"
android:layout_marginStart="18dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/tvm"
app:layout_constraintStart_toStartOf="@+id/pathnm"
app:srcCompat="@drawable/idukki" />
<ImageView
android:id="@+id/kottayam"
android:layout_width="171dp"
android:layout_height="44dp"
android:layout_marginBottom="56dp"
android:layout_marginEnd="1dp"
android:layout_marginTop="54dp"
app:layout_constraintBottom_toBottomOf="@+id/ern"
app:layout_constraintEnd_toEndOf="@+id/tvm"
app:layout_constraintTop_toTopOf="@+id/idukki"
app:layout_constraintVertical_bias="0.060000002"
app:srcCompat="@drawable/kottayam" />
<ImageView
android:id="@+id/aalapuzha"
android:layout_width="43dp"
android:layout_height="77dp"
android:layout_marginEnd="111dp"
android:layout_marginTop="51dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/idukki"
app:srcCompat="@drawable/aalapuzha" />
<ImageView
android:id="@+id/pathnm"
android:layout_width="0dp"
android:layout_height="93dp"
android:layout_marginBottom="66dp"
android:layout_marginEnd="26dp"
android:layout_marginStart="18dp"
android:layout_marginTop="61dp"
app:layout_constraintBottom_toBottomOf="@+id/tvm"
app:layout_constraintEnd_toEndOf="@+id/kottayam"
app:layout_constraintStart_toStartOf="@+id/aalapuzha"
app:layout_constraintTop_toTopOf="@+id/idukki"
app:srcCompat="@drawable/pathanamthitta" />
<ImageView
android:id="@+id/klm"
android:layout_width="0dp"
android:layout_height="115dp"
android:layout_marginEnd="10dp"
android:layout_marginStart="15dp"
app:layout_constraintBottom_toBottomOf="@+id/aalapuzha"
app:layout_constraintEnd_toEndOf="@+id/pathnm"
app:layout_constraintStart_toStartOf="@+id/aalapuzha"
app:layout_constraintTop_toBottomOf="@+id/aalapuzha"
app:srcCompat="@drawable/kollam" />
<ImageView
android:id="@+id/tvm"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="28dp"
android:layout_marginEnd="27dp"
android:layout_marginStart="26dp"
android:layout_marginTop="26dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/aalapuzha"
app:layout_constraintTop_toTopOf="@+id/klm"
app:srcCompat="@drawable/tvm" />
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
Добавлены скриншоты ниже того, что я сделал
5.0, правильная карта
6.0, arragement borken
3.7, нарушена договоренность