Updated parking card. Updated osm edits in my places. Added osm edits to dashboard

This commit is contained in:
Denis 2015-03-16 15:46:11 +02:00
parent 02786c22f4
commit bb8d6e40ce
23 changed files with 138 additions and 108 deletions

View file

@ -23,53 +23,52 @@
android:src="@drawable/ic_parking_postion_arrow"/>
<LinearLayout
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/distance"
android:textSize="@dimen/dash_parking_text_size"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/color_white"
tools:text="@string/app_version"/>
android:orientation="horizontal">
<TextView
android:id="@+id/distance"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/color_white"
android:textSize="@dimen/dash_parking_big_text_size"
tools:text="@string/app_version"/>
<TextView
android:id="@+id/time_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/color_white"
android:textSize="@dimen/dash_parking_small_text_size"
tools:text="@string/app_mode_aircraft"/>
<TextView
android:id="@+id/left_lbl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dashFavIconMargin"
tools:text="@string/app_mode_aircraft"/>
</LinearLayout>
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/color_white"
android:textSize="@dimen/dashProgressTextSize"
tools:text="@string/app_version"/>
</LinearLayout>
android:textSize="@dimen/dash_parking_small_text_size"
tools:text="@string/parking_place_limited"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/dashFavIconMargin"
android:orientation="vertical">
<TextView
android:id="@+id/time_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/color_white"
android:textSize="@dimen/dash_parking_text_size"
tools:text="@string/app_mode_aircraft"/>
<TextView
android:id="@+id/left_lbl"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/osmand_parking_time_left"
android:textColor="@color/color_white"
android:textSize="@dimen/dashProgressTextSize"
tools:text="@string/app_version"/>
</LinearLayout>
</LinearLayout>

View file

@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<resources><string name="auto_zoom_none">Без аўтаматычнага маштабаваньня</string>
<string name="auto_zoom_close">Буйней</string>
<string name="auto_zoom_far">Для сярэдняга маштаба</string>
@ -2051,7 +2051,7 @@ OsmAnd мае адкрыты зыходны код і актыўна разві
<string name="route_points">Пункты маршруту</string>
<string name="shared_string_more_actions">Больш дзеяньняў</string>
<string name="osmand_parking_outdated">Састарэлі</string>
<string name="osmand_parking_overdue">Састарэлі</string>
<string name="osmand_parking_hour">г</string><string name="osmand_parking_minute">хв</string><string name="osmand_parking_time_left">Засталося</string> <string name="action_create">Стварыць дзеяньне</string>
<string name="action_modify">Зьмяніць дзеяньне</string>
<string name="action_delete">Выдаліць дзеяньне</string>

View file

@ -1969,7 +1969,7 @@
<string name="osm_edits">OSM redigeringer</string>
<string name="osmand_parking_hour">t</string><string name="osmand_parking_minute">m</string><string name="osmand_parking_time_left">Tilbage</string> <string name="parking_place_limited">Tidsbegrænset parkering</string>
<string name="your_edits">Dine redigeringer</string>
<string name="osmand_parking_outdated">Udløbet</string>
<string name="osmand_parking_overdue">Udløbet</string>
<string name="delay_to_start_navigation_descr">Automatisk start af navigationen efter angivne interval</string>
<string name="delay_to_start_navigation">Spring ruteplanlægning over</string>
<string name="shared_string_go">Udfør</string>

View file

@ -1985,5 +1985,5 @@
<string name="shared_string_photo">Foto</string>
<string name="route_points">Puntos de la ruta</string>
<string name="shared_string_release">Liberado</string>
<string name="osmand_parking_outdated">Obsoleto</string>
<string name="osmand_parking_overdue">Obsoleto</string>
</resources>

View file

@ -1991,5 +1991,5 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
<string name="osm_edits">Éditions OSM</string>
<string name="osmand_parking_hour">h</string><string name="osmand_parking_minute">m</string><string name="osmand_parking_time_left">Restant</string> <string name="parking_place_limited">Stationnement à durée limitée</string>
<string name="your_edits">Vos modifications</string>
<string name="osmand_parking_outdated">Expiré</string>
<string name="osmand_parking_overdue">Expiré</string>
</resources>

View file

@ -2146,5 +2146,5 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
<string name="osm_edits">Modifiche OSM</string>
<string name="osmand_parking_hour">h</string><string name="osmand_parking_minute">m</string><string name="osmand_parking_time_left">Mancano</string> <string name="parking_place_limited">Parcheggio a tempo limitato</string>
<string name="your_edits">Le tue modifiche</string>
<string name="osmand_parking_outdated">Obsoleto</string>
<string name="osmand_parking_overdue">Obsoleto</string>
</resources>

