เอาไว้ scroll uitableview ไปข้างบน
[tableview scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES];
เวลา scroll แล้วช้า ก็อาจจะลองทำแบบนี้ โดยการใช้ UIScrollViewDelegate เมื่อเรา Scroll ลงไป แล้วหยุด ก็ให้ไปโหลดรูปมาใหม่
#pragma mark – #pragma mark Deferred image loading (UIScrollViewDelegate) // Load images for all onscreen rows when scrolling is finished – (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { if(!decelerate) { NSLog(@”scrollViewDidEndDragging “); [self loadImagesForOnscreenRows]; } } [...]
This is the method to re-calculate listview height to fix the problem.
public static void setListViewHeightBasedOnChildren(ListView listView) { ListAdapter listAdapter = listView.getAdapter(); if (listAdapter == null) { // pre-condition return; } int totalHeight = 0; int desiredWidth = MeasureSpec.makeMeasureSpec(listView.getWidth(), MeasureSpec.AT_MOST); for (int i = 0; i < listAdapter.getCount(); i++) { View listItem = [...]
rm -rf `find . -type d -name .svn`
I believe that Android is talking about the Java bytecode format, which you can set in “Window/Preferences”, “Java/Compiler/Compiler Compliance Level”.
<TableLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <TableRow> <Button android:id="@+id/backbutton" android:text="Back" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </TableRow> <TableRow> <TextView android:text="First Name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_column="1" /> <EditText android:width="100px" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </TableRow> <TableRow> <TextView android:text="Last Name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_column="1" /> <EditText android:width="100px" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </TableRow> </TableLayout>