mirror of
https://github.com/wismna/DoNext.git
synced 2025-10-03 15:40:14 -04:00
Updated some TODOs with info on probable error causes
Changed visibility from Invisible to Gone on task lists
This commit is contained in:
@@ -101,7 +101,7 @@ public class MainFragment extends Fragment implements TasksFragment.TaskChangedA
|
||||
|
||||
tabLayout = mView.findViewById(R.id.tabs);
|
||||
// Hide the tabs if there is only one task list
|
||||
if (taskLists.size() == 1) tabLayout.setVisibility(View.INVISIBLE);
|
||||
if (taskLists.size() == 1) tabLayout.setVisibility(View.GONE);
|
||||
tabLayout.setupWithViewPager(mViewPager);
|
||||
|
||||
// Handles scroll detection (only available for SDK version >=23)
|
||||
@@ -119,7 +119,7 @@ public class MainFragment extends Fragment implements TasksFragment.TaskChangedA
|
||||
else {
|
||||
ListView listView = mView.findViewById(R.id.list);
|
||||
// Hide the list if there is only one task list
|
||||
if (taskLists.size() == 1) listView.setVisibility(View.INVISIBLE);
|
||||
if (taskLists.size() == 1) listView.setVisibility(View.GONE);
|
||||
//listView.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, taskLists));
|
||||
listView.setAdapter(new ArrayAdapter<>(activity, R.layout.list_tasklist_item, taskLists));
|
||||
//listView.setSelection(lastOpenedList);
|
||||
|
@@ -92,7 +92,7 @@ public class TasksFragment extends Fragment implements
|
||||
Activity parentActivity = getActivity();
|
||||
if (parentActivity instanceof HistoryActivity) isHistory = true;
|
||||
if (parentActivity instanceof TodayActivity) isTodayView = true;
|
||||
// TODO: check that this works!
|
||||
// TODO: this does not work! No tasks are shown
|
||||
mAdapter = (MainFragment)getParentFragment();
|
||||
}
|
||||
}
|
||||
@@ -118,6 +118,7 @@ public class TasksFragment extends Fragment implements
|
||||
}
|
||||
recyclerView.setAdapter(taskRecyclerViewAdapter);
|
||||
|
||||
// TODO: check that this works
|
||||
if (!isHistory) {
|
||||
// Set ItemTouch helper in RecyclerView to handle swipe move on elements
|
||||
ItemTouchHelper.Callback callback = new TaskTouchHelper(this,
|
||||
|
Reference in New Issue
Block a user