View file

@ -2159,7 +2159,7 @@ OsmAndはオープンソースであり、活発に開発が進められいま
<string name="voices">音声プロンプト</string>
<string name="shared_string_disabled">有効</string>
<string name="shared_string_enabled">無効</string>
<string name="osmand_parking_outdated">期限切れ</string>
<string name="osmand_parking_overdue">期限切れ</string>
<string name="action_create">アクションの作成</string>
<string name="action_modify">アクションの変更</string>
<string name="action_delete">アクションの削除</string>

View file

@ -2202,5 +2202,5 @@
<string name="osm_edits">OSM 편집</string>
<string name="osmand_parking_hour">시간</string><string name="osmand_parking_minute"></string><string name="osmand_parking_time_left">남은 시간</string> <string name="parking_place_limited">주차 장소 시간 제한</string>
<string name="your_edits">편집</string>
<string name="osmand_parking_outdated">시간 초과</string>
<string name="osmand_parking_overdue">시간 초과</string>
</resources>

View file

@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<resources><string name="rendering_attr_roadColors_description">Velg fargeskjema for veier:</string>
<string name="rendering_attr_roadColors_name">Veifargeskjema</string>
<string name="map_widget_show_destination_arrow">Vis retning til målet</string>
@ -1249,7 +1249,7 @@
<string name="route_points">Rutepunkter</string>
<string name="shared_string_ellipsis"></string>
<string name="osmand_parking_outdated">Utdatert</string>
<string name="osmand_parking_overdue">Utdatert</string>
<string name="osm_edits">OSM-redigeringer</string>
<string name="osmand_parking_time_left">Igjen</string> <string name="your_edits">Dine redigeringer</string>
<string name="waypoint_visit_after">Besøk etter</string>

View file

@ -2014,7 +2014,7 @@ Afganistan, Afryka Południowa, Albania, Algieria, Andora, Angola, Anguilla, Ant
<string name="proxy_port_title">Port proxy</string>
<string name="plugin_description_title">Opis</string>
<string name="plugin_install_needs_network">Do zainstalowania tej wtyczki potrzebujesz połączenia internetowego.</string>
<string name="osmand_parking_outdated">Przestarzały</string>
<string name="osmand_parking_overdue">Przestarzały</string>
<string name="action_create">Utwórz</string>
<string name="action_modify">Zmodyfikuj</string>
<string name="action_delete">Usuń</string>

View file

@ -1929,5 +1929,5 @@
<string name="waypoint_visit_after">Посетить после</string>
<string name="waypoint_visit_before">Посетить до</string>
<string name="plugin_touringview_name">Туристическая карта</string>
<string name="osmand_parking_outdated">Просрочено</string>
<string name="osmand_parking_overdue">Просрочено</string>
</resources>

View file

@ -1917,6 +1917,6 @@
<string name="shared_string_photo">Foto</string>
<string name="route_points">Puntos de s\'àndala</string>
<string name="shared_string_release">Essidu</string>
<string name="osmand_parking_outdated">Iscadidu</string>
<string name="osmand_parking_overdue">Iscadidu</string>
<string name="delay_to_start_navigation_descr">Incumentza automaticamente su nàvigu a pustis de s\'intervallu dislindadu</string>
</resources>

View file

@ -1833,5 +1833,5 @@
<string name="osm_edits">OSM-redigeringar</string>
<string name="osmand_parking_hour">h</string><string name="osmand_parking_minute">m</string><string name="osmand_parking_time_left">kvar</string> <string name="parking_place_limited">Tidsbegränsad parkering</string>
<string name="your_edits">Dina redigeringar</string>
<string name="osmand_parking_outdated">Föråldrad</string>
<string name="osmand_parking_overdue">Föråldrad</string>
</resources>

View file

@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<resources><string name="tip_recent_changes_0_8_1_t">Зміни в 0.8.1:
\n\t* Більш точні маршрути (трохи повільніше)
\n\t* Розумний і швидкий перерахунок маршруту
@ -2061,7 +2061,7 @@ OsmAnd має відкриті сирці і активно розвиваєть
\n\nФайл з даними містить всі навігаційні символи, у вигляди єдиного файлу з назвою \'World seamarks\'.
\n\nЦей стиль може бути скасовано шляхом його деактивації тут або зміною в пункті \'Стиль мапи\' меню \'Налаштування мапи\' на потрібний.
</string>
<string name="osmand_parking_outdated">Застарілі</string>
<string name="osmand_parking_overdue">Застарілі</string>
<string name="action_create">Створити дію</string>
<string name="action_modify">Змінити дію</string>
<string name="action_delete">Вилучити дію</string>

