This commit is contained in:
GaidamakUA 2015-08-26 10:59:53 +03:00
commit daa5d72033
15 changed files with 89 additions and 54 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -1054,4 +1054,6 @@
<string name="poi_instagram">Instagram</string>
<string name="poi_vk">VKontakte</string>
<string name="poi_google_plus">Google+</string>
<string name="poi_perfumery">Perfumeria</string>
</resources>

View file

@ -1066,6 +1066,6 @@
<string name="poi_instagram">Instagram</string>
<string name="poi_vk">VKontakte</string>
<string name="poi_google_plus">Google+</string>
<string name="poi_perfumery">Parfume butik</string>
<string name="poi_perfumery">Parfumeri</string>
</resources>

View file

@ -2149,5 +2149,5 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
<string name="plugin_settings">Componenti aggiuntivi</string>
<string name="routing_attr_avoid_shuttle_train_name">Evita i treni navetta</string>
<string name="routing_attr_avoid_shuttle_train_description">Evita i treni navetta</string>
<string name="commit_poi">Sottoponi PDI</string>
<string name="commit_poi">Contribuisci il/i PDI</string>
</resources>

View file

@ -2321,4 +2321,29 @@
<string name="rendering_value_purple_name">보라색</string>
<string name="rendering_value_translucent_purple_name">반투명 보라색</string>
<string name="restart_is_required">변화를 완전히 적용 하려면, 수동으로 응용 프로그램을 다시 시작해야 합니다.</string>
</resources>
<string name="plugin_settings">플러그인</string>
<string name="routing_attr_avoid_shuttle_train_name">셔틀 열차 피하기</string>
<string name="routing_attr_avoid_shuttle_train_description">셔틀 열차 피하기</string>
<string name="traffic_warning_hazard">위험</string>
<string name="rendering_value_boldOutline_name">큰 선</string>
<string name="no_updates_available">사용 가능한 업데이트 없음</string>
<string name="download_live_updates">라이브 업데이트</string>
<string name="do_you_like_osmand">OsmAnd를 좋아 합니까?</string>
<string name="we_really_care_about_your_opinion">의견에 대한 많은 관심 부탁드립니다 그리고 우리가 당신의 의견을 듣는 것이 중요합니다.</string>
<string name="rate_this_app">이 앱 평점매기기</string>
<string name="rate_this_app_long">구글 플레이에 OsmAnd을 평가해 주세요</string>
<string name="user_hates_app_get_feedback">우리에게 이유를 가르쳐 쥬세요.</string>
<string name="user_hates_app_get_feedback_long">우리가 이 응용 프로그램에서 무엇을 변경 해야 하는 지 알려 주세요.</string>
<string name="failed_to_upload">업로드 하지 못했습니다.</string>
<string name="delete_change">변경을 삭제합니다</string>
<string name="successfully_uploaded_pattern">성공적으로 업로드 {0}/{1}</string>
<string name="try_again">다시 시도하십시오.</string>
<string name="error_message_pattern">오류: {0}</string>
<string name="dahboard_options_dialog_title">대시보드 옵션</string>
<string name="shared_string_card_was_hidden">카드는 숨겨졌습니다</string>
<string name="shared_string_undo">실행 취소</string>
<string name="shared_string_skip">건너뛰기</string>
<string name="app_name_osmand">OsmAnd</string>
<string name="offline_maps_and_navigation">오프 라인 지도 및 내비게이션</string>
<string name="commit_poi">POI 커밋</string>
</resources>

View file

@ -477,13 +477,17 @@ public class FavouritesDbHelper {
String s2 = o2.getName();
int i1 = Algorithms.extractIntegerNumber(s1);
int i2 = Algorithms.extractIntegerNumber(s2);
if(i1 == i2) {
String ot1 = Algorithms.extractIntegerPrefix(s1);
String ot2 = Algorithms.extractIntegerPrefix(s2);
return collator.compare(ot1, ot2);
String ot1 = Algorithms.extractIntegerPrefix(s1);
String ot2 = Algorithms.extractIntegerPrefix(s2);
int res = collator.compare(ot1, ot2);
if (res == 0) {
res = i1 - i2;
}
return i1 - i2;
if (res == 0) {
res = collator.compare(s1, s2);
}
return res;
}
};
return favoritesComparator;

