Android - Scrollvew multiples layouts

 
Vista:

Scrollvew multiples layouts

Publicado por Vialpe (1 intervención) el 01/09/2017 02:10:09
Hola, no puedo hacer scroll en mi app


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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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"
    android:background="@color/colorAccent"
    android:paddingLeft="16dp"
    android:paddingRight="16dp"
    android:fillViewport="true"
    tools:context="com.altafulla.lostdocument.login">
 
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:orientation="vertical">
 
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
 
            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:background="@android:color/white"
                android:padding="1dp"
                android:src="@android:drawable/sym_action_email"
                android:tint="@color/colorPrimaryDark" />
 
            <EditText
                android:id="@+id/txtemaill"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@android:color/white"
                android:hint="Email"
                android:inputType="textEmailAddress"
                android:textSize="25sp" />
    </LinearLayout>
 
 
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:orientation="horizontal">
 
            <ImageView
                android:layout_width="30dp"
                android:layout_height="match_parent"
                android:background="@android:color/white"
                android:src="@mipmap/pass"
                android:tint="@color/colorPrimaryDark" />
 
            <EditText
                android:id="@+id/txtpass"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:background="@android:color/white"
                android:hint="Contraseña"
                android:inputType="textPassword"
                android:textSize="25sp" />
    </LinearLayout>
 
 
 
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:orientation="horizontal">
 
            <ImageView
                android:layout_width="30dp"
                android:layout_height="match_parent"
                android:background="@android:color/white"
                android:src="@mipmap/pass"
                android:tint="@color/colorPrimaryDark" />
 
            <EditText
                android:id="@+id/txtrpass"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:background="@android:color/white"
                android:hint="Repetir Contraseña"
                android:inputType="textPassword"
                android:textSize="25sp" />
 
             </LinearLayout>
 
 
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
 
        <Button
            android:id="@+id/btnreg"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:background="@drawable/boton"
            android:text="registrar"
            android:textColor="@android:color/white" />
 
        <TextView
            android:id="@+id/txttuc"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:gravity="center"
            android:text="Ya estoy regstrado"
            android:textColor="@android:color/white"
            android:textSize="20sp" />
            </LinearLayout>
 
 
    </LinearLayout>
</ScrollView>
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
Imágen de perfil de francisco
Val: 466
Oro
Ha mantenido su posición en Android (en relación al último mes)
Gráfica de Android

Scrollvew multiples layouts

Publicado por francisco (358 intervenciones) el 01/09/2017 18:19:00
Parece que lo tienes todo bien.
El scroll se muestra cuando no caven mas view en el layout..
Prueba a poner un edit text con multilinea hasta que se llene toda la pantalla
comprobaras que el scroll ,ya hace su efecto.
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
sin imagen de perfil

Scrollvew multiples layouts

Publicado por Carlos Ismael (38 intervenciones) el 01/09/2017 21:15:09
Buen día, prueba meter el ScrollView dentro de Otro Layout es decir
<Layout
< ScrollView
.............................................
....................
Asi los uso regularmente y no me causa problema. Saludos.
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
Imágen de perfil de francisco
Val: 466
Oro
Ha mantenido su posición en Android (en relación al último mes)
Gráfica de Android

Scrollvew multiples layouts

Publicado por francisco (358 intervenciones) el 01/09/2017 21:26:03
Para que quieres poner un scroll ahi ,si se ven todos los elementos.

Yo lo he probado y funciona.

puedes hacer una prueba ,pon untextview en multilinea y clika saltos de linea hasta que el scroll se active

Pero como te digo para esa pantalla ,no necesitas un scroll.a no se que pongas mas elementos,y sobrepase el tamaño de la pantallla.

saludos
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