View file

@ -1947,7 +1947,7 @@
<string name="action_create">行動建立</string>
<string name="action_modify">行動修改</string>
<string name="action_delete">行動刪除</string>
<string name="osmand_parking_outdated">已過時</string>
<string name="osmand_parking_overdue">已過時</string>
<string name="delay_to_start_navigation_descr">指定的時間間隔後自動開始導航</string>
<string name="delay_to_start_navigation">跳過航路規劃</string>
<string name="shared_string_go">執行</string>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="parking_outdated_color">#f41a34</color>
<color name="osmo_header_dark">#2d383d</color>
<color name="osmo_header_light">#b36d12</color>

View file

@ -91,5 +91,6 @@
<dimen name="dashFavDescTextSize">14sp</dimen>
<dimen name="dashProgressTextSize">14sp</dimen>
<dimen name="dashParkingTextSize">24sp</dimen>
<dimen name="dash_parking_text_size">22sp</dimen>
<dimen name="dash_parking_big_text_size">18sp</dimen>
<dimen name="dash_parking_small_text_size">14sp</dimen>
</resources>

View file

@ -12,15 +12,15 @@
<string name="delay_to_start_navigation_descr">Automatically start navigation after specified interval</string>
<string name="delay_to_start_navigation">Skip route planning</string>
<string name="shared_string_go">Go</string>
<string name="osmand_parking_outdated">Outdated</string>
<string name="osmand_parking_overdue">overdue</string>
<string name="action_create">Action create</string>
<string name="action_modify">Action modify</string>
<string name="action_delete">Action delete</string>
<string name="osm_edits">OSM edits</string>
<string name="osmand_parking_hour">h</string><!-- means first letter of word *hour*-->
<string name="osmand_parking_minute">m</string><!-- means first letter of word *minute*-->
<string name="osmand_parking_minute">min</string><!-- means first letter of word *minute*-->
<string name="osmand_parking_time_left">Left</string> <!-- used to describe time left, not left direction -->
<string name="parking_place_limited">Parking place time limited</string>
<string name="parking_place_limited">Parking place time limited to</string>
<string name="your_edits">Your Edits</string>
<string name="waypoint_visit_after">Visit after</string>
<string name="waypoint_visit_before">Visit before</string>

View file

