Removed unused TODOs and warnings in fragments-package

This commit is contained in:
Caesar2011
2018-07-14 00:23:28 +02:00
parent f84cc4e0f6
commit 99d44d4e63
13 changed files with 6 additions and 74 deletions

View File

@@ -14,14 +14,13 @@ import de.sebse.fuplanner.tools.ui.ItemViewHolder;
/**
* {@link RecyclerView.Adapter} that can display a {@link Modules.Module} and makes a call to the
* specified {@link OnModulesFragmentInteractionListener}.
* TODO: Replace the implementation with code for your data type.
*/
public class ModulesAdapter extends RecyclerView.Adapter<ItemViewHolder> {
private Modules mValues;
private final OnModulesFragmentInteractionListener mListener;
public ModulesAdapter(OnModulesFragmentInteractionListener listener) {
ModulesAdapter(OnModulesFragmentInteractionListener listener) {
mValues = null;
mListener = listener;
}

View File

@@ -24,10 +24,6 @@ import de.sebse.fuplanner.tools.logging.Logger;
* interface.
*/
public class ModulesFragment extends Fragment {
// TODO: Customize parameter argument names
//private static final String ARG_COLUMN_COUNT = "column-count";
// TODO: Customize parameters
private OnModulesFragmentInteractionListener mListener;
private Logger log = new Logger(this);
private ModulesAdapter adapter;
@@ -40,8 +36,6 @@ public class ModulesFragment extends Fragment {
public ModulesFragment() {
}
// TODO: Customize parameter initialization
@SuppressWarnings("unused")
public static ModulesFragment newInstance() {
ModulesFragment fragment = new ModulesFragment();
Bundle args = new Bundle();
@@ -107,18 +101,7 @@ public class ModulesFragment extends Fragment {
mListener = null;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p/>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnModulesFragmentInteractionListener {
// TODO: Update argument type and name
void onModulesFragmentInteraction(int item);
}
}

View File

@@ -26,14 +26,11 @@ import de.sebse.fuplanner.tools.ui.weekview.WeekViewEvent;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link ScheduleFragment.OnFragmentInteractionListener} interface
* {@link ScheduleFragment.OnScheduleFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link ScheduleFragment#newInstance} factory method to
* create an instance of this fragment.
*
* TODO Reduce day range to 6-20h as in https://stackoverflow.com/questions/35944431/filter-specific-range-of-hours-to-show-in-alamkanak-android-week-view
*
* TODO Scroll week wise (snap)
*/
public class ScheduleFragment extends Fragment implements MonthLoader.MonthChangeListener, WeekView.ScrollListener {
private OnScheduleFragmentInteractionListener mListener;
@@ -76,7 +73,6 @@ public class ScheduleFragment extends Fragment implements MonthLoader.MonthChang
mWeekView.notifyDatasetChanged();
}
}
}, error1 -> log.e(error1));
}
}, error -> log.e(error));
@@ -146,18 +142,7 @@ public class ScheduleFragment extends Fragment implements MonthLoader.MonthChang
mListener.onScheduleFragmentInteraction(newFirstVisibleDay, newLastVisibleDay);
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnScheduleFragmentInteractionListener {
// TODO: Update argument type and name
void onScheduleFragmentInteraction(Calendar firstVisibleDate, Calendar lastVisibleDay);
}
}

View File

