Problem installing TextViews in Android Studio

0

I'm creating a project in Android Studio, the preview was not what I expected and I wonder where I went wrong.

Here is the XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


 <TextView
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:text="Calculadora"/>


   <TextView
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:text="Digite o Primeiro Numero"/>


    <EditText
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android.id="@+calculo/numero1"/>

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Digite o Segundo Numero"/>

    <EditText
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android.id="@+calculo/numero2"/>

<Button
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android.id="@+botao/btsoma"
    android:text="somar"/>



    <EditText
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android.id="@+calculo/resultado"/>


</LinearLayout>

The preview was supposed to look like this:

Buttheresultisthatonlythenameofthecalculatorappeared.

    
asked by anonymous 11.06.2014 / 17:59

1 answer

1

When the orientation is not specified, the default is horizontal and in this case it must be vertical .

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
...
    
07.08.2014 / 11:24