- final ViewGroup.MarginLayoutParams pars = (ViewGroup.MarginLayoutParams) vh.rowRouteTimetable.getLayoutParams();
- if (pars!=null){
- pars.topMargin = 16;
- if(Build.VERSION.SDK_INT >= 17)
- pars.setMarginStart(20);
- pars.leftMargin = 20;
- }
- } else {
- // View Holder Pattern(R) renders each element from a previous one: if the other one had an invisible rowRouteDestination, we need to make it visible.
+ if (route.destinazione == null || route.destinazione.length == 0) {
+ vh.rowRouteDestination.setVisibility(View.GONE)
+ // move around the route timetable
+ val pars = vh.rowRouteTimetable.getLayoutParams() as MarginLayoutParams?
+ if (pars != null) {
+ pars.topMargin = 16
+ pars.marginStart = 20
+ pars.leftMargin = 20
+ }
+ } else {
+ // View Holder Pattern(R) renders each element from a previous one: if the other one had an invisible rowRouteDestination, we need to make it visible.