Skip to content

Commit db7dda2

Browse files
committed
More Linting
Lots of things in the example app are now marked with the 'final' modifier, and saveToGallery() is protected in classes that implement it. As well, new suppressions are in a few places. NEW text is now removed completely. Looks like this has been unused for a long time and it's just stuck around anyway.
1 parent d67ea48 commit db7dda2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+58
-110
lines changed

MPChartExample/res/drawable/new_background.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

MPChartExample/res/layout/list_item.xml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,6 @@
2323
android:layout_marginTop="3dp"
2424
android:text="Small Text"
2525
android:textSize="12sp"
26-
android:layout_marginRight="10dp"
27-
android:layout_toLeftOf="@+id/tvNew"
28-
android:layout_toStartOf="@+id/tvNew" />
29-
30-
<TextView
31-
android:padding="7dp"
32-
android:layout_width="wrap_content"
33-
android:layout_height="wrap_content"
34-
android:textAppearance="?android:attr/textAppearanceSmall"
35-
android:text="@string/textNew"
36-
android:background="@drawable/new_background"
37-
android:textColor="@android:color/white"
38-
android:id="@+id/tvNew"
39-
android:textSize="12sp"
40-
android:layout_marginRight="5dp"
41-
android:layout_centerVertical="true"
42-
android:layout_alignParentRight="true"
43-
android:layout_alignParentEnd="true" />
26+
android:layout_marginRight="10dp" />
4427

4528
</RelativeLayout>

MPChartExample/res/layout/list_item_section.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,4 @@
2323
android:textSize="12sp"
2424
android:visibility="gone" />
2525

26-
<TextView
27-
android:padding="7dp"
28-
android:layout_width="wrap_content"
29-
android:layout_height="wrap_content"
30-
android:textAppearance="?android:attr/textAppearanceSmall"
31-
android:text="@string/textNew"
32-
android:background="@drawable/new_background"
33-
android:textColor="@android:color/white"
34-
android:id="@+id/tvNew"
35-
android:textSize="12sp"
36-
android:layout_marginRight="5dp"
37-
android:layout_centerVertical="true"
38-
android:layout_alignParentRight="true"
39-
android:layout_alignParentEnd="true"
40-
android:visibility="gone" />
41-
4226
</RelativeLayout>

MPChartExample/res/values/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,5 @@
5050
<string name="dash">-</string>
5151
<string name="scrollViewStart">START OF SCROLLVIEW</string>
5252
<string name="scrollViewEnd">END OF SCROLLVIEW</string>
53-
<string name="textNew">NEW</string>
5453

5554
</resources>

MPChartExample/src/com/xxmassdeveloper/mpchartexample/AnotherBarActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
202202
}
203203

204204
@Override
205-
public void saveToGallery() {
205+
protected void saveToGallery() {
206206
saveToGallery(chart, "AnotherBarActivity");
207207
}
208208

MPChartExample/src/com/xxmassdeveloper/mpchartexample/BarChartActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
297297
}
298298

299299
@Override
300-
public void saveToGallery() {
300+
protected void saveToGallery() {
301301
saveToGallery(chart, "BarChartActivity");
302302
}
303303

@@ -307,7 +307,7 @@ public void onStartTrackingTouch(SeekBar seekBar) {}
307307
@Override
308308
public void onStopTrackingTouch(SeekBar seekBar) {}
309309

310-
private RectF onValueSelectedRectF = new RectF();
310+
private final RectF onValueSelectedRectF = new RectF();
311311

312312
@Override
313313
public void onValueSelected(Entry e, Highlight h) {

MPChartExample/src/com/xxmassdeveloper/mpchartexample/BarChartActivityMultiDataset.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
266266
}
267267

268268
@Override
269-
public void saveToGallery() {
269+
protected void saveToGallery() {
270270
saveToGallery(chart, "BarChartActivityMultiDataset");
271271
}
272272

MPChartExample/src/com/xxmassdeveloper/mpchartexample/BarChartActivitySinus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
226226
}
227227

228228
@Override
229-
public void saveToGallery() {
229+
protected void saveToGallery() {
230230
saveToGallery(chart, "BarChartActivitySinus");
231231
}
232232

MPChartExample/src/com/xxmassdeveloper/mpchartexample/BarChartPositiveNegative.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ private void setData(List<Data> dataList) {
148148
*/
149149
private class Data {
150150

151-
String xAxisValue;
152-
float yValue;
153-
float xValue;
151+
final String xAxisValue;
152+
final float yValue;
153+
final float xValue;
154154

155155
Data(float xValue, float yValue, String xAxisValue) {
156156
this.xAxisValue = xAxisValue;
@@ -162,7 +162,7 @@ private class Data {
162162
private class ValueFormatter implements IValueFormatter
163163
{
164164

165-
private DecimalFormat mFormat;
165+
private final DecimalFormat mFormat;
166166

167167
ValueFormatter() {
168168
mFormat = new DecimalFormat("######.0");

MPChartExample/src/com/xxmassdeveloper/mpchartexample/BubbleChartActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
226226
}
227227

228228
@Override
229-
public void saveToGallery() {
229+
protected void saveToGallery() {
230230
saveToGallery(chart, "BubbleChartActivity");
231231
}
232232

0 commit comments

Comments
 (0)