Made a task list view style for all task lists, got rid of the Gesture stuff in the standard task list, and trying turning on smooth scrollbar

pull/14/head
Tim Su 14 years ago
parent fc0989fcfa
commit 2df80fc483

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="100">
<!-- No Tasks label -->
<TextView android:id="@android:id/empty"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:visibility="gone"
android:text="@string/TLA_no_items"
style="@style/TextAppearance.TLA_NoItems"/>
<!-- Task List -->
<ListView android:id="@android:id/list"
android:scrollbars="vertical"
android:cacheColorHint="#00000000"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:smoothScrollbar="false"/>
</FrameLayout>

@ -1,15 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- See the file "LICENSE" for the full license governing this code. --> <!-- See the file "LICENSE" for the full license governing this code. -->
<android.gesture.GestureOverlayView xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gestures"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_weight="100" android:layout_weight="100">
android:gestureColor="#00000000"
android:uncertainGestureColor="#00000000"
android:eventsInterceptionEnabled="true"
android:orientation="vertical">
<!-- No Tasks label --> <!-- No Tasks label -->
<TextView android:id="@android:id/empty" <TextView android:id="@android:id/empty"
@ -24,12 +18,10 @@
style="@style/TextAppearance.TLA_NoItems"/> style="@style/TextAppearance.TLA_NoItems"/>
<!-- Task List --> <!-- Task List -->
<ListView android:id="@android:id/list" <ListView android:id="@android:id/list"
android:scrollbars="vertical"
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"/> style="@style/ListView" />
</android.gesture.GestureOverlayView> </FrameLayout>

@ -17,16 +17,13 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tlv="http://schemas.android.com/apk/res/com.timsu.astrid" xmlns:tlv="http://schemas.android.com/apk/res/com.timsu.astrid"
android:id="@android:id/list" android:id="@android:id/list"
android:scrollbars="vertical"
android:cacheColorHint="#00000000"
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" style="@style/ListView"
tlv:normal_height="45dip" tlv:normal_height="45dip"
tlv:expanded_height="90dip"
/> />
</FrameLayout> </FrameLayout>

@ -240,6 +240,14 @@
<item name="android:textSize">16sp</item> <item name="android:textSize">16sp</item>
<item name="android:textColor">#000000</item> <item name="android:textColor">#000000</item>
</style> </style>
<style name="ListView">
<item name="android:divider">?attr/asSeparatorBackground</item>
<item name="android:dividerHeight">1px</item>
<item name="android:scrollbars">vertical</item>
<item name="android:cacheColorHint">#00000000</item>
<item name="android:smoothScrollbar">true</item>
</style>
<!-- =============================================== TaskEditActivity == --> <!-- =============================================== TaskEditActivity == -->

@ -227,12 +227,8 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
* android:id/list. It should NOT be attached to root * android:id/list. It should NOT be attached to root
*/ */
protected View getListBody(ViewGroup root) { protected View getListBody(ViewGroup root) {
if (AndroidUtilities.getSdkVersion() > 3) return getActivity().getLayoutInflater().inflate(
return getActivity().getLayoutInflater().inflate( R.layout.task_list_body_standard, root, false);
R.layout.task_list_body_standard, root, false);
else
return getActivity().getLayoutInflater().inflate(
R.layout.task_list_body_api3, root, false);
} }
/** Called when loading up the activity */ /** Called when loading up the activity */

Loading…
Cancel
Save