@@ -6,14 +6,12 @@ import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import de.sebse.fuplanner.R;
import de.sebse.fuplanner.tools.logging.Logger;
class ModDetailAdapter extends FragmentStatePagerAdapter {
private final int mItemPos;
private final Context mContext;
private Logger log = new Logger(this);
public ModDetailAdapter(FragmentManager fm, int itemPosition, Context context) {
ModDetailAdapter(FragmentManager fm, int itemPosition, Context context) {
super(fm);
this.mContext = context;
this.mItemPos = itemPosition;

View File

@@ -1,7 +1,6 @@
package de.sebse.fuplanner.fragments.moddetails;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
@@ -23,11 +22,8 @@ import de.sebse.fuplanner.tools.logging.Logger;
* create an instance of this fragment.
*/
public class ModDetailAnnounceFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_POSITION = "itemPosition";
// TODO: Rename and change types of parameters
private int mItemPos;
private Logger log = new Logger(this);
private ModDetailAnnounceAdapter adapter;
@@ -45,7 +41,6 @@ public class ModDetailAnnounceFragment extends Fragment {
* @param itemPosition Item position in module list.
* @return A new instance of fragment ModDetailAnnounceFragment.
*/
// TODO: Rename and change types and number of parameters
public static ModDetailAnnounceFragment newInstance(int itemPosition) {
ModDetailAnnounceFragment fragment = new ModDetailAnnounceFragment();
Bundle args = new Bundle();
@@ -68,9 +63,7 @@ public class ModDetailAnnounceFragment extends Fragment {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_expandable_list_view, container, false);
// Set the adapter
Context context = view.getContext();
ExpandableListView expandableListView = view.findViewById(R.id.list);
//expandableListView.setLayoutManager(new LinearLayoutManager(context));
adapter = new ModDetailAnnounceAdapter();
expandableListView.setAdapter(adapter);

View File

@@ -1,7 +1,6 @@
package de.sebse.fuplanner.fragments.moddetails;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
@@ -23,11 +22,8 @@ import de.sebse.fuplanner.tools.logging.Logger;
* create an instance of this fragment.
*/
public class ModDetailAssignmentFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_POSITION = "itemPosition";
// TODO: Rename and change types of parameters
private int mItemPos;
private Logger log = new Logger(this);
private ModDetailAssignmentAdapter adapter;
@@ -45,7 +41,6 @@ public class ModDetailAssignmentFragment extends Fragment {
* @param itemPosition Item position in module list.
* @return A new instance of fragment ModDetailAnnounceFragment.
*/
// TODO: Rename and change types and number of parameters
public static ModDetailAssignmentFragment newInstance(int itemPosition) {
ModDetailAssignmentFragment fragment = new ModDetailAssignmentFragment();
Bundle args = new Bundle();
@@ -68,9 +63,7 @@ public class ModDetailAssignmentFragment extends Fragment {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_expandable_list_view, container, false);
// Set the adapter
Context context = view.getContext();
ExpandableListView expandableListView = view.findViewById(R.id.list);
//expandableListView.setLayoutManager(new LinearLayoutManager(context));
adapter = new ModDetailAssignmentAdapter();
expandableListView.setAdapter(adapter);

View File

@@ -31,10 +31,8 @@ public class ModDetailEventAdapter extends RecyclerView.Adapter<RecyclerView.Vie
private Modules.Module mValue;
private final ArrayList<Pair<Integer, Integer>> mPositionalData;
private Logger log = new Logger(this);
//private final ModulesFragment.OnModulesFragmentInteractionListener mListener;
public ModDetailEventAdapter(/*ModulesFragment.OnModulesFragmentInteractionListener listener*/) {
ModDetailEventAdapter() {
mValue = null;
mPositionalData = new ArrayList<>();
//mListener = listener;

View File

@@ -24,11 +24,8 @@ import de.sebse.fuplanner.tools.logging.Logger;
* create an instance of this fragment.
*/
public class ModDetailEventFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_POSITION = "itemPosition";
// TODO: Rename and change types of parameters
private int mItemPos;
private Logger log = new Logger(this);
private ModDetailEventAdapter adapter;
@@ -46,7 +43,6 @@ public class ModDetailEventFragment extends Fragment {
* @param itemPosition Item position in module list.
* @return A new instance of fragment ModDetailAnnounceFragment.
*/
// TODO: Rename and change types and number of parameters
public static ModDetailEventFragment newInstance(int itemPosition) {
ModDetailEventFragment fragment = new ModDetailEventFragment();
Bundle args = new Bundle();

View File

@@ -21,8 +21,6 @@ import de.sebse.fuplanner.R;
* create an instance of this fragment.
*/
public class ModDetailFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_POSITION = "itemPosition";
// Parameters

View File

@@ -25,10 +25,8 @@ public class ModDetailGradebookAdapter extends RecyclerView.Adapter<RecyclerView
private Modules.Module mValue;
private final ArrayList<Pair<Integer, Integer>> mPositionalData;
private Logger log = new Logger(this);
//private final ModulesFragment.OnModulesFragmentInteractionListener mListener;
public ModDetailGradebookAdapter(/*ModulesFragment.OnModulesFragmentInteractionListener listener*/) {
ModDetailGradebookAdapter() {
mValue = null;
mPositionalData = new ArrayList<>();
//mListener = listener;

View File

@@ -24,11 +24,8 @@ import de.sebse.fuplanner.tools.logging.Logger;
* create an instance of this fragment.
*/
public class ModDetailGradebookFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_POSITION = "itemPosition";
// TODO: Rename and change types of parameters
private int mItemPos;
private Logger log = new Logger(this);
private ModDetailGradebookAdapter adapter;
@@ -46,7 +43,6 @@ public class ModDetailGradebookFragment extends Fragment {
* @param itemPosition Item position in module list.
* @return A new instance of fragment ModDetailAnnounceFragment.
*/
// TODO: Rename and change types and number of parameters
public static ModDetailGradebookFragment newInstance(int itemPosition) {
ModDetailGradebookFragment fragment = new ModDetailGradebookFragment();
Bundle args = new Bundle();

View File

@@ -38,9 +38,8 @@ public class ModDetailOverviewAdapter extends RecyclerView.Adapter<RecyclerView.
private Modules.Module mValue;
private final ArrayList<Pair<Integer, Object>> mPositionalData;
private Logger log = new Logger(this);
//private final ModulesFragment.OnModulesFragmentInteractionListener mListener;
public ModDetailOverviewAdapter(/*ModulesFragment.OnModulesFragmentInteractionListener listener*/) {
ModDetailOverviewAdapter() {
mValue = null;
mPositionalData = new ArrayList<>();
//mListener = listener;

View File

@@ -24,11 +24,8 @@ import de.sebse.fuplanner.tools.logging.Logger;
* create an instance of this fragment.
*/
public class ModDetailOverviewFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_POSITION = "itemPosition";
// TODO: Rename and change types of parameters
private int mItemPos;
private Logger log = new Logger(this);
private ModDetailOverviewAdapter adapter;
@@ -46,7 +43,6 @@ public class ModDetailOverviewFragment extends Fragment {
* @param itemPosition Item position in module list.
* @return A new instance of fragment ModDetailOverviewFragment.
*/
// TODO: Rename and change types and number of parameters
public static ModDetailOverviewFragment newInstance(int itemPosition) {
ModDetailOverviewFragment fragment = new ModDetailOverviewFragment();
Bundle args = new Bundle();