Android - Cual es el mejor objetivo para hacer una grilla tipo excel

 
Vista:

Cual es el mejor objetivo para hacer una grilla tipo excel

Publicado por Ricardo Garcia (1 intervención) el 09/10/2014 00:57:46
Buenas a todosssss

Necesito su ayuda, tengo que utilizar un objeto similar a una grilla de excel para una app en android, es para hacer una cotizacion y que me salga con el formato
------------------------------------------------
| Nombre | Cantidad | Precio Total |
-----------------------------------------------
| Item 1 | 1 | 20 |
| Item 2 | 3 | 15 |
------------------------------------------------
Lei que puede funcionar un objeto llamado GridView, pero yo necesito interactuar constantemente con este objeto aumentando items y quitandolos, asi que nose cual me puede recomendar.

Un gran saludo y gracias.
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
sin imagen de perfil

Cual es el mejor objetivo para hacer una grilla tipo excel

Publicado por adrian (7 intervenciones) el 28/10/2014 09:19:31
Puedes utilizar tableLayout, te dejo un ejemplo...aunque tienen formato que no te paso ...pero el formato solo aplica estilo, margenes, colores, etc

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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<TableLayout
	    android:id="@+id/tableSalesHistory"
    	android:layout_width="fill_parent"
    	android:layout_height="wrap_content"
    	android:paddingLeft="@dimen/activity_horizontal_margin"
		android:paddingRight="@dimen/activity_horizontal_margin"
    	android:layout_marginTop="20dp">
 
		    <TableRow
		    android:id="@+id/tableTitle"
		    android:layout_width="match_parent"
		    android:layout_height="wrap_content"
		    android:background="@drawable/format_taula"
		    android:gravity="center_vertical|center_horizontal"
		    android:paddingTop="2.5dp"
		    android:paddingBottom="2.5dp"
		    android:layout_marginBottom="8dp" >
 
		    <TextView
		    android:id="@+id/rowTitle"
		    android:layout_width="match_parent"
		    android:layout_height="wrap_content"
		    android:text="@string/rowTitle"
		    android:textStyle="bold"
		    android:textColor="@color/white"
		    android:textSize="12sp" />
 
		</TableRow>
 
		    <TableRow
		    android:id="@+id/rowYears"
		    android:layout_width="match_parent"
		    android:layout_height="wrap_content"
		    android:paddingBottom="1.5dp"
		    android:paddingTop="1.5dp"
		    android:background="@drawable/formato_row_gris">
 
		        <TextView
			    android:id="@+id/rowTitleYear"
			    android:textStyle="bold"
			    android:paddingLeft="5dp"
			    android:paddingRight="5dp"
			    android:text="@string/rowTitleYear"
			    android:textColor="@color/blue_ios7"
			    android:layout_weight="1"
			    android:textSize="10sp" />
 
		        <TextView
			    android:id="@+id/rowFirstYear"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:textStyle="bold"
			    android:textSize="10sp" />
 
		        <TextView
			    android:id="@+id/rowSecondYear"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:textStyle="bold"
			    android:textSize="10sp" />
 
		    </TableRow>
 
		    <TableRow
		    android:id="@+id/rowCal"
		    android:layout_width="match_parent"
		    android:layout_height="wrap_content"
		    android:paddingBottom="1.5dp"
		    android:paddingTop="1.5dp" >
 
		        <TextView
			    android:id="@+id/rowTitleCal"
			    android:paddingLeft="5dp"
			    android:paddingRight="5dp"
			    android:layout_weight="1"
			    android:textSize="10sp"
			    android:textStyle="bold"
			    android:text="@string/rowTitleCal" />
 
		        <TextView
			    android:id="@+id/rowFirstYearCal"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:text="0"
			    android:textSize="10sp" />
 
		        <TextView
			    android:id="@+id/rowSecondYearCal"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:text="0"
			    android:textSize="10sp" />
 
		    </TableRow>
 
		    <TableRow
		    android:id="@+id/rowSis"
		    android:layout_width="match_parent"
		    android:layout_height="wrap_content"
		    android:paddingBottom="1.5dp"
		    android:paddingTop="1.5dp"
		    android:background="@drawable/formato_row_gris">
 
		        <TextView
			    android:id="@+id/rowTitleSis"
			    android:layout_weight="1"
			    android:paddingLeft="5dp"
			    android:paddingRight="5dp"
			    android:textStyle="bold"
			    android:textSize="10sp"
			    android:text="@string/rowTitleSis" />
 
		        <TextView
			    android:id="@+id/rowFirstYearSis"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:text="0"
			    android:textSize="10sp" />
 
		        <TextView
			    android:id="@+id/rowSecondYearSis"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:text="0"
			    android:textSize="10sp" />
 
		    </TableRow>
 
		    <TableRow
		    android:id="@+id/rowPro"
		    android:layout_width="match_parent"
		    android:layout_height="wrap_content"
		    android:paddingBottom="1.5dp"
		    android:paddingTop="1.5dp" >
 
		        <TextView
			    android:id="@+id/rowTitlePro"
			    android:paddingLeft="5dp"
			    android:paddingRight="5dp"
			    android:textStyle="bold"
			    android:layout_weight="1"
			    android:textSize="10sp"
			    android:text="@string/rowTitlePro"/>
 
		        <TextView
			    android:id="@+id/rowFirstYearPro"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:text="0"
			    android:textSize="10sp" />
 
		        <TextView
			    android:id="@+id/rowSecondYearPro"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:text="0"
			    android:textSize="10sp" />
 
		    </TableRow>
 
		    <TableRow
		    android:id="@+id/rowVal"
		    android:layout_width="match_parent"
		    android:layout_height="wrap_content"
		    android:paddingBottom="1.5dp"
		    android:paddingTop="1.5dp"
		    android:background="@drawable/formato_row_gris">
 
		        <TextView
			    android:id="@+id/rowTitleVal"
			    android:paddingLeft="5dp"
			    android:paddingRight="5dp"
			    android:textStyle="bold"
			    android:layout_weight="1"
			    android:textSize="10sp"
			    android:text="@string/rowTitleVal"/>
 
		        <TextView
			    android:id="@+id/rowFirstYearVal"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:text="0"
			    android:textSize="10sp" />
 
		        <TextView
			    android:id="@+id/rowSecondYearVal"
			    android:layout_weight="1"
			    android:gravity="center"
			    android:text="0"
			    android:textSize="10sp" />
 
		    </TableRow>
 
	</TableLayout>
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