Improved some scrolling performance issues

pull/14/head
Sam Bosley 13 years ago
parent 90dde46082
commit ebf290e6a5

@ -18,6 +18,7 @@
android:scrollbars="vertical" android:scrollbars="vertical"
android:cacheColorHint="#00000000" android:cacheColorHint="#00000000"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"/> android:layout_height="fill_parent"
android:smoothScrollbar="false"/>
</FrameLayout> </FrameLayout>

@ -23,6 +23,7 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:drawSelectorOnTop="false" android:drawSelectorOnTop="false"
android:smoothScrollbar="false"
tlv:normal_height="52dip" tlv:normal_height="52dip"
tlv:grabber="@+id/grabber" tlv:grabber="@+id/grabber"

@ -24,6 +24,7 @@
android:scrollbars="vertical" android:scrollbars="vertical"
android:cacheColorHint="#00000000" android:cacheColorHint="#00000000"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"/> android:layout_height="fill_parent"
android:smoothScrollbar="false"/>
</android.gesture.GestureOverlayView> </android.gesture.GestureOverlayView>

@ -270,6 +270,12 @@ public class TaskListActivity extends ListActivity implements OnScrollListener,
break; break;
} }
} }
runOnUiThread(new Runnable() {
public void run() {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
}
});
} }
@Override @Override

@ -205,6 +205,7 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
scaleAnimation = new ScaleAnimation(1.6f, 1.0f, 1.6f, 1.0f, scaleAnimation = new ScaleAnimation(1.6f, 1.0f, 1.6f, 1.0f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
scaleAnimation.setDuration(100); scaleAnimation.setDuration(100);
} }
/* ====================================================================== /* ======================================================================
@ -393,9 +394,13 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
viewHolder.details2.setVisibility(View.GONE); viewHolder.details2.setVisibility(View.GONE);
} else { } else {
viewHolder.details1.setVisibility(View.VISIBLE); viewHolder.details1.setVisibility(View.VISIBLE);
while(details.startsWith(DETAIL_SEPARATOR)) if (details.startsWith(DETAIL_SEPARATOR)) {
details = details.substring(DETAIL_SEPARATOR.length()); StringBuffer buffer = new StringBuffer(details);
int length = DETAIL_SEPARATOR.length();
while(buffer.lastIndexOf(DETAIL_SEPARATOR, length) == 0)
buffer.delete(0, length);
details = buffer.toString(); //details.substring(DETAIL_SEPARATOR.length());
}
drawDetails(viewHolder, details, dueDateTextWidth); drawDetails(viewHolder, details, dueDateTextWidth);
} }
} }
@ -403,7 +408,7 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
if(Math.abs(DateUtilities.now() - task.getValue(Task.MODIFICATION_DATE)) < 2000L) if(Math.abs(DateUtilities.now() - task.getValue(Task.MODIFICATION_DATE)) < 2000L)
mostRecentlyMade = task.getId(); mostRecentlyMade = task.getId();
// details and decorations, expanded // // details and decorations, expanded
decorationManager.request(viewHolder); decorationManager.request(viewHolder);
} }

Loading…
Cancel
Save