Permalink
Browse files

moved constants to application

  • Loading branch information...
avalax committed Jan 12, 2018
1 parent c334149 commit 6b1f393987dd18332d686c36e62b9f10b2edd949
@@ -16,6 +16,14 @@
import de.avalax.fitbuddy.presentation.workout.ExerciseFragment;
public class FitbuddyApplication extends Application {
public static final int ADD_WORKOUT = 1;
public static final int EDIT_WORKOUT = 2;
public static final int ADD_EXERCISE = 3;
public static final int EDIT_EXERCISE = 4;
public static final int ADD_SET = 5;
public static final int EDIT_SET = 6;
public static final int FINISHED_WORKOUT_DETAILS = 7;
private ApplicationComponent component;
@Override
@@ -31,8 +31,8 @@
import static android.widget.Toast.LENGTH_SHORT;
import static android.widget.Toast.makeText;
import static de.avalax.fitbuddy.presentation.RequestCodes.ADD_WORKOUT;
import static de.avalax.fitbuddy.presentation.RequestCodes.EDIT_WORKOUT;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.ADD_WORKOUT;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.EDIT_WORKOUT;
public class MainActivity extends AppCompatActivity
implements BottomNavigationView.OnNavigationItemSelectedListener {

This file was deleted.

Oops, something went wrong.
@@ -19,8 +19,8 @@
import static android.widget.Toast.LENGTH_SHORT;
import static android.widget.Toast.makeText;
import static de.avalax.fitbuddy.presentation.RequestCodes.ADD_SET;
import static de.avalax.fitbuddy.presentation.RequestCodes.EDIT_SET;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.ADD_SET;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.EDIT_SET;
import static java.lang.String.valueOf;
public class EditExerciseActivity extends AppCompatActivity {
@@ -18,7 +18,7 @@
import de.avalax.fitbuddy.presentation.edit.set.EditSetActivity;
import static android.graphics.Color.TRANSPARENT;
import static de.avalax.fitbuddy.presentation.RequestCodes.EDIT_SET;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.EDIT_SET;
public class SetAdapter extends RecyclerView.Adapter<SetAdapter.SetViewHolder> {
private Sets sets;
@@ -25,8 +25,8 @@
import static android.widget.Toast.LENGTH_SHORT;
import static android.widget.Toast.makeText;
import static de.avalax.fitbuddy.presentation.RequestCodes.ADD_EXERCISE;
import static de.avalax.fitbuddy.presentation.RequestCodes.EDIT_EXERCISE;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.ADD_EXERCISE;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.EDIT_EXERCISE;
import static java.lang.String.valueOf;
public class EditWorkoutActivity extends AppCompatActivity {
@@ -20,7 +20,7 @@
import de.avalax.fitbuddy.presentation.edit.exercise.EditExerciseActivity;
import static android.graphics.Color.TRANSPARENT;
import static de.avalax.fitbuddy.presentation.RequestCodes.EDIT_EXERCISE;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.EDIT_EXERCISE;
public class ExerciseAdapter extends RecyclerView.Adapter<ExerciseAdapter.ExerciseViewHolder> {
private Exercises exercises;
@@ -14,7 +14,7 @@
import de.avalax.fitbuddy.presentation.MainActivity;
import de.avalax.fitbuddy.presentation.edit.SelectableViewHolder;
import static de.avalax.fitbuddy.presentation.RequestCodes.FINISHED_WORKOUT_DETAILS;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.FINISHED_WORKOUT_DETAILS;
import static de.avalax.fitbuddy.presentation.summary.FinishedWorkoutDetailFragment.ARGS_FINISHED_WORKOUT;
public class FinishedWorkoutAdapter
@@ -27,7 +27,7 @@
import de.avalax.fitbuddy.presentation.edit.workout.EditWorkoutActivity;
import de.avalax.fitbuddy.presentation.summary.FinishedWorkoutViewHelper;
import static de.avalax.fitbuddy.presentation.RequestCodes.ADD_WORKOUT;
import static de.avalax.fitbuddy.presentation.FitbuddyApplication.ADD_WORKOUT;
public class WorkoutListFragment extends Fragment implements View.OnClickListener {
@Inject

0 comments on commit 6b1f393

Please sign in to comment.