forked from organicmaps/organicmaps
[android] Review fixes
This commit is contained in:
parent
5fc5fd7c0e
commit
9b83cdfe98
1 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue