Permalink
Browse files

android linter

  • Loading branch information...
avalax committed Sep 20, 2016
1 parent c81ef30 commit 5790916149bf20647a1ddb0b82439987d27e5ec8
Showing with 63 additions and 128 deletions.
  1. +1 −1 build.gradle
  2. BIN {src/main/res/drawable → doc/icons}/ic_action_tendency_negative.png
  3. BIN {src/main/res/drawable → doc/icons}/ic_action_tendency_neutral.png
  4. BIN {src/main/res/drawable → doc/icons}/ic_action_tendency_positive.png
  5. +4 −4 src/main/AndroidManifest.xml
  6. +13 −5 src/main/java/de/avalax/fitbuddy/presentation/dialog/EditNameDialogFragment.java
  7. +5 −5 src/main/java/de/avalax/fitbuddy/presentation/dialog/EditRepsDialogFragment.java
  8. +5 −5 src/main/java/de/avalax/fitbuddy/presentation/dialog/EditSetsDialogFragment.java
  9. +5 −5 src/main/java/de/avalax/fitbuddy/presentation/dialog/EditWeightDialogFragment.java
  10. +0 −9 src/main/res/anim/in_from_bottom.xml
  11. +0 −9 src/main/res/anim/in_from_top.xml
  12. +0 −9 src/main/res/anim/out_to_bottom.xml
  13. +0 −9 src/main/res/anim/out_to_top.xml
  14. BIN src/main/res/drawable-hdpi/ic_action_cancel.png
  15. BIN src/main/res/drawable-hdpi/ic_action_edit.png
  16. BIN src/main/res/drawable-hdpi/ic_action_new_exercise.png
  17. BIN src/main/res/drawable-hdpi/ic_action_overflow.png
  18. BIN src/main/res/drawable-hdpi/ic_action_save.png
  19. BIN src/main/res/drawable-mdpi/ic_action_cancel.png
  20. BIN src/main/res/drawable-mdpi/ic_action_edit.png
  21. BIN src/main/res/drawable-mdpi/ic_action_new_exercise.png
  22. BIN src/main/res/drawable-mdpi/ic_action_overflow.png
  23. BIN src/main/res/drawable-mdpi/ic_action_save.png
  24. BIN src/main/res/drawable-xhdpi/ic_action_cancel.png
  25. BIN src/main/res/drawable-xhdpi/ic_action_edit.png
  26. BIN src/main/res/drawable-xhdpi/ic_action_new_exercise.png
  27. BIN src/main/res/drawable-xhdpi/ic_action_overflow.png
  28. BIN src/main/res/drawable-xhdpi/ic_action_save.png
  29. BIN src/main/res/drawable-xxhdpi/ic_action_cancel.png
  30. BIN src/main/res/drawable-xxhdpi/ic_action_edit.png
  31. BIN src/main/res/drawable-xxhdpi/ic_action_new_exercise.png
  32. BIN src/main/res/drawable-xxhdpi/ic_action_overflow.png
  33. BIN src/main/res/drawable-xxhdpi/ic_action_save.png
  34. +0 −9 src/main/res/layout/fragment_edit_workout_name.xml
  35. +4 −4 src/main/res/layout/fragment_exercise_edit.xml
  36. +3 −3 src/main/res/layout/item_exercise.xml
  37. +1 −1 src/main/res/layout/item_finished_workout.xml
  38. +1 −1 src/main/res/menu/edit_exercise_actions.xml
  39. +4 −4 src/main/res/menu/edit_exerciselist_actions.xml
  40. +6 −6 src/main/res/menu/edit_workout_actions.xml
  41. +0 −8 src/main/res/values/arrays.xml
  42. +0 −3 src/main/res/values/dimens.xml
  43. +11 −20 src/main/res/values/strings.xml
  44. +0 −8 src/main/res/values/styles.xml
