Android - Problema Layout

 
Vista:
Imágen de perfil de Jose Jairo

Problema Layout

Publicado por Jose Jairo (2 intervenciones) el 03/03/2016 17:34:45
Hola Buen dia, ocupo de su ayuda.
El problema que tengo es que en la aplicación el layout no se queda fijo, cuando aparece el teclado se modifica el tamaño. y mueve todos los elementos.


Screenshot_2016-03-03-10-20-13

Screenshot_2016-03-03-10-20-03

tengo un RelativeLayout principal, en el cual tengo un mapa y otros RelativeLayout,

//layout principal
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
 
    <fragment xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
        android:layout_height="match_parent" android:id="@+id/map" tools:context=".MapsActivity"
        android:name="com.google.android.gms.maps.SupportMapFragment" />
 
 
    <include layout="@layout/layoutlogin" />
 
</RelativeLayout>

//layoutlogin
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:visibility="visible"
    android:id="@+id/LayoutLogin"
    android:background="@drawable/intro"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:clickable="true">
 
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="Taxi"
            android:id="@+id/TextViewU"
            android:background="#b4dcded2"
            android:layout_centerVertical="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true" />
 
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/IDTaxi"
            android:layout_below="@+id/TextViewU"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:background="#c8ffedb1"
            android:textSize="24dp"
            android:singleLine="true"
            android:lines="1" />
 
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="Contraseña"
            android:id="@+id/TextViewP"
            android:background="#b4dcded2"
            android:layout_below="@+id/IDTaxi"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true" />
 
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:inputType="textPassword"
            android:ems="10"
            android:id="@+id/Pass"
            android:layout_below="@+id/TextViewP"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:background="#c8ffedb1"
            android:textSize="24dp" />
 
        <Button
            android:layout_width="120dp"
            android:layout_height="70dp"
            android:id="@+id/bntIniciar"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="58dp"
            android:background="@drawable/iniciar"
            android:textSize="20sp"
            android:onClick="login" />
 
</RelativeLayout>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Problema Layout

Publicado por Brian Cid (16 intervenciones) el 27/05/2016 19:04:33
Bueno carnal en este tipo de problemas es muy comun por que yo tambien lo tengo al querer acomodar mis elementos en mi layout bueno lo que yo realizo para que esto no me pase es meter mis elementos en un <LinearLayout> </LinearLayout>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<LinearLayout
<TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="Taxi"
            android:id="@+id/TextViewU"
            android:background="#b4dcded2"
            android:layout_centerVertical="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true" />
 
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/IDTaxi"
            android:layout_below="@+id/TextViewU"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:background="#c8ffedb1"
            android:textSize="24dp"
            android:singleLine="true"
            android:lines="1" />
 
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="Contraseña"
            android:id="@+id/TextViewP"
            android:background="#b4dcded2"
            android:layout_below="@+id/IDTaxi"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true" />
 
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:inputType="textPassword"
            android:ems="10"
            android:id="@+id/Pass"
            android:layout_below="@+id/TextViewP"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:background="#c8ffedb1"
            android:textSize="24dp" />
 
        <Button
            android:layout_width="120dp"
            android:layout_height="70dp"
            android:id="@+id/bntIniciar"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="58dp"
            android:background="@drawable/iniciar"
            android:textSize="20sp"
            android:onClick="login" />
 
</LinearLayout>

por ejemplo a si usaria tu codigo usalo en cada elemento que pongas en tu layout.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar