diff --git a/OsmAnd/res/layout/fragment_edit_poi.xml b/OsmAnd/res/layout/fragment_edit_poi.xml
index 3da904aca7..859edef257 100644
--- a/OsmAnd/res/layout/fragment_edit_poi.xml
+++ b/OsmAnd/res/layout/fragment_edit_poi.xml
@@ -8,6 +8,15 @@
android:orientation="vertical"
tools:context="net.osmand.plus.osmedit.EditPoiFragment"
android:clickable="true">
+
-
-
-
+ android:layout_marginRight="16dp">
@@ -100,7 +98,8 @@
android:background="@color/color_white"
app:tabIndicatorColor="@color/osmand_orange"
app:tabSelectedTextColor="@color/osmand_orange"
- app:tabTextColor="@android:color/darker_gray"/>
+ app:tabTextColor="@android:color/darker_gray"
+ app:layout_scrollFlags="scroll"/>
diff --git a/OsmAnd/res/layout/fragment_edit_poi_advanced.xml b/OsmAnd/res/layout/fragment_edit_poi_advanced.xml
index d1859b17f5..4139f5aedb 100644
--- a/OsmAnd/res/layout/fragment_edit_poi_advanced.xml
+++ b/OsmAnd/res/layout/fragment_edit_poi_advanced.xml
@@ -3,44 +3,50 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- xmlns:card_view="http://schemas.android.com/apk/res-auto">
+ android:theme="@style/OsmandLightTheme.NewAppTheme">
-
+ android:background="@drawable/bg_card_shadow">
+
+
+
+ android:layout_margin="16dp"
+ android:text="name"/>
+
+
+
+
+ android:layout_margin="16dp"
+ android:text="amenity"/>
+
+
-
+
+ android:layout_height="wrap_content"
+ android:theme="@style/OsmandLightTheme.NewAppTheme">
-
+ android:textColor="@color/color_black"
+ osmand:typeface="@string/font_roboto_medium"/>
-
+ android:textColor="@color/color_black"
+ osmand:typeface="@string/font_roboto_medium" />
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml
index 12564b1e6c..aa0dd815ca 100644
--- a/OsmAnd/res/values/colors.xml
+++ b/OsmAnd/res/values/colors.xml
@@ -154,4 +154,6 @@
#ffc87f
#e68200
#ccc
+
+ #2f7af5
\ No newline at end of file
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 17c439c423..9585521da1 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -2240,4 +2240,10 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
OsmAnd
Commit POI
+ Basic
+ Extended
+ Building Number
+ Next
+ Opening at
+ Closing at
diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml
index 76a61590a9..8b661464ea 100644
--- a/OsmAnd/res/values/styles.xml
+++ b/OsmAnd/res/values/styles.xml
@@ -97,7 +97,6 @@
- @color/osmand_orange
- @color/osmand_orange_dark
-
- @color/actionbar_light_color
- @style/Widget.Styled.ActionBarLight
@@ -106,6 +105,34 @@
- @color/color_white
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index 0d82208f7d..a1952b8311 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -620,7 +620,7 @@ public class MapActivity extends AccessibleActivity {
}
return true;
} else if (keyCode == KeyEvent.KEYCODE_MENU && event.getRepeatCount() == 0) {
- dashboardOnMap.onMenuPressed();
+ openDrawer();
return true;
} else if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 0) {
Intent newIntent = new Intent(MapActivity.this, getMyApplication().getAppCustomization()
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiFragment.java
index f5d80f9b7a..f9ab9cdf17 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiFragment.java
@@ -129,7 +129,9 @@ public class EditPoiFragment extends Fragment {
});
viewPager = (ViewPager) view.findViewById(R.id.viewpager);
- MyAdapter pagerAdapter = new MyAdapter(getChildFragmentManager());
+ String basicTitle = getResources().getString(R.string.basic_tab_title);
+ String extendedTitle = getResources().getString(R.string.extended_tab_title);
+ MyAdapter pagerAdapter = new MyAdapter(getChildFragmentManager(), basicTitle, extendedTitle);
viewPager.setAdapter(pagerAdapter);
final TabLayout tabLayout = (TabLayout) view.findViewById(R.id.tab_layout);
@@ -441,8 +443,12 @@ public class EditPoiFragment extends Fragment {
}
public static class MyAdapter extends FragmentPagerAdapter {
- public MyAdapter(FragmentManager fm) {
+ private final String basicTitle;
+ private final String extendedTitle;
+ public MyAdapter(FragmentManager fm, String basicTitle, String extendedTitle) {
super(fm);
+ this.basicTitle = basicTitle;
+ this.extendedTitle = extendedTitle;
}
@Override
@@ -466,9 +472,9 @@ public class EditPoiFragment extends Fragment {
// TODO replace with string resources
switch (position) {
case 0:
- return "Normal";
+ return basicTitle;
case 1:
- return "Advanced";
+ return extendedTitle;
}
throw new IllegalArgumentException("Unexpected position");
}
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursDaysDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursDaysDialogFragment.java
index 6eee9a9891..da0c11804c 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursDaysDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursDaysDialogFragment.java
@@ -1,19 +1,23 @@
package net.osmand.plus.osmedit.dialogs;
-import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
+import android.support.v7.app.AlertDialog;
import android.text.format.DateFormat;
+import net.osmand.PlatformUtil;
import net.osmand.plus.R;
import net.osmand.util.OpeningHoursParser;
+import org.apache.commons.logging.Log;
+
import java.util.Calendar;
public class OpeningHoursDaysDialogFragment extends DialogFragment {
+ private static final Log LOG = PlatformUtil.getLog(OpeningHoursDaysDialogFragment.class);
public static final String POSITION_TO_ADD = "position_to_add";
public static final String ITEM = "item";
@@ -24,7 +28,8 @@ public class OpeningHoursDaysDialogFragment extends DialogFragment {
(OpeningHoursParser.BasicOpeningHourRule) getArguments().getSerializable(ITEM);
final int positionToAdd = getArguments().getInt(POSITION_TO_ADD);
- AlertDialog.Builder b = new AlertDialog.Builder(getActivity());
+ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(),
+ R.style.OsmandLightDialogTheme);
boolean add = positionToAdd > -1;
Calendar inst = Calendar.getInstance();
@@ -34,11 +39,15 @@ public class OpeningHoursDaysDialogFragment extends DialogFragment {
for (int i = 0; i < 7; i++) {
int d = (first + i - 1) % 7 + 1;
inst.set(Calendar.DAY_OF_WEEK, d);
- daysToShow[i] = DateFormat.format("EEEE", inst).toString(); //$NON-NLS-1$
+ CharSequence dayName = DateFormat.format("EEEE", inst);
+ String result = "" + Character.toUpperCase(dayName.charAt(0)) +
+ dayName.subSequence(1, dayName.length());
+ daysToShow[i] = result; //$NON-NLS-1$
final int pos = (d + 5) % 7;
dayToShow[i] = item.getDays()[pos];
}
- b.setMultiChoiceItems(daysToShow, dayToShow, new DialogInterface.OnMultiChoiceClickListener() {
+ builder.setTitle("Working days");
+ builder.setMultiChoiceItems(daysToShow, dayToShow, new DialogInterface.OnMultiChoiceClickListener() {
@Override
public void onClick(DialogInterface dialog, int which, boolean isChecked) {
@@ -47,8 +56,7 @@ public class OpeningHoursDaysDialogFragment extends DialogFragment {
}
});
- b.setPositiveButton(add ? getActivity().getString(R.string.shared_string_add)
- : getActivity().getString(R.string.shared_string_apply),
+ builder.setPositiveButton(getActivity().getString(R.string.next_proceed),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
@@ -71,13 +79,12 @@ public class OpeningHoursDaysDialogFragment extends DialogFragment {
});
- b.setNegativeButton(getActivity().getString(R.string.shared_string_cancel), null);
-
- return b.create();
+ builder.setNegativeButton(getActivity().getString(R.string.shared_string_cancel), null);
+ return builder.create();
}
public static OpeningHoursDaysDialogFragment createInstance(final OpeningHoursParser.BasicOpeningHourRule item,
- final int positionToAdd) {
+ final int positionToAdd) {
OpeningHoursDaysDialogFragment daysDialogFragment = new OpeningHoursDaysDialogFragment();
Bundle bundle = new Bundle();
bundle.putSerializable(ITEM, item);
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java
index 53570dd2e0..6dfe699792 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/OpeningHoursHoursDialogFragment.java
@@ -2,12 +2,19 @@ package net.osmand.plus.osmedit.dialogs;
import android.app.Dialog;
import android.app.TimePickerDialog;
+import android.graphics.Color;
+import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.text.format.DateFormat;
+import android.util.TypedValue;
+import android.view.Gravity;
+import android.view.View;
+import android.widget.TextView;
import android.widget.TimePicker;
+import net.osmand.plus.R;
import net.osmand.plus.osmedit.NormalDataFragment;
import net.osmand.util.OpeningHoursParser;
@@ -45,12 +52,27 @@ public class OpeningHoursHoursDialogFragment extends DialogFragment {
initialState.set(Calendar.HOUR_OF_DAY, isStart? 8 : 20);
initialState.set(Calendar.MINUTE, 0);
}
- TimePickerDialog timePickerDialog = new TimePickerDialog(getActivity(), callback,
+ TimePickerDialog timePickerDialog = new TimePickerDialog(getActivity(),
+ R.style.OsmandLightDialogTheme,
+ callback,
initialState.get(Calendar.HOUR_OF_DAY),
initialState.get(Calendar.MINUTE),
DateFormat.is24HourFormat(getActivity()));
- timePickerDialog.setTitle(isStart ? "Opening" : "Closing");
+ int paddingInDp = 18;
+ float density = getActivity().getResources().getDisplayMetrics().density;
+ int paddingInPx = (int) (paddingInDp * density);
+
+ 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));
+ Typeface typeface = titleTextView.getTypeface();
+ titleTextView.setTypeface(typeface, Typeface.BOLD);
+ timePickerDialog.setCustomTitle(titleTextView);
return timePickerDialog;
}