View
@@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.0-rc2'
+ classpath 'com.android.tools.build:gradle:2.2.0'
}
}
@@ -5,14 +5,14 @@
android:installLocation="auto">
<application
- android:name="de.avalax.fitbuddy.presentation.FitbuddyApplication"
+ android:name=".presentation.FitbuddyApplication"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:supportsRtl="true">
- <activity android:name="de.avalax.fitbuddy.presentation.workout.WorkoutActivity">
+ <activity android:name=".presentation.workout.WorkoutActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@@ -22,8 +22,8 @@
<data android:scheme="http" android:host="fitbuddy.de" />
</intent-filter>
</activity>
- <activity android:name="de.avalax.fitbuddy.presentation.edit.workout.EditWorkoutActivity"/>
- <activity android:name="de.avalax.fitbuddy.presentation.edit.exercise.EditExerciseActivity"/>
+ <activity android:name=".presentation.edit.workout.EditWorkoutActivity"/>
+ <activity android:name=".presentation.edit.exercise.EditExerciseActivity"/>
<activity android:name=".presentation.summary.FinishedWorkoutActivity"/>
</application>
@@ -1,14 +1,16 @@
package de.avalax.fitbuddy.presentation.dialog;
-import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.EditText;
import de.avalax.fitbuddy.R;
@@ -30,16 +32,22 @@ public static EditNameDialogFragment newInstance(String name, String hint) {
}
@Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
+ public void onAttach(Context context) {
+ super.onAttach(context);
try {
- listener = (DialogListener) activity;
+ listener = (DialogListener) context;
} catch (ClassCastException e) {
- throw new ClassCastException(activity.toString()
+ throw new ClassCastException(context.toString()
+ " must implement EditNameDialogFragment.DialogListener");
}
}
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ return super.onCreateView(inflater, container, savedInstanceState);
+ }
+
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
@@ -1,8 +1,8 @@
package de.avalax.fitbuddy.presentation.dialog;
-import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
@@ -29,12 +29,12 @@ public static EditRepsDialogFragment newInstance(int reps) {
}
@Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
+ public void onAttach(Context context) {
+ super.onAttach(context);
try {
- listener = (DialogListener) activity;
+ listener = (DialogListener) context;
} catch (ClassCastException e) {
- throw new ClassCastException(activity.toString()
+ throw new ClassCastException(context.toString()
+ " must implement EditRepsDialogFragment.DialogListener");
}
}
@@ -1,8 +1,8 @@
package de.avalax.fitbuddy.presentation.dialog;
-import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
@@ -29,12 +29,12 @@ public static EditSetsDialogFragment newInstance(int sets) {
}
@Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
+ public void onAttach(Context context) {
+ super.onAttach(context);
try {
- listener = (DialogListener) activity;
+ listener = (DialogListener) context;
} catch (ClassCastException e) {
- throw new ClassCastException(activity.toString()
+ throw new ClassCastException(context.toString()
+ " must implement EditSetsDialogFragment.DialogListener");
}
}
@@ -1,8 +1,8 @@
package de.avalax.fitbuddy.presentation.dialog;
-import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
@@ -32,12 +32,12 @@ public static EditWeightDialogFragment newInstance(double weight) {
}
@Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
+ public void onAttach(Context context) {
+ super.onAttach(context);
try {
- listener = (DialogListener) activity;
+ listener = (DialogListener) context;
} catch (ClassCastException e) {
- throw new ClassCastException(activity.toString()
+ throw new ClassCastException(context.toString()
+ " must implement EditWeightDialogFragment.DialogListener");
}
}
@@ -1,9 +0,0 @@
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:shareInterpolator="false">
- <translate
- android:fromXDelta="0%"
- android:toXDelta="0%"
- android:fromYDelta="0%"
- android:toYDelta="-100%"
- android:duration="1000"/>
-</set>
@@ -1,9 +0,0 @@
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:shareInterpolator="false">
- <translate
- android:fromXDelta="0%"
- android:toXDelta="0%"
- android:fromYDelta="0%"
- android:toYDelta="100%"
- android:duration="1000"/>
-</set>
@@ -1,9 +0,0 @@
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:shareInterpolator="false">
- <translate
- android:fromXDelta="0%"
- android:toXDelta="0%"
- android:fromYDelta="-100%"
- android:toYDelta="0%"
- android:duration="1000"/>
-</set>
@@ -1,9 +0,0 @@
-<set xmlns:android="http://schemas.android.com/apk/res/android"
- android:shareInterpolator="false">
- <translate
- android:fromXDelta="0%"
- android:toXDelta="0%"
- android:fromYDelta="100%"
- android:toYDelta="0%"
- android:duration="1000"/>
-</set>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<EditText
- android:id="@+id/nameEditText"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:hint="@string/new_workout_name"
- android:inputType="textAutoComplete"
- />
@@ -28,7 +28,7 @@
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
- android:singleLine="true"
+ android:maxLines="1"
android:text="@string/label_exercise_name"
android:textAppearance="?android:attr/textAppearanceLarge"/>
@@ -66,7 +66,7 @@
android:ellipsize="marquee"
android:fadingEdge="horizontal"
- android:singleLine="true"
+ android:maxLines="1"
android:text="@string/label_exercise_weight"
android:textAppearance="?android:attr/textAppearanceLarge"/>
@@ -103,7 +103,7 @@
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
- android:singleLine="true"
+ android:maxLines="1"
android:text="@string/label_exercise_sets"
android:textAppearance="?android:attr/textAppearanceLarge"/>
@@ -140,7 +140,7 @@
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
- android:singleLine="true"
+ android:maxLines="1"
android:text="@string/label_exercise_repetitions"
android:textAppearance="?android:attr/textAppearanceLarge"/>
@@ -25,7 +25,7 @@
android:layout_marginStart="5dp"
android:drawableEnd="@drawable/ic_action_change_exercise"
android:ellipsize="marquee"
- android:singleLine="true"
+ android:maxLines="1"
android:text="@string/edit_sets_bar_title"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"/>
@@ -37,7 +37,7 @@
android:layout_toEndOf="@+id/setsTextView"
android:drawableEnd="@drawable/ic_action_repeat"
android:ellipsize="marquee"
- android:singleLine="true"
+ android:maxLines="1"
android:text="@string/edit_reps_bar_title"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"/>
@@ -50,7 +50,7 @@
android:layout_toEndOf="@+id/repsTextView"
android:drawableEnd="@drawable/ic_action_weight"
android:ellipsize="marquee"
- android:singleLine="true"
+ android:maxLines="1"
android:text="@string/edit_weight_bar_title"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"/>
</RelativeLayout>
@@ -25,7 +25,7 @@
android:layout_marginStart="5dp"
android:drawableStart="@drawable/ic_action_go_to_today"
android:ellipsize="marquee"
- android:singleLine="true"
+ android:maxLines="1"
android:text="@string/edit_sets_bar_title"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"/>
</RelativeLayout>
@@ -3,5 +3,5 @@
android:id="@+id/action_save_exercise"
android:icon="@drawable/ic_action_accept"
android:showAsAction="always"
- android:title="save changes" />
+ android:title="@string/exercise_save" />
</menu>
@@ -2,17 +2,17 @@
<item
android:id="@+id/action_add_exercise"
android:showAsAction="collapseActionView"
- android:title="add exercise" />
+ android:title="@string/exercise_add" />
<item
android:id="@+id/action_move_exercise_up"
android:showAsAction="collapseActionView"
- android:title="move up" />
+ android:title="@string/exercise_move_up" />
<item
android:id="@+id/action_move_exercise_down"
android:showAsAction="collapseActionView"
- android:title="move down" />
+ android:title="@string/exercise_move_down" />
<item
android:id="@+id/action_delete_exercise"
android:showAsAction="collapseActionView"
- android:title="delete" />
+ android:title="@string/exercise_delete" />
</menu>
@@ -3,25 +3,25 @@
android:id="@+id/action_save_workout"
android:icon="@drawable/ic_action_accept"
android:showAsAction="always"
- android:title="save changes" />
+ android:title="@string/workout_save" />
<item
android:id="@+id/action_change_workout_name"
android:showAsAction="collapseActionView"
- android:title="change workout name" />
+ android:title="@string/workout_change_name" />
<item
android:id="@+id/action_add_exercise"
android:showAsAction="collapseActionView"
- android:title="add new exercise" />
+ android:title="@string/workout_add_new_exercise" />
<item
android:id="@+id/action_delete_workout"
android:showAsAction="collapseActionView"
- android:title="delete workout" />
+ android:title="@string/workout_delete" />
<item
android:id="@+id/action_add_workout"
android:showAsAction="collapseActionView"
- android:title="add new workout" />
+ android:title="@string/workout_new_workout" />
<item
android:id="@+id/action_share_workout"
android:showAsAction="collapseActionView"
- android:title="share workout" />
+ android:title="@string/workout_share" />
</menu>
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <string-array name="actions_edit_exercise">
- <item>@string/action_exercise_delete</item>
- <item>@string/action_exercise_add_before_selected</item>
- <item>@string/action_exercise_add_behind_selected</item>
- </string-array>
-</resources>
@@ -2,7 +2,4 @@
<resources>
<dimen name="bar_font_size">68sp</dimen>
<dimen name="padding_bar_text">40dp</dimen>
- <dimen name="padding_result_bar_text">68dp</dimen>
- <dimen name="margin_bottom_view">16dp</dimen>
- <dimen name="padding_vertical_view">36dp</dimen>
</resources>
Oops, something went wrong.

0 comments on commit 5790916

Please sign in to comment.