View file

@ -54,7 +54,7 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
settings = getApplication().getSettings();
OsmandApplication app = getApplication();
favouritesAdapter = new FavouritesAdapter(activity, app.getFavorites().getFavouritePoints(),
!selectFavoriteMode);
false);
setListAdapter(favouritesAdapter);
setHasOptionsMenu(true);

View file

@ -1,5 +1,37 @@
package net.osmand.plus.activities;
import gnu.trove.list.array.TIntArrayList;
import java.io.File;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.osmand.access.AccessibleToast;
import net.osmand.data.FavouritePoint;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.plus.FavouritesDbHelper;
import net.osmand.plus.FavouritesDbHelper.FavoriteGroup;
import net.osmand.plus.GPXUtilities;
import net.osmand.plus.GPXUtilities.GPXFile;
import net.osmand.plus.IconsCache;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.base.FavoriteImageDrawable;
import net.osmand.plus.dialogs.DirectionsDialogs;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.ColorDialogs;
import net.osmand.plus.myplaces.FavoritesActivity;
import net.osmand.util.MapUtils;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
@ -37,39 +69,6 @@ import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import net.osmand.access.AccessibleToast;
import net.osmand.data.FavouritePoint;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.plus.FavouritesDbHelper;
import net.osmand.plus.FavouritesDbHelper.FavoriteGroup;
import net.osmand.plus.GPXUtilities;
import net.osmand.plus.GPXUtilities.GPXFile;
import net.osmand.plus.IconsCache;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.base.FavoriteImageDrawable;
import net.osmand.plus.dialogs.DirectionsDialogs;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.ColorDialogs;
import net.osmand.plus.myplaces.FavoritesActivity;
import net.osmand.util.MapUtils;
import java.io.File;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import gnu.trove.list.array.TIntArrayList;
public class FavoritesTreeFragment extends OsmandExpandableListFragment {
@ -605,6 +604,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
class FavouritesAdapter extends OsmandBaseExpandableListAdapter implements Filterable {
private static final boolean showOptionsButton = false;
Map<FavoriteGroup, List<FavouritePoint>> favoriteGroups = new LinkedHashMap<FavoriteGroup, List<FavouritePoint>>();
List<FavoriteGroup> groups = new ArrayList<FavoriteGroup>();
Filter myFilter;
@ -760,19 +760,23 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
TextView name = (TextView) row.findViewById(R.id.favourite_label);
TextView distanceText = (TextView) row.findViewById(R.id.distance);
ImageView icon = (ImageView) row.findViewById(R.id.favourite_icon);
ImageView options = (ImageView) row.findViewById(R.id.options);
options.setFocusable(false);
options.setImageDrawable(getMyApplication().getIconsCache()
.getContentIcon(R.drawable.ic_overflow_menu_white));
options.setVisibility(View.VISIBLE);
final FavouritePoint model = (FavouritePoint) getChild(groupPosition, childPosition);
row.setTag(model);
options.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showItemPopupOptionsMenu(model, v);
}
});
if (showOptionsButton) {
ImageView options = (ImageView) row.findViewById(R.id.options);
options.setFocusable(false);
options.setImageDrawable(getMyApplication().getIconsCache().getContentIcon(
R.drawable.ic_overflow_menu_white));
options.setVisibility(View.VISIBLE);
options.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showItemPopupOptionsMenu(model, v);
}
});
}
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(getActivity(), model.getColor(), 0));
LatLon lastKnownMapLocation = getMyApplication().getSettings().getLastKnownMapLocation();
int dist = (int) (MapUtils.getDistance(model.getLatitude(), model.getLongitude(),