Hi! I´m just trying to have both vertical and horizontal scrollviews but the vertical one disappears just 1 second after the app launch and I cant scroll down on my results.
Here are the codes: XML: <?xml version="1.0" encoding="utf-8"?> <ScrollView android:id="@+id/ScrollView" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scrollbars="vertical" > <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/ res/android" android:id="@+id/HorizontalScrollView" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TableLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:id="@+id/DisplayResults" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TableRow > <TextView android:layout_column="1" android:text="Title" android:padding="3dip" /> <TextView android:layout_column="2" android:text="Author" android:padding="3dip"/> <TextView android:layout_column="3" android:text="File" android:padding="3dip"/> <TextView android:layout_column="4" android:text="ModDate" android:padding="3dip"/> <TextView android:layout_column="5" android:text="Size" android:padding="3dip"/> </TableRow> </TableLayout> </HorizontalScrollView> </ScrollView> JAVA: package citic.android.remoteir; import java.util.ArrayList; import java.util.Iterator; import android.app.Activity; import android.os.Bundle; import android.widget.TableRow.LayoutParams; import android.widget.Button; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TableLayout; import android.view.View; import android.view.ViewGroup; import android.widget.TableRow; import android.widget.TextView; import android.app.Activity; public class DisplayResult extends Activity{ private boolean mShrink; @SuppressWarnings("unchecked") protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.displayresults); Bundle extras = getIntent().getExtras(); final TableLayout tl = (TableLayout)findViewById (R.id.DisplayResults); //ArrayList finalResults; if(extras!=null){ appendRow(tl, extras); } } private void appendRow(TableLayout table, Bundle extras) { ArrayList finalResults; finalResults = (ArrayList) (extras.getSerializable (RemoteIR.RESULTS)); Iterator it = finalResults.iterator(); while(it.hasNext()) { SearchResult result = ((SearchResult) it.next()); TableRow tr = new TableRow(this); tr.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); TextView title = new TextView(this); title.setText(result.title); title.setPadding(3, 3, 3, 3); TextView author = new TextView(this); author.setText(result.author.toString()); author.setPadding(3, 3, 3, 3); TextView file = new TextView(this); file.setText(result.file.toString()); TextView modDate = new TextView(this); modDate.setText(result.modDate); TextView size = new TextView(this); size.setText(result.size.toString()); tr.addView(title, new TableRow.LayoutParams(1)); tr.addView(author, new TableRow.LayoutParams()); tr.addView(file, new TableRow.LayoutParams()); tr.addView(modDate, new TableRow.LayoutParams()); tr.addView(size, new TableRow.LayoutParams()); table.addView(tr,new TableLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); } } Thank you! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en