forked from organicmaps/organicmaps
[android] fix for incorrect copy text on openin hours view into place page
This commit is contained in:
parent
70846ae6d9
commit
ac786cbafe
2 changed files with 11 additions and 2 deletions
|
@ -1537,7 +1537,7 @@ public class PlacePageView extends NestedScrollView
|
|||
refreshTodayOpeningHours((timetables[0].isFullday ? resources.getString(R.string.twentyfour_seven)
|
||||
: resources.getString(R.string.daily) + " " + timetables[0].workingTimespan),
|
||||
ThemeUtils.getColor(getContext(), android.R.attr.textColorPrimary));
|
||||
UiUtils.hide(mFullOpeningHours);
|
||||
UiUtils.clearTextAndHide(mFullOpeningHours);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1997,7 +1997,10 @@ public class PlacePageView extends NestedScrollView
|
|||
items.add(mTvPhone.getText().toString());
|
||||
break;
|
||||
case R.id.ll__place_schedule:
|
||||
items.add(mFullOpeningHours.getText().toString());
|
||||
String text = UiUtils.isVisible(mFullOpeningHours)
|
||||
? mFullOpeningHours.getText().toString()
|
||||
: mTodayOpeningHours.getText().toString();
|
||||
items.add(text);
|
||||
break;
|
||||
case R.id.ll__place_operator:
|
||||
items.add(mTvOperator.getText().toString());
|
||||
|
|
|
@ -280,6 +280,12 @@ public final class UiUtils
|
|||
showIf(!TextUtils.isEmpty(text), tv);
|
||||
}
|
||||
|
||||
public static void clearTextAndHide(TextView tv)
|
||||
{
|
||||
tv.setText("");
|
||||
hide(tv);
|
||||
}
|
||||
|
||||
public static void showHomeUpButton(Toolbar toolbar)
|
||||
{
|
||||
toolbar.setNavigationIcon(ThemeUtils.getResource(toolbar.getContext(), R.attr.homeAsUpIndicator));
|
||||
|
|
Loading…
Add table
Reference in a new issue