@ -1,15 +1,5 @@
package net.osmand.plus.dashboard;
import java.util.ArrayList;
import java.util.List;
import net.osmand.Location;
import net.osmand.data.LatLon;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.views.DirectionDrawable;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
@ -19,6 +9,16 @@ import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import net.osmand.Location;
import net.osmand.data.LatLon;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.views.DirectionDrawable;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Denis
* on 26.01.2015.
@ -134,7 +134,7 @@ public abstract class DashLocationFragment extends DashBaseFragment {
if (paint) {
dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_myloc_distance);
} else {
dd.setImage(arrowResId);
dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_white);
}
if (fromLoc == null || h == null) {
dd.setAngle(0);

View file

@ -34,6 +34,7 @@ import net.osmand.plus.development.OsmandDevelopmentPlugin;
import net.osmand.plus.download.DownloadActivity;
import net.osmand.plus.helpers.ScreenOrientationHelper;
import net.osmand.plus.monitoring.DashTrackFragment;
import net.osmand.plus.osmedit.DashOsmEditsFragment;
import net.osmand.plus.osmo.DashOsmoFragment;
import net.osmand.plus.parkingpoint.DashParkingFragment;
import net.osmand.plus.routing.RoutingHelper;
@ -366,7 +367,7 @@ public class DashboardOnMap {
showFragment(manager, fragmentTransaction, DashAudioVideoNotesFragment.TAG, DashAudioVideoNotesFragment.class);
showFragment(manager, fragmentTransaction, DashTrackFragment.TAG, DashTrackFragment.class);
showFragment(manager, fragmentTransaction, DashOsmoFragment.TAG, DashOsmoFragment.class);
//showFragment(manager, fragmentTransaction, DashOsmEditsFragment.TAG, DashOsmEditsFragment.class);
showFragment(manager, fragmentTransaction, DashOsmEditsFragment.TAG, DashOsmEditsFragment.class);
// showFragment(manager, fragmentTransaction, DashUpdatesFragment.TAG, DashUpdatesFragment.class);
showFragment(manager, fragmentTransaction, DashPluginsFragment.TAG, DashPluginsFragment.class);

View file

@ -1,18 +1,6 @@
package net.osmand.plus.osmedit;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmAndAppCustomization;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.ProgressImplementation;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dashboard.DashBaseFragment;
import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.myplaces.FavoritesActivity;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.LayoutInflater;
@ -23,6 +11,15 @@ import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.ProgressImplementation;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dashboard.DashBaseFragment;
import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.myplaces.FavoritesActivity;
import java.util.ArrayList;
import java.util.List;

View file

@ -23,6 +23,7 @@ import android.widget.TextView;
import android.widget.Toast;
import net.osmand.access.AccessibleToast;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings;
@ -121,7 +122,7 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
@Override
public void onClick(DialogInterface dialog, int which) {
Iterator<OsmPoint> it = dataPoints.iterator();
while(it.hasNext()) {
while (it.hasNext()) {
OsmPoint info = it.next();
if (info.getGroup() == OsmPoint.Group.POI) {
dbpoi.deletePOI((OpenstreetmapPoint) info);
@ -163,10 +164,10 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
}
public static void getOsmEditView(View v, OsmPoint child, OsmandApplication app){
public static void getOsmEditView(View v, OsmPoint child, OsmandApplication app) {
TextView viewName = ((TextView) v.findViewById(R.id.name));
ImageView icon = (ImageView) v.findViewById(R.id.icon);
String idPrefix = (child.getGroup() == OsmPoint.Group.POI ? "POI " : "Bug ") + " id: " + child.getId();
String idPrefix = getPrefix(child);
if (child.getGroup() == OsmPoint.Group.POI) {
viewName.setText(idPrefix + " (" + ((OpenstreetmapPoint) child).getSubtype() + ") " + ((OpenstreetmapPoint) child).getName());
icon.setImageDrawable(app.getIconsCache().
@ -217,6 +218,12 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
openPopUpMenu(v, child);
}
});
v.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showOnMap(child);
}
});
return v;
}
@ -242,13 +249,23 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
if (info.getGroup() == OsmPoint.Group.POI) {
dbpoi.deletePOI((OpenstreetmapPoint) info);
} else if (info.getGroup() == OsmPoint.Group.BUG) {
dbbug.deleteAllBugModifications((OsmNotesPoint) info);
}
listAdapter.delete(info);
AlertDialog.Builder b = new AlertDialog.Builder(getActivity());
b.setMessage(getString(R.string.local_osm_changes_delete_all_confirm, 1));
b.setPositiveButton(R.string.shared_string_delete, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (info.getGroup() == OsmPoint.Group.POI) {
dbpoi.deletePOI((OpenstreetmapPoint) info);
} else if (info.getGroup() == OsmPoint.Group.BUG) {
dbbug.deleteAllBugModifications((OsmNotesPoint) info);
}
listAdapter.delete(info);
}
});
b.setNegativeButton(R.string.shared_string_cancel, null);
b.show();
return true;
}
});
item = optionsMenu.getMenu().add(R.string.local_openstreetmap_upload).
@ -268,7 +285,7 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
return (OsmandApplication) getActivity().getApplication();
}
private void showUploadItemsDialog(){
private void showUploadItemsDialog() {
dialog = ProgressImplementation.createProgressDialog(
getActivity(),
getString(R.string.uploading),
@ -320,7 +337,7 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
return e.getMessage();
} finally {
try {
if(out!= null) out.close();
if (out != null) out.close();
} catch (IOException e) {
e.printStackTrace();
}
@ -356,7 +373,7 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
sz.attribute("", "lon", p.getLongitude() + "");
sz.attribute("", "id", p.getId() + "");
sz.startTag("", "comment");
sz.attribute("", "text", p.getText() +"");
sz.attribute("", "text", p.getText() + "");
sz.endTag("", "comment");
sz.endTag("", "note");
}
@ -382,12 +399,12 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
}
@Override
public void uploadUpdated(OsmPoint point){
public void uploadUpdated(OsmPoint point) {
listAdapter.delete(point);
}
@Override
public void uploadEnded(Integer result){
public void uploadEnded(Integer result) {
listAdapter.notifyDataSetChanged();
if (result != null) {
AccessibleToast.makeText(getActivity(),
@ -397,4 +414,16 @@ public class OsmEditsFragment extends ListFragment implements OsmEditsUploadList
dialog.dismiss();
}
private void showOnMap(OsmPoint osmPoint) {
boolean isOsmPoint = osmPoint instanceof OpenstreetmapPoint;
String type = osmPoint.getGroup() == OsmPoint.Group.POI ? PointDescription.POINT_TYPE_POI : PointDescription.POINT_TYPE_OSM_BUG;
String name = (isOsmPoint ? ((OpenstreetmapPoint) osmPoint).getName() : ((OsmNotesPoint) osmPoint).getText());
getMyApplication().getSettings().setMapLocationToShow(osmPoint.getLatitude(), osmPoint.getLongitude(), 15,
new PointDescription(type, name), true, osmPoint); //$NON-NLS-1$
MapActivity.launchMapActivityMoveToTop(getActivity());
}
public static String getPrefix(OsmPoint osmPoint) {
return (osmPoint.getGroup() == OsmPoint.Group.POI ? "POI " : "Bug ") + " id: " + osmPoint.getId();
}
}

View file

@ -54,7 +54,7 @@ public class DashParkingFragment extends DashLocationFragment {
public void onClick(View v) {
LatLon point = plugin.getParkingPosition();
getMyApplication().getSettings().setMapLocationToShow(point.getLatitude(), point.getLongitude(),
15, new PointDescription(PointDescription.POINT_TYPE_FAVORITE, plugin.getParkingDescription(getActivity())), true,
15, new PointDescription(PointDescription.POINT_TYPE_FAVORITE, plugin.getParkingDescription(getActivity())), false,
point); //$NON-NLS-1$
MapActivity.launchMapActivityMoveToTop(getActivity());
}
@ -83,31 +83,33 @@ public class DashParkingFragment extends DashLocationFragment {
LatLon loc = getDefaultLocation();
LatLon position = plugin.getParkingPosition();
boolean limited = plugin.getParkingType();
String parking_name = limited ?
getString(R.string.parking_place_limited) : getString(R.string.parking_place);
String descr;
TextView timeLeft = (TextView) mainView.findViewById(R.id.time_left);
if (limited) {
descr = getString(R.string.parking_place_limited) + " " + plugin.getFormattedTime( plugin.getParkingTime(), getActivity());
long endtime = plugin.getParkingTime();
long currTime = Calendar.getInstance().getTimeInMillis();
long timeDiff = endtime - currTime;
String time = getFormattedTime(timeDiff);
TextView timeLeft = (TextView) mainView.findViewById(R.id.time_left);
TextView leftLabel = (TextView) mainView.findViewById(R.id.left_lbl);
String time = getFormattedTime(timeDiff) + " ";
TextView leftLbl = (TextView) mainView.findViewById(R.id.left_lbl);
timeLeft.setText(time);
if (timeDiff < 0) {
timeLeft.setTextColor(Color.RED);
leftLabel.setTextColor(Color.RED);
leftLabel.setText(R.string.osmand_parking_outdated);
timeLeft.setText(time);
leftLbl.setTextColor(getResources().getColor(R.color.parking_outdated_color));
leftLbl.setText(getString(R.string.osmand_parking_overdue));
} else {
timeLeft.setTextColor(Color.WHITE);
leftLabel.setTextColor(Color.WHITE);
leftLabel.setText(R.string.osmand_parking_time_left);
timeLeft.setText(time);
leftLbl.setTextColor(Color.WHITE);
leftLbl.setText(getString(R.string.osmand_parking_time_left));
}
mainView.findViewById(R.id.left_lbl).setVisibility(View.VISIBLE);
timeLeft.setVisibility(View.VISIBLE);
} else {
((TextView) mainView.findViewById(R.id.time_left)).setText("");
mainView.findViewById(R.id.left_lbl).setVisibility(View.GONE);
descr = getString(R.string.parking_place);
timeLeft.setText("");
timeLeft.setVisibility(View.GONE);
}
((TextView) mainView.findViewById(R.id.name)).setText(parking_name);
((TextView) mainView.findViewById(R.id.name)).setText(descr);
ImageView direction = (ImageView) mainView.findViewById(R.id.direction_icon);
if (loc != null) {
DashLocationView dv = new DashLocationView(direction, (TextView) mainView.findViewById(R.id.distance), position);