fixing small bugs

git-svn-id: https://osmand.googlecode.com/svn/trunk@210 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-06-27 11:50:08 +00:00
parent 95e0259004
commit 2e11edddf8
4 changed files with 16 additions and 5 deletions

View file

@ -7,7 +7,7 @@
android:layout_width="80dp" android:layout_height="fill_parent" android:gravity="left"
android:textSize="20px"/>
<TextView android:id="@+id/label" android:layout_weight="1" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:textSize="20px" />
android:layout_height="wrap_content" android:textSize="20px" />
<ImageButton android:id="@+id/remove" android:layout_width="wrap_content" android:background="@drawable/reset"
android:paddingLeft="2px" android:paddingRight="2px"
android:paddingTop="2px" android:layout_height="wrap_content" />

View file

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="search_history_city">Город : {0}</string>
<string name="search_history_street">Улица : {0}, {1}</string>
<string name="search_history_int_streets">Пересечение улиц : {0} x {1} в {2}</string>
<string name="search_history_building">Здание : {0}, {1}, {2}</string>
<string name="search_history_navigate_to">Переместиться в широта = {0}, долгота= {1}</string>
<string name="favorite">Избранное</string>
<string name="clear_all">Очистить все</string>
<string name="history">История</string>
<string name="uploading_data">Загрузка данных...</string>

View file

@ -194,17 +194,20 @@ public class SearchAddressActivity extends Activity {
}
if(inters != null){
l = inters.getLatLon();
String cityName = postcode != null? postcode.getName() : city.getName(en);
historyName = MessageFormat.format(getString(R.string.search_history_int_streets),
street.getName(en), street2.getName(en), city.getName(en));
street.getName(en), street2.getName(en), cityName);
zoom = 16;
}
} else if (building != null) {
l = building.getLocation();
historyName = MessageFormat.format(getString(R.string.search_history_building), building.getName(en), street.getName(en), city.getName(en));
String cityName = postcode != null? postcode.getName() : city.getName(en);
historyName = MessageFormat.format(getString(R.string.search_history_building), building.getName(en), street.getName(en), cityName);
zoom = 16;
} else if (street != null) {
l = street.getLocation();
historyName = MessageFormat.format(getString(R.string.search_history_street), street.getName(en), city.getName(en));
String cityName = postcode != null? postcode.getName() : city.getName(en);
historyName = MessageFormat.format(getString(R.string.search_history_street), street.getName(en), cityName);
zoom = 14;
} else if (city != null) {
l = city.getLocation();

View file

@ -114,7 +114,9 @@ public class SearchHistoryHelper {
if(i == loadedEntries.size()){
i = -1;
}
if (i != 0) {
updateModelAt(model, helper, i);
}
helper.close();
return model;
}