Merge branch 'master' of ssh://github.com/osmandapp/Osmand
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
BIN
OsmAnd/res/drawable-large/list_stop.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large/list_traffic_calming.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
|
@ -7,9 +7,9 @@
|
|||
android:gravity="center_vertical" android:focusable="false" />
|
||||
</LinearLayout>
|
||||
<TextView android:id="@+id/download_item" android:gravity="center_vertical" android:layout_width="0dp" android:layout_height="wrap_content"
|
||||
android:maxLines="7" android:layout_weight="1" style="@style/ListText.Small"></TextView>
|
||||
android:maxLines="7" android:layout_weight="1" style="@style/ListText.Small"/>
|
||||
|
||||
<TextView android:id="@+id/download_descr" android:layout_marginLeft="3dp" android:gravity="right" android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" style="@style/ListText.Small"></TextView>
|
||||
android:layout_height="wrap_content" style="@style/ListText.Small"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1887,4 +1887,12 @@ La llista de països inclosos (bàsicament tot el món!): Afganistan, Albània,
|
|||
<string name="confirm_every_run">Es demana confirmació</string>
|
||||
<string name="save_global_track_interval_descr">Trieu l\'interval d\'enregistrament general de les traces (s\'activa mitjançant el giny de gravació de GPX del mapa)</string>
|
||||
<string name="save_global_track_interval">Interval d\'enregistrament general</string>
|
||||
<string name="traffic_warning_speed_limit">Velocitat màxima</string>
|
||||
<string name="traffic_warning_border_control">Control de fronteres</string>
|
||||
<string name="traffic_warning_payment">Estació de peatge</string>
|
||||
<string name="traffic_warning_stop">Senyal de stop</string>
|
||||
<string name="traffic_warning_calming">Ressalt</string>
|
||||
<string name="traffic_warning_speed_camera">Càmera de control de velocitat</string>
|
||||
<string name="traffic_warning">Avís de circulació</string>
|
||||
<string name="local_index_description">Premeu qualsevol indicació existent per veure més detalls, mantingueu premuda per desactivar o esborrar. Dades actuals al dispositiu (%1$s lliure):</string>
|
||||
</resources>
|
||||
|
|
|
@ -1984,8 +1984,9 @@ Afghanistan, Albanien, Algeriet, Andorra, Angola, Anguilla, Antigua og Barbuda,
|
|||
<string name="traffic_warning_speed_limit">Hastighedsgrænse</string>
|
||||
<string name="traffic_warning_border_control">Grænsekontrol</string>
|
||||
<string name="traffic_warning_payment">Betalingsveje</string>
|
||||
<string name="traffic_warning_stop">Stop</string>
|
||||
<string name="traffic_warning_stop">Stopskilt</string>
|
||||
<string name="traffic_warning_calming">Hastighedsnedsættende</string>
|
||||
<string name="traffic_warning_speed_camera">Fotofælde</string>
|
||||
<string name="traffic_warning">Trafikadvarsel</string>
|
||||
<string name="local_index_description">Klik på et eksisterende element for at se flere detaljer, tryk på og hold nede for at deaktivere eller slette. Aktuelle data på enhed (%1$s fri):</string>
|
||||
</resources>
|
||||
|
|
|
@ -1820,4 +1820,11 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
|
|||
<string name="confirm_every_run">Toujours demander</string>
|
||||
<string name="save_global_track_interval_descr">Choisir l\'intervalle d\'enregistrement pour l\'enregistrement des traces (activer via le gadget d\'enregistrement GPX sur l\'écran principal)</string>
|
||||
<string name="save_global_track_interval">Intervalle d\'enregistrement par défaut</string>
|
||||
<string name="traffic_warning_speed_limit">Limite de vitesse</string>
|
||||
<string name="traffic_warning_border_control">Contrôle aux frontières</string>
|
||||
<string name="traffic_warning_payment">Barrière de péage</string>
|
||||
<string name="traffic_warning_stop">Stop</string>
|
||||
<string name="traffic_warning_calming">Ralentisseur</string>
|
||||
<string name="traffic_warning_speed_camera">Radar de vitesse</string>
|
||||
<string name="traffic_warning">Alerte de circulation</string>
|
||||
</resources>
|
||||
|
|
|
@ -1981,4 +1981,6 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
|
|||
<string name="confirm_every_run">Chiedi sempre</string>
|
||||
<string name="save_global_track_interval_descr">Scegli l\'intervallo di tempo generale per la registrazione del percorso (abilitata attraverso il widget registrazione GPX sulla mappa)</string>
|
||||
<string name="save_global_track_interval">Intervallo generale di registrazione</string>
|
||||
</resources>
|
||||
<string name="traffic_warning_speed_limit">Limite di velocità</string>
|
||||
<string name="traffic_warning_payment">Casello</string>
|
||||
</resources>
|
||||
|
|
|
@ -2102,4 +2102,12 @@ Vanuatu, Venezuela, Vietnam, Wallis and Futuna, Western Sahara, Yemen, Zambia, Z
|
|||
<string name="confirm_every_run">항상 요청</string>
|
||||
<string name="save_global_track_interval_descr">일반 트랙 레코딩에 대한 로깅 간격을 선택합니다 (지도에 GPX 레코딩 위젯을 통해 사용 가능)</string>
|
||||
<string name="save_global_track_interval">일반 로깅 간격</string>
|
||||
<string name="traffic_warning_speed_limit">속도 제한</string>
|
||||
<string name="traffic_warning_border_control">국경 통제</string>
|
||||
<string name="traffic_warning_payment">톨게이트 부스</string>
|
||||
<string name="traffic_warning_stop">정지 신호</string>
|
||||
<string name="traffic_warning_calming">교통량 감소</string>
|
||||
<string name="traffic_warning_speed_camera">속도 경고 카메라</string>
|
||||
<string name="traffic_warning">트래픽 경고</string>
|
||||
<string name="local_index_description">기존 항목을 클릭하여 더 많은 정보를 보세요. 비활성화 하려면 꾹 눌러주시거나 삭제하세요. 현재 데이터는 (%1$ s 무료):</string>
|
||||
</resources>
|
||||
|
|
|
@ -1969,4 +1969,5 @@ Afghanistan, Albanie, Algerije, Andorra, Angola, Anguilla, Antigua en Barbuda, A
|
|||
<string name="traffic_warning_calming">Verkeersdrempel</string>
|
||||
<string name="traffic_warning_speed_camera">Snelheidscontrole</string>
|
||||
<string name="traffic_warning">Filemelding</string>
|
||||
<string name="local_index_description">Tik om details te bekijken; houd ingedrukt om uit te schakelen of te verwijderen. Huidige gegevens op het toestel (%1$s beschikbaar):</string>
|
||||
</resources>
|
||||
|
|
|
@ -1732,4 +1732,7 @@ Si cussigiat de annànghere unu o prus puntos intermedios pro megiorare sas pres
|
|||
<string name="confirm_every_run">Pregunta semper</string>
|
||||
<string name="save_global_track_interval">Intervallu de registratzione generale</string>
|
||||
<string name="save_global_track_interval_descr">Issèbera s\'intervallu pro sa registratzione generale de sas rastas (abilitadu tramite su widget registratzione GPX in sa mapa)</string>
|
||||
</resources>
|
||||
<string name="traffic_warning_speed_limit">Limite de lestresa</string>
|
||||
<string name="traffic_warning_payment">Casellu</string>
|
||||
<string name="traffic_warning_stop">Cartellu Stop</string>
|
||||
</resources>
|
||||
|
|
|
@ -1967,9 +1967,9 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
|
|||
<string name="flat_list_waypoitns">Všetky</string>
|
||||
<string name="waypoints">Prechodné body</string>
|
||||
<string name="targets">Ciele</string>
|
||||
<string name="way_alarms">Prekážky</string>
|
||||
<string name="speak_favorites">Oznamovať obľúbené</string>
|
||||
<string name="speak_poi">Oznamovať body záujmu</string>
|
||||
<string name="way_alarms">Dopravné varovania</string>
|
||||
<string name="speak_favorites">Oznamovať blízke obľúbené body</string>
|
||||
<string name="speak_poi">Oznamovať blízke body záujmu</string>
|
||||
<string name="flat_list_waypoints">Všetky</string>
|
||||
<string name="index_tours">Výlety</string>
|
||||
<string name="record_plugin_description">Uložte vaše stopy jedným stlačením tlačidla na mape. Zobrazte nastavenia pre zaznamenanie výletov do lokálneho GPX súboru alebo na webovú službu.</string>
|
||||
|
@ -1984,4 +1984,12 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
|
|||
<string name="save_track_to_gpx_globally_descr">Zaznamenávanie polohy do GPX súboru môže byť zapnuté a vypnuté cez tlačidlo záznamu GPX na obrazovke mapy</string>
|
||||
<string name="save_track_interval_globally">Interval zaznamenávania</string>
|
||||
<string name="rendering_attr_publicTransportMode_name">Režim hromadnej dopravy</string>
|
||||
<string name="traffic_warning_speed_limit">Obmedzenie rýchlosti</string>
|
||||
<string name="traffic_warning_border_control">Hraničná kontrola</string>
|
||||
<string name="traffic_warning_payment">Mýtna stanica</string>
|
||||
<string name="traffic_warning_stop">Značka \"Stop\"</string>
|
||||
<string name="traffic_warning_calming">Spomaľovač</string>
|
||||
<string name="traffic_warning_speed_camera">Rýchlostný radar/kamera</string>
|
||||
<string name="traffic_warning">Dopravné varovanie</string>
|
||||
<string name="local_index_description">Kliknite na existujúcu položku pre zobrazenie detailov. Podržte pre vypnutie alebo odstránenie. Dát je v súčasnosti na zariadení (%1$s voľné):</string>
|
||||
</resources>
|
||||
|
|
|
@ -1691,7 +1691,7 @@
|
|||
<string name="traffic_warning_speed_limit">Hastighetsbegränsning</string>
|
||||
<string name="traffic_warning_border_control">Gränskontroll</string>
|
||||
<string name="traffic_warning_payment">Vägavgiftshytt</string>
|
||||
<string name="traffic_warning_stop">Stopp</string>
|
||||
<string name="traffic_warning_stop">Stopptecken</string>
|
||||
<string name="traffic_warning">Trafikvarning</string>
|
||||
<string name="traffic_warning_speed_camera">Fartkamera</string>
|
||||
<string name="traffic_warning_calming">Trafikdämpning</string>
|
||||
|
|
|
@ -1828,8 +1828,9 @@
|
|||
<string name="traffic_warning_speed_limit">速限</string>
|
||||
<string name="traffic_warning_border_control">邊境管制</string>
|
||||
<string name="traffic_warning_payment">收費站</string>
|
||||
<string name="traffic_warning_stop">停止</string>
|
||||
<string name="traffic_warning_stop">停車標誌</string>
|
||||
<string name="traffic_warning_calming">交通寧靜區</string>
|
||||
<string name="traffic_warning_speed_camera">測速照相</string>
|
||||
<string name="traffic_warning">交通流量警示</string>
|
||||
<string name="local_index_description">點觸任何現有的項目,查看更詳細的資訊,長按則停用或刪除。目前在裝置上的資料有 (%1$s 可用):</string>
|
||||
</resources>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<string name="traffic_warning_speed_limit">Speed limit</string>
|
||||
<string name="traffic_warning_border_control">Border control</string>
|
||||
<string name="traffic_warning_payment">Toll booth</string>
|
||||
<string name="traffic_warning_stop">Stop</string>
|
||||
<string name="traffic_warning_stop">Stop sign</string>
|
||||
<string name="traffic_warning_calming">Traffic calming</string>
|
||||
<string name="traffic_warning_speed_camera">Speed camera</string>
|
||||
<string name="traffic_warning">Traffic warning</string>
|
||||
|
@ -1100,7 +1100,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
|
|||
<string name="offline_navigation_not_available">OsmAnd offline navigation is temporarily not available.</string>
|
||||
<string name="left_side_navigation">Left-hand driving</string>
|
||||
<string name="left_side_navigation_descr">Select for countries with left-hand traffic</string>
|
||||
<string name="download_link_and_local_description">Click here to download or update offline map files. \nClick any existing item to see more details, press and hold to deactivate or delete. Current data on device (%1$s free):</string>
|
||||
<string name="local_index_description">Click any existing item to see more details, press and hold to deactivate or delete. Current data on device (%1$s free):</string>
|
||||
<string name="unknown_from_location">Starting point is not yet determined</string>
|
||||
<string name="unknown_location">Position not yet known</string>
|
||||
<string name="modify_transparency">Modify transparency (0 - transparent, 255 - opaque)</string>
|
||||
|
|
|
@ -820,12 +820,12 @@ public class OsmandSettings {
|
|||
public final OsmandPreference<Boolean> GPX_ROUTE_CALC = new BooleanPreference("calc_gpx_route", false).makeGlobal().cache();
|
||||
|
||||
|
||||
public final OsmandPreference<Boolean> ANNOUNCE_WPT = new BooleanPreference("announce_wpt", true).makeGlobal().cache();
|
||||
public final OsmandPreference<Boolean> ANNOUNCE_NEARBY_FAVORITES = new BooleanPreference("announce_nearby_favorites", true).makeProfile().cache();
|
||||
public final OsmandPreference<Boolean> ANNOUNCE_NEARBY_FAVORITES = new BooleanPreference("announce_nearby_favorites", false).makeProfile().cache();
|
||||
public final OsmandPreference<Boolean> ANNOUNCE_NEARBY_POI = new BooleanPreference("announce_nearby_poi", false).makeProfile().cache();
|
||||
public final OsmandPreference<Boolean> SHOW_WPT = new BooleanPreference("show_gpx_wpt", true).makeGlobal().cache();
|
||||
public final OsmandPreference<Boolean> SHOW_NEARBY_POI = new BooleanPreference("show_nearby_poi", false).makeGlobal().cache();
|
||||
public final OsmandPreference<Boolean> ANNOUNCE_WPT = new BooleanPreference("announce_wpt", true).makeGlobal().cache();
|
||||
public final OsmandPreference<Boolean> SHOW_NEARBY_FAVORITES = new BooleanPreference("show_nearby_favorites", false).makeGlobal().cache();
|
||||
public final OsmandPreference<Boolean> SHOW_NEARBY_POI = new BooleanPreference("show_nearby_poi", false).makeGlobal().cache();
|
||||
public final OsmandPreference<Boolean> SHOW_WPT = new BooleanPreference("show_gpx_wpt", true).makeGlobal().cache();
|
||||
|
||||
public final OsmandPreference<Boolean> AVOID_TOLL_ROADS = new BooleanPreference("avoid_toll_roads", false).makeProfile().cache();
|
||||
public final OsmandPreference<Boolean> AVOID_MOTORWAY = new BooleanPreference("avoid_motorway", false).makeProfile().cache();
|
||||
|
|
|
@ -13,6 +13,7 @@ import android.view.View;
|
|||
import android.widget.*;
|
||||
import com.actionbarsherlock.app.ActionBar;
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
import com.actionbarsherlock.view.Window;
|
||||
import net.osmand.plus.*;
|
||||
import net.osmand.plus.activities.FavouritesActivity;
|
||||
import net.osmand.plus.base.BasicProgressAsyncTask;
|
||||
|
@ -52,7 +53,8 @@ public class DownloadActivity extends SherlockFragmentActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
getMyApplication().applyTheme(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
||||
setProgressBarIndeterminateVisibility(false);
|
||||
|
||||
setContentView(R.layout.tab_content);
|
||||
OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings();
|
||||
|
@ -124,6 +126,7 @@ public class DownloadActivity extends SherlockFragmentActivity {
|
|||
}
|
||||
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -236,6 +236,12 @@ public class DownloadIndexAdapter extends OsmandBaseExpandableListAdapter implem
|
|||
v = inflater.inflate(net.osmand.plus.R.layout.download_index_list_item, parent, false);
|
||||
}
|
||||
final View row = v;
|
||||
row.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
downloadFragment.onChildClick(downloadFragment.getExpandableListView(), row, groupPosition, childPosition, getChildId(groupPosition, childPosition));
|
||||
}
|
||||
});
|
||||
TextView item = (TextView) row.findViewById(R.id.download_item);
|
||||
TextView description = (TextView) row.findViewById(R.id.download_descr);
|
||||
IndexItem e = (IndexItem) getChild(groupPosition, childPosition);
|
||||
|
|
|
@ -67,7 +67,8 @@ public class DownloadIndexFragment extends OsmandExpandableListFragment {
|
|||
listView.setAdapter(listAdapter);
|
||||
setListView(listView);
|
||||
|
||||
//getSupportActionBar().setTitle(R.string.local_index_download);
|
||||
|
||||
getDownloadActivity().getSupportActionBar().setTitle(R.string.local_index_download);
|
||||
// recreation upon rotation is pgetaprevented in manifest file
|
||||
|
||||
filterText = (EditText) view.findViewById(R.id.search_box);
|
||||
|
@ -331,7 +332,7 @@ public class DownloadIndexFragment extends OsmandExpandableListFragment {
|
|||
|
||||
@Override
|
||||
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
|
||||
final IndexItem e = (IndexItem) listAdapter.getChild(groupPosition, childPosition);
|
||||
final IndexItem e = listAdapter.getChild(groupPosition, childPosition);
|
||||
final CheckBox ch = (CheckBox) v.findViewById(R.id.check_download_item);
|
||||
|
||||
if(ch.isChecked()){
|
||||
|
|
|
@ -103,6 +103,7 @@ public class DownloadIndexesThread {
|
|||
app.getResourceManager().getBackupIndexes(indexFileNames);
|
||||
this.indexFileNames = indexFileNames;
|
||||
this.indexActivatedFileNames = indexActivatedFileNames;
|
||||
//updateFilesToDownload();
|
||||
}
|
||||
|
||||
public Map<String, String> getDownloadedIndexFileNames() {
|
||||
|
@ -504,7 +505,7 @@ public class DownloadIndexesThread {
|
|||
DownloadIndexAdapter a = ((DownloadIndexAdapter) uiFragment.getExpandableListAdapter());
|
||||
a.setLoadedFiles(indexActivatedFileNames, indexFileNames);
|
||||
a.setIndexFiles(filtered, cats);
|
||||
prepareFilesToDownload(filtered);
|
||||
prepareFilesToUpdate(filtered);
|
||||
a.notifyDataSetChanged();
|
||||
a.getFilter().filter(uiFragment.getFilterText());
|
||||
if ((type == DownloadActivityType.SRTM_COUNTRY_FILE || type == DownloadActivityType.HILLSHADE_FILE)
|
||||
|
@ -545,7 +546,17 @@ public class DownloadIndexesThread {
|
|||
execute(inst, new Void[0]);
|
||||
}
|
||||
|
||||
private void prepareFilesToDownload(List<IndexItem> filtered) {
|
||||
private void updateFilesToDownload(){
|
||||
for (IndexItem item : itemsToUpdate){
|
||||
for (String key : indexFileNames.keySet()){
|
||||
if (item.getFileName().equals(indexFileNames.get(key))){
|
||||
itemsToUpdate.remove(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void prepareFilesToUpdate(List<IndexItem> filtered) {
|
||||
itemsToUpdate.clear();
|
||||
for (IndexItem item : filtered) {
|
||||
String sfName = item.getTargetFileName();
|
||||
|
|
|
@ -10,6 +10,8 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import com.actionbarsherlock.app.ActionBar;
|
||||
import com.actionbarsherlock.view.*;
|
||||
import net.osmand.IProgress;
|
||||
|
@ -71,6 +73,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
|||
private ContextMenuAdapter optionsMenuAdapter;
|
||||
private ActionMode actionMode;
|
||||
|
||||
private TextView descriptionText;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.local_index, container, false);
|
||||
|
@ -83,6 +87,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
|||
listView.setAdapter(listAdapter);
|
||||
setListView(listView);
|
||||
//getDownloadActivity().getSupportActionBar().setLogo(R.drawable.tab_download_screen_icon);
|
||||
descriptionText = (TextView) view.findViewById(R.id.DescriptionText);
|
||||
updateDescriptionTextWithSize();
|
||||
return view;
|
||||
}
|
||||
|
||||
|
@ -93,7 +99,6 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
|||
|
||||
descriptionLoader = new LoadLocalIndexDescriptionTask();
|
||||
|
||||
updateDescriptionTextWithSize();
|
||||
if (asyncLoader == null || asyncLoader.getResult() == null) {
|
||||
// getLastNonConfigurationInstance method should be in onCreate() method
|
||||
// (onResume() doesn't work)
|
||||
|
@ -456,6 +461,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
|||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
//fixes issue when local files not shown after switching tabs
|
||||
reloadIndexes();
|
||||
ActionBar actionBar = getDownloadActivity().getSupportActionBar();
|
||||
//hide action bar from downloadindexfragment
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
|
||||
|
@ -503,17 +510,14 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
if(operationTask == null || operationTask.getStatus() == AsyncTask.Status.FINISHED){
|
||||
menu.setGroupVisible(0, true);
|
||||
} else {
|
||||
menu.setGroupVisible(0, false);
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
// if(operationTask == null || operationTask.getStatus() == Status.FINISHED){
|
||||
// menu.setGroupVisible(0, true);
|
||||
// } else {
|
||||
// menu.setGroupVisible(0, false);
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int itemId = item.getItemId();
|
||||
|
@ -606,8 +610,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
|||
@Override
|
||||
public void onDestroyActionMode(ActionMode mode) {
|
||||
selectionMode = false;
|
||||
//findViewById(R.id.DescriptionText).setVisibility(View.VISIBLE);
|
||||
//updateDescriptionTextWithSize();
|
||||
descriptionText.setVisibility(View.VISIBLE);
|
||||
updateDescriptionTextWithSize();
|
||||
listAdapter.cancelFilter();
|
||||
collapseAllGroups();
|
||||
listAdapter.notifyDataSetChanged();
|
||||
|
@ -625,32 +629,16 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
|||
StatFs fs = new StatFs(dir.getAbsolutePath());
|
||||
size = formatGb.format(new Object[]{(float) (fs.getAvailableBlocks()) * fs.getBlockSize() / (1 << 30) });
|
||||
}
|
||||
//TextView ds = (TextView) findViewById(R.id.DescriptionText);
|
||||
String text = getString(R.string.download_link_and_local_description, size);
|
||||
|
||||
String text = getString(R.string.local_index_description, size);
|
||||
int l = text.indexOf('.');
|
||||
if(l == -1) {
|
||||
l = text.length();
|
||||
}
|
||||
SpannableString content = new SpannableString(text);
|
||||
content.setSpan(new ClickableSpan() {
|
||||
@Override
|
||||
public void onClick(View widget) {
|
||||
asyncLoader.setResult(null);
|
||||
startActivity(new Intent(getDownloadActivity(), DownloadIndexFragment.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDrawState(TextPaint ds) {
|
||||
super.updateDrawState(ds);
|
||||
// ds.setColor(Color.GREEN);
|
||||
}
|
||||
}, 0, l, 0);
|
||||
//ds.setText(content);
|
||||
//ds.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
descriptionText.setText(text);
|
||||
descriptionText.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void localOptionsMenu(final int itemId) {
|
||||
if (itemId == R.string.local_index_download) {
|
||||
asyncLoader.setResult(null);
|
||||
|
|
|
@ -82,7 +82,7 @@ public class UpdatesIndexFragment extends SherlockListFragment {
|
|||
TextView name = (TextView) v.findViewById(R.id.download_item);
|
||||
TextView description = (TextView) v.findViewById(R.id.download_descr);
|
||||
IndexItem e = items.get(position);
|
||||
String eName = e.getVisibleDescription(getMyApplication()) + "\n" + e.getVisibleName(getMyApplication(), osmandRegions);
|
||||
String eName = e.getVisibleName(getMyApplication(), osmandRegions);
|
||||
name.setText(eName.trim()); //$NON-NLS-1$
|
||||
String d = e.getDate(format) + "\n" + e.getSizeDescription(getMyApplication());
|
||||
description.setText(d);
|
||||
|
|
|
@ -613,14 +613,10 @@ public class WaypointHelper {
|
|||
}
|
||||
|
||||
public boolean showAlarms() {
|
||||
//I think here only traffic warnings other than the speed cam are needed. speed cam setting is a separate setting for explicit allow/disallow by user.
|
||||
//return app.getSettings().SHOW_CAMERAS.get() || app.getSettings().SHOW_TRAFFIC_WARNINGS.get();
|
||||
return app.getSettings().SHOW_TRAFFIC_WARNINGS.get();
|
||||
}
|
||||
|
||||
public boolean announceAlarms() {
|
||||
//I think here only traffic warnings other than the speed cam are needed. speed cam setting is a separate setting for explicit allow/disallow by user.
|
||||
//return app.getSettings().SPEAK_SPEED_CAMERA.get() || app.getSettings().SPEAK_TRAFFIC_WARNINGS.get();
|
||||
return app.getSettings().SPEAK_TRAFFIC_WARNINGS.get();
|
||||
}
|
||||
|
||||
|
@ -674,7 +670,12 @@ public class WaypointHelper {
|
|||
} else if(type == FAVORITES || type == WAYPOINTS) {
|
||||
return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor());
|
||||
} else if(type == ALARMS) {
|
||||
return null;
|
||||
//TODO: Looks like this does not work yet, not sure why:
|
||||
if(RenderingIcons.containsBigIcon("list_" + ((AlarmInfo) point).getType().toString().toLowerCase())) {
|
||||
return uiCtx.getResources().getDrawable(RenderingIcons.getBigIconResourceId("list_" + ((AlarmInfo) point).getType().toString().toLowerCase()));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -686,10 +686,10 @@ public class RouteInfoWidgetsFactory {
|
|||
} else if(alarm.getType() == AlarmInfoType.TOLL_BOOTH) {
|
||||
text = "$";
|
||||
} else if(alarm.getType() == AlarmInfoType.TRAFFIC_CALMING) {
|
||||
locimgId = R.drawable.warnings_speed_bump;
|
||||
locimgId = R.drawable.warnings_traffic_calming;
|
||||
text = "";
|
||||
} else if(alarm.getType() == AlarmInfoType.STOP) {
|
||||
locimgId = R.drawable.warnings_stop_sign;
|
||||
locimgId = R.drawable.warnings_stop;
|
||||
text = "";
|
||||
//text = "STOP";
|
||||
}
|
||||
|
|