I have a problem in my dialog fragment. For some reason when it opens the dialog fragment it cut the textView,spiner and the buttons. in other words it cut all the right side.
as you can see, all the right side is cut off.
in the android studio it is look fine, but when i run it, this what happens.
how can i fix it?
This is XML code
<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:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.world.bolandian.talent.fragments.AddVideoAudioFragment">
<TextView
android:id="@+id/textView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginTop="32dp"
android:gravity="center"
android:text="UPLOAD YOUR MUSIC"
android:textAppearance="@style/TextAppearance.AppCompat.Display1"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Spinner
android:id="@+id/spinner"
android:layout_width="227dp"
android:layout_height="19dp"
android:layout_marginStart="8dp"
android:entries="@color/bootstrap_brand_info"
android:popupBackground="@color/bootstrap_brand_success"
android:spinnerMode="dialog"
app:layout_constraintBottom_toBottomOf="@+id/textView2"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView2"
app:layout_constraintTop_toTopOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="68dp"
android:text="Choose Genre"
android:textSize="18dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<android.support.design.widget.TextInputLayout
android:id="@+id/textInPut"
android:layout_width="368dp"
android:layout_height="wrap_content"
android:layout_marginTop="45dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/spinner">
<android.support.design.widget.TextInputEditText
android:id="@+id/etTitleMusic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Title your upload" />
</android.support.design.widget.TextInputLayout>
<com.beardedhen.androidbootstrap.BootstrapButton
android:id="@+id/btnUploadVideo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="56dp"
android:text="UPLOAD VIDEO"
app:bootstrapBrand="primary"
app:bootstrapSize="lg"
app:buttonMode="regular"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInPut"
app:roundedCorners="true"
app:showOutline="false" />
<com.beardedhen.androidbootstrap.BootstrapButton
android:id="@+id/btnUploadAudio"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:text="UPLOAD AUDIO"
app:bootstrapBrand="warning"
app:bootstrapSize="lg"
app:buttonMode="regular"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnUploadVideo"
app:roundedCorners="true"
app:showOutline="false" />