Code cleanup
This commit is contained in:
parent
14b3bcead7
commit
e2af067edb
2 changed files with 10 additions and 9 deletions
|
@ -48,7 +48,7 @@ public abstract class BottomSheetDialogFragment extends DialogFragment {
|
|||
public abstract View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (context instanceof OnDialogFragmentResultListener) {
|
||||
dialogFragmentResultListener = (OnDialogFragmentResultListener) context;
|
||||
|
@ -82,10 +82,10 @@ public abstract class BottomSheetDialogFragment extends DialogFragment {
|
|||
}
|
||||
|
||||
@Nullable
|
||||
protected Drawable getIcon(@DrawableRes int drawableRes, @ColorRes int color) {
|
||||
protected Drawable getIcon(@DrawableRes int drawableRes, @ColorRes int colorRes) {
|
||||
OsmandApplication app = getMyApplication();
|
||||
if (app != null) {
|
||||
return app.getUIUtilities().getIcon(drawableRes, color);
|
||||
return app.getUIUtilities().getIcon(drawableRes, colorRes);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package net.osmand.plus.measurementtool;
|
||||
|
||||
import net.osmand.GPXUtilities.GPXFile;
|
||||
import net.osmand.GPXUtilities.TrkSegment;
|
||||
import net.osmand.data.QuadRect;
|
||||
import net.osmand.GPXUtilities;
|
||||
|
||||
public class NewGpxData {
|
||||
|
||||
|
@ -12,19 +13,19 @@ public class NewGpxData {
|
|||
OVERWRITE_SEGMENT
|
||||
}
|
||||
|
||||
private GPXUtilities.GPXFile gpxFile;
|
||||
private GPXUtilities.TrkSegment trkSegment;
|
||||
private GPXFile gpxFile;
|
||||
private TrkSegment trkSegment;
|
||||
private QuadRect rect;
|
||||
private ActionType actionType;
|
||||
|
||||
public NewGpxData(GPXUtilities.GPXFile gpxFile, QuadRect rect, ActionType actionType, GPXUtilities.TrkSegment trkSegment) {
|
||||
public NewGpxData(GPXFile gpxFile, QuadRect rect, ActionType actionType, TrkSegment trkSegment) {
|
||||
this.gpxFile = gpxFile;
|
||||
this.rect = rect;
|
||||
this.actionType = actionType;
|
||||
this.trkSegment = trkSegment;
|
||||
}
|
||||
|
||||
public GPXUtilities.GPXFile getGpxFile() {
|
||||
public GPXFile getGpxFile() {
|
||||
return gpxFile;
|
||||
}
|
||||
|
||||
|
@ -36,7 +37,7 @@ public class NewGpxData {
|
|||
return actionType;
|
||||
}
|
||||
|
||||
public GPXUtilities.TrkSegment getTrkSegment() {
|
||||
public TrkSegment getTrkSegment() {
|
||||
return trkSegment;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue