added check for descriptionTv
This commit is contained in:
parent
267f3f5ef6
commit
ff116a08db
1 changed files with 2 additions and 0 deletions
|
@ -48,11 +48,13 @@ public class BottomSheetItemWithDescription extends SimpleBottomSheetItem {
|
||||||
public void inflate(OsmandApplication app, ViewGroup container, boolean nightMode) {
|
public void inflate(OsmandApplication app, ViewGroup container, boolean nightMode) {
|
||||||
super.inflate(app, container, nightMode);
|
super.inflate(app, container, nightMode);
|
||||||
descriptionTv = (TextView) view.findViewById(R.id.description);
|
descriptionTv = (TextView) view.findViewById(R.id.description);
|
||||||
|
if (descriptionTv != null) {
|
||||||
descriptionTv.setText(description);
|
descriptionTv.setText(description);
|
||||||
if (descriptionColorId != INVALID_ID) {
|
if (descriptionColorId != INVALID_ID) {
|
||||||
descriptionTv.setTextColor(ContextCompat.getColor(app, descriptionColorId));
|
descriptionTv.setTextColor(ContextCompat.getColor(app, descriptionColorId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static class Builder extends SimpleBottomSheetItem.Builder {
|
public static class Builder extends SimpleBottomSheetItem.Builder {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue