mirror of https://github.com/tasks/tasks
More work on the featured lists view
parent
e4295194a5
commit
1cd9f08c28
@ -0,0 +1,28 @@
|
||||
package com.todoroo.astrid.tags.reusable;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.timsu.astrid.R;
|
||||
import com.todoroo.astrid.activity.AstridActivity;
|
||||
import com.todoroo.astrid.activity.TaskListActivity;
|
||||
import com.todoroo.astrid.activity.TaskListFragment;
|
||||
import com.todoroo.astrid.api.FilterListItem;
|
||||
|
||||
public class FeaturedListActivity extends AstridActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.featured_list_activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onFilterItemClicked(FilterListItem item) {
|
||||
Intent taskList = new Intent(this, TaskListActivity.class);
|
||||
taskList.putExtra(TaskListFragment.TOKEN_FILTER, item);
|
||||
startActivity(taskList);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.todoroo.astrid.tags.reusable;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.timsu.astrid.R;
|
||||
import com.todoroo.andlib.utility.AndroidUtilities;
|
||||
import com.todoroo.astrid.activity.FilterListFragment;
|
||||
import com.todoroo.astrid.adapter.FilterAdapter;
|
||||
|
||||
public class FeaturedListFragment extends FilterListFragment {
|
||||
|
||||
@Override
|
||||
protected FilterAdapter instantiateAdapter() {
|
||||
return new FeaturedListFilterAdapter(getActivity(), null, R.layout.filter_adapter_row, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayout(Activity activity) {
|
||||
if (AndroidUtilities.isTabletSized(activity))
|
||||
return R.layout.filter_list_fragment_alternative_3pane;
|
||||
else
|
||||
return R.layout.filter_list_fragment_alternative;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.todoroo.astrid.tags.reusable;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
public class ReusableListActivity extends Activity {
|
||||
|
||||
//
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
<fragment
|
||||
android:name="com.todoroo.astrid.tags.reusable.FeaturedListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:tag="filterlist_fragment">
|
||||
</fragment>
|
||||
</FrameLayout>
|
||||
Loading…
Reference in New Issue