¿Cómo puedo aumentar el tamaño de la vista de mi lista?

Aquí está el código xml que usé

Pero no uso incluso si intenta aumentar el minheight ….

por favor ayuda

texto alternativo

<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <!-- Here you put the rest of your current view--> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:text="ID:" android:textSize="15dp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/cid" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="Name:" android:textSize="15dp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/con" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="Posted By:" android:textSize="15dp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/poby" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="Posted Time:" android:textSize="15dp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/poti" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="Annotation ID:" android:textSize="15dp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/aid" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="Comment:" android:textSize="15dp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/comm" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="Image-path:" android:textSize="15dp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:id="@+id/imgpath" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <TextView android:text="Solutions:" android:textSize="15dp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <ListView android:id="@+id/listviewid" android:layout_marginBottom="10dp" android:paddingBottom="10dp" android:minHeight="1000dp" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </LinearLayout> </ScrollView> 

El código java relacionado con él es:

 if(s8.length()!=0){ String[] sidarray = s8.split("@"); String[] replyarray = s9.split("@"); String[] replybyarray = s10.split("@"); for(int p=0;p<sidarray.length;p++) { if(solutionsList!=null){ solutionsList.add("\nSolutionsID:" + sidarray[p] ); solutionsList.add("\nReply:" + replyarray[p]); solutionsList.add("\nReply-by:" + replybyarray[p]); }} solutionlist=(ListView)findViewById(R.id.listviewid); solutionadapter = new ArrayAdapter<String>(this, R.layout.solutiondisplay, solutionsList); solutionlist.setAdapter(solutionadapter); } 

Aquí está mi código fuente ……………..

Me parece que simplemente no tienes suficiente espacio. La razón está en el hecho de que seleccionó algún diseño que está vinculado a los límites de la pantalla (LinearLayout, RelativeLayout …). Tienes muchas cosas en una pantalla. Para evitar este problema, utilice ScrollView como raíz, luego LinearLayout y, a continuación, puede poner un montón de elementos de diseño en este LinearLayout (span varias pantallas de longitud).

¿Ha intentado eliminar estas líneas ?:

 android:layout_marginBottom="10dp" android:paddingBottom="10dp" 

Sería de ayuda si usted incluyó todo su xml de la disposición.

¿Ha intentado configurar el peso de Layout = 1?

Tienes que configurar la altura del scrollview para wrap_content

No estoy seguro de incluir un ListView dentro de ScrollView es una buena idea.

Es mejor utilizar la característica de vista de cabecera de ListView para integrar todos sus datos de "Problemas" en vistas fijas en la parte superior del conjunto de soluciones.

Cuando ListView se usa dentro de scrollview en rutime, el listview colapsa para mostrar sólo un elemento. Por lo tanto, debe ajustar la altura de listview en su código java. Use la propiedad LayoutParams para establecer altura y ancho para listview.

Creo que le gustaría echar un vistazo a esto. ListView in ScrollView potencial solución He resuelto el problema con esto!

  • Error al agregar nuevos datos a ListView con ArrayAdapter
  • Lista de Android Ver Arrastrar y soltar ordenar
  • Cómo establecer el foco en el último elemento en una vista de lista en android
  • SetEmptyView en ListView no mostrar su vista en una aplicación para Android
  • Añadir y eliminar un encabezado de esta listaVer
  • Elemento de lista con CheckBox no se puede hacer clic
  • El ListView de fondo se vuelve negro al desplazarse
  • Capturando el evento TextChanged dentro de un ListView en Android
  • ¿Cómo puedo configurar un ListView personalizado con un divisor mediante Android?
  • OpenGLRenderer, se encontró el glifo no válido
  • La vista de texto no se desplaza dentro de la lista personalizada
  • FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.