[android] Review fixes

This commit is contained in:
Roman Romanov 2017-07-07 14:48:31 +04:00 committed by r.kuznetsov
parent 5fc5fd7c0e
commit 9b83cdfe98

View file

@ -50,16 +50,24 @@ public class TaxiAdapter extends PagerAdapter
View v = LayoutInflater.from(mContext).inflate(R.layout.taxi_pager_item, container, false);
TextView name = (TextView) v.findViewById(R.id.product_name);
String separator;
// We ignore all Yandex.Taxi product names until they do support of passing product parameters
// to their app via deeplink.
if (mType == TaxiManager.PROVIDER_YANDEX)
{
name.setText(R.string.yandex_taxi_title);
separator = " • ~";
}
else
{
name.setText(product.getName());
separator = "";
}
TextView timeAndPrice = (TextView) v.findViewById(R.id.arrival_time_price);
int time = Integer.parseInt(product.getTime());
CharSequence waitTime = RoutingController.formatRoutingTime(mContext, time, R.dimen.text_size_body_3);
timeAndPrice.setText(mContext.getString(R.string.taxi_wait, waitTime + " • ~"
CharSequence waitTime = RoutingController.formatRoutingTime(mContext, time,
R.dimen.text_size_body_3);
timeAndPrice.setText(mContext.getString(R.string.taxi_wait, waitTime + separator
+ formatPrice(product)));
container.addView(v, 0);
return v;