mardi 14 juin 2016

Why are parts of the UI missing in-app while they exist in the Android Studio Layout Preview? [on hold]

When programming an app in Android Studio, the Layout Editor works completely fine and looks normal in the Layout Editor Preview. However, when I run the app on my LG G3, parts of the UI I created are missing. This is what the app looks like(screenshot from LG G3), but this is what it is supposed to look like(screenshot from Android Studio). The app is supposed to look like the screenshot from Android Studio, but for some reason it does not. What is the reason this is being cause?

The following is the layout xml file.

<android.support.design.widget.TextInputLayout
    android:id="@+id/textContainer"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentStart="true"
    android:layout_alignParentEnd="true"
    android:layout_above="@+id/numContainer"
    android:layout_below="@+id/phoneNumContainer">
    <EditText
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:inputType="textMultiLine"
        android:ems="10"
        android:id="@+id/text"
        android:layout_alignParentStart="true"
        android:hint="Enter Text Message"
        android:layout_above="@+id/num"
        android:layout_alignParentEnd="true"
        android:gravity="top"
        android:layout_below="@+id/input_layout_password" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
    android:id="@+id/numContainer"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/sendButton"
    android:layout_alignParentStart="true"
    android:layout_alignParentEnd="false">
    <EditText
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:inputType="numberSigned"
        android:ems="10"
        android:id="@+id/num"
        android:layout_centerVertical="true"
        android:layout_alignParentStart="true"
        android:hint="Number of Messages" />
</android.support.design.widget.TextInputLayout>

<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Send"
    android:id="@+id/sendButton"
    android:onClick="spamSMS"
    android:layout_above="@+id/stopButton"
    android:layout_alignParentStart="true"
    android:layout_alignEnd="@+id/stopButton" />

<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Stop"
    android:id="@+id/stopButton"
    android:visibility="visible"
    android:layout_alignBottom="@+id/progressBar"
    android:layout_alignParentStart="true" />
<android.support.design.widget.TextInputLayout
    android:id="@+id/intervalContainer"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_below="@+id/textContainer"
    android:layout_toEndOf="@+id/numContainer">
    <EditText
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:inputType="numberSigned"
        android:ems="10"
        android:id="@+id/interval"
        android:layout_centerVertical="true"
        android:layout_alignParentEnd="true"
        android:layout_toEndOf="@+id/numContainer"
        android:hint="Interval" />
</android.support.design.widget.TextInputLayout>

<QuickContactBadge
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/quickContactBadge"
    android:layout_alignParentTop="true"
    android:layout_alignParentStart="true"
    android:layout_alignParentEnd="true"
    android:layout_above="@+id/phoneNumContainer" />

<Button
    style="?android:attr/buttonStyleSmall"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="+"
    android:id="@+id/contactButton"
    android:layout_above="@+id/textContainer"
    android:layout_alignParentEnd="true"
    android:onClick="callContactPicker" />

<ProgressBar
    style="?android:attr/progressBarStyleHorizontal"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/progressBar"
    android:layout_alignEnd="@+id/textContainer"
    android:layout_toEndOf="@+id/sendButton"
    android:layout_alignParentBottom="true"
    android:layout_alignParentStart="true" />

Aucun commentaire:

Enregistrer un commentaire