mirror of https://github.com/tasks/tasks
Initial subtasks thing
parent
6a6d237a68
commit
a5c33f3045
@ -0,0 +1,31 @@
|
|||||||
|
<?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"/>
|
||||||
|
|
||||||
|
<com.commonsware.cwac.tlv.TouchListView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tlv="http://schemas.android.com/apk/res/com.timsu.astrid"
|
||||||
|
|
||||||
|
android:id="@android:id/list"
|
||||||
|
android:scrollbars="vertical"
|
||||||
|
android:cacheColorHint="#00000000"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:drawSelectorOnTop="false"
|
||||||
|
android:smoothScrollbar="false"
|
||||||
|
|
||||||
|
tlv:normal_height="45dip"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.todoroo.astrid.activity;
|
||||||
|
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.View.OnTouchListener;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.commonsware.cwac.tlv.TouchListView;
|
||||||
|
import com.timsu.astrid.R;
|
||||||
|
|
||||||
|
public class SubtasksListFragment extends TaskListFragment {
|
||||||
|
|
||||||
|
public TouchListView getTouchListView() {
|
||||||
|
TouchListView tlv = (TouchListView) getListView();
|
||||||
|
return tlv;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected View getListBody(ViewGroup root) {
|
||||||
|
return getActivity().getLayoutInflater().inflate(R.layout.task_list_body_subtasks, root, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setUpUiComponents() {
|
||||||
|
super.setUpUiComponents();
|
||||||
|
|
||||||
|
getTouchListView().setOnTouchListener(new OnTouchListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue