Fixes osm editing
This commit is contained in:
parent
6a8004af43
commit
27eb829848
6 changed files with 26 additions and 20 deletions
|
@ -32,7 +32,7 @@
|
|||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:text="@string/tag_poi_name"
|
||||
android:textColor="@color/dashboard_black"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
osmand:typeface="@string/font_roboto_regular"/>
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
|||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:text="@string/tag_poi_amenity"
|
||||
android:textColor="@color/dashboard_black"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
osmand:typeface="@string/font_roboto_regular"/>
|
||||
|
||||
|
|
|
@ -2256,4 +2256,5 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
|
|||
<string name="poi_dialog_poi_type">POI Type</string>
|
||||
<string name="number_of_rows_in_dash">Number of rows in dash %1$s</string>
|
||||
<string name="please_specify_poi_type">Please specify POI type.</string>
|
||||
<string name="working_days">Working days</string>
|
||||
</resources>
|
||||
|
|
|
@ -78,19 +78,19 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks {
|
|||
|
||||
private static final DashFragmentData[] fragmentsData = new DashFragmentData[]{
|
||||
new DashFragmentData(DashRateUsFragment.TAG, DashRateUsFragment.class,
|
||||
"Rate us", rateUsShouldShow, true, 0),
|
||||
-1, rateUsShouldShow, true, 0),
|
||||
new DashFragmentData(DashFirstTimeFragment.TAG, DashFirstTimeFragment.class,
|
||||
"First time", firstTimeShouldShow, true, 1),
|
||||
-1, firstTimeShouldShow, true, 1),
|
||||
new DashFragmentData(DashChooseAppDirFragment.TAG, DashChooseAppDirFragment.class,
|
||||
"Choose app dir", chooseAppDirShouldShow, true, 2),
|
||||
-1, chooseAppDirShouldShow, true, 2),
|
||||
new DashFragmentData(DashErrorFragment.TAG, DashErrorFragment.class,
|
||||
"Error", errorShouldShow, true, 3),
|
||||
-1, errorShouldShow, true, 3),
|
||||
new DashFragmentData(DashNavigationFragment.TAG, DashNavigationFragment.class,
|
||||
"Navigation", 4),
|
||||
R.string.tip_navigation, 4),
|
||||
new DashFragmentData(DashWaypointsFragment.TAG, DashWaypointsFragment.class,
|
||||
"Waypoints", 6),
|
||||
R.string.waypoints, 6),
|
||||
new DashFragmentData(DashSearchFragment.TAG, DashSearchFragment.class,
|
||||
"Search", 7),
|
||||
R.string.shared_string_search, 7),
|
||||
new DashFragmentData(DashRecentsFragment.TAG, DashRecentsFragment.class,
|
||||
"Recent places", 8),
|
||||
new DashFragmentData(DashFavoritesFragment.TAG, DashFavoritesFragment.class,
|
||||
|
|
|
@ -10,18 +10,18 @@ import net.osmand.plus.dashboard.DashboardOnMap;
|
|||
public final class DashFragmentData implements Comparable<DashFragmentData> {
|
||||
public final String tag;
|
||||
public final Class<? extends DashBaseFragment> fragmentClass;
|
||||
public final String title;
|
||||
public final int titleStringId;
|
||||
public final ShouldShowFunction shouldShowFunction;
|
||||
public final boolean customDeletionLogic;
|
||||
public final int position;
|
||||
public final String rowNumberTag;
|
||||
|
||||
public DashFragmentData(String tag, Class<? extends DashBaseFragment> fragmentClass,
|
||||
String title, ShouldShowFunction shouldShowFunction,
|
||||
int titleStringId, ShouldShowFunction shouldShowFunction,
|
||||
boolean customDeletionLogic, int position, String rowNumberTag) {
|
||||
this.tag = tag;
|
||||
this.fragmentClass = fragmentClass;
|
||||
this.title = title;
|
||||
this.titleStringId = titleStringId;
|
||||
this.shouldShowFunction = shouldShowFunction;
|
||||
this.customDeletionLogic = customDeletionLogic;
|
||||
this.position = position;
|
||||
|
@ -29,19 +29,19 @@ public final class DashFragmentData implements Comparable<DashFragmentData> {
|
|||
}
|
||||
|
||||
public DashFragmentData(String tag, Class<? extends DashBaseFragment> fragmentClass,
|
||||
String title, ShouldShowFunction shouldShowFunction,
|
||||
int titleStringId, ShouldShowFunction shouldShowFunction,
|
||||
boolean customDeletionLogic, int position) {
|
||||
this(tag, fragmentClass, title, shouldShowFunction, customDeletionLogic, position, null);
|
||||
this(tag, fragmentClass, titleStringId, shouldShowFunction, customDeletionLogic, position, null);
|
||||
}
|
||||
|
||||
public DashFragmentData(String tag, Class<? extends DashBaseFragment> fragmentClass,
|
||||
String title, ShouldShowFunction shouldShowFunction, int position) {
|
||||
this(tag, fragmentClass, title, shouldShowFunction, false, position, null);
|
||||
int titleStringId, ShouldShowFunction shouldShowFunction, int position) {
|
||||
this(tag, fragmentClass, titleStringId, shouldShowFunction, false, position, null);
|
||||
}
|
||||
|
||||
public DashFragmentData(String tag, Class<? extends DashBaseFragment> fragmentClass,
|
||||
String title, int position) {
|
||||
this(tag, fragmentClass, title, new DashboardOnMap.DefaultShouldShow(), false, position,
|
||||
int titleStringId, int position) {
|
||||
this(tag, fragmentClass, titleStringId, new DashboardOnMap.DefaultShouldShow(), false, position,
|
||||
null);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class OpeningHoursDaysDialogFragment extends DialogFragment {
|
|||
final int pos = (d + 5) % 7;
|
||||
dayToShow[i] = item.getDays()[pos];
|
||||
}
|
||||
builder.setTitle("Working days");
|
||||
builder.setTitle(getResources().getString(R.string.working_days));
|
||||
builder.setMultiChoiceItems(daysToShow, dayToShow, new DialogInterface.OnMultiChoiceClickListener() {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -74,13 +74,18 @@ public class OpeningHoursHoursDialogFragment extends DialogFragment {
|
|||
float density = getActivity().getResources().getDisplayMetrics().density;
|
||||
int paddingInPx = (int) (paddingInDp * density);
|
||||
|
||||
final TypedValue textColorTypedValue = new TypedValue();
|
||||
getActivity().getTheme().resolveAttribute(android.R.attr.textColorPrimary,
|
||||
textColorTypedValue, true);
|
||||
int textColor = textColorTypedValue.data;
|
||||
|
||||
TextView titleTextView = new TextView(getActivity());
|
||||
titleTextView.setText(isStart ? getActivity().getString(R.string.opening_at)
|
||||
: getActivity().getString(R.string.closing_at));
|
||||
titleTextView.setPadding(paddingInPx, paddingInPx, paddingInPx, paddingInPx);
|
||||
titleTextView.setGravity(Gravity.CENTER_VERTICAL);
|
||||
titleTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
|
||||
titleTextView.setTextColor(getActivity().getResources().getColor(R.color.color_black));
|
||||
titleTextView.setTextColor(textColor);
|
||||
Typeface typeface = titleTextView.getTypeface();
|
||||
titleTextView.setTypeface(typeface, Typeface.BOLD);
|
||||
builder.setCustomTitle(titleTextView);
|
||||
|
|
Loading…
Reference in a new issue