Merge branch 'master' of https://github.com/osmandapp/Osmand
This commit is contained in:
commit
7bacf18b10
11 changed files with 82 additions and 59 deletions
|
@ -4,7 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/bg_color"
|
android:background="?attr/spinnerListBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context="net.osmand.plus.osmedit.EditPoiFragment">
|
tools:context="net.osmand.plus.osmedit.EditPoiFragment">
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
android:id="@+id/tab_layout"
|
android:id="@+id/tab_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/pstsTabBackground"
|
android:background="?attr/bg_color"
|
||||||
app:layout_scrollFlags="scroll"
|
app:layout_scrollFlags="scroll"
|
||||||
app:tabIndicatorColor="?attr/pstsIndicatorColor"
|
app:tabIndicatorColor="?attr/pstsIndicatorColor"
|
||||||
app:tabSelectedTextColor="?attr/pstsIndicatorColor"
|
app:tabSelectedTextColor="?attr/pstsIndicatorColor"
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
android:id="@+id/buttonDivider"
|
android:id="@+id/buttonDivider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/divider_color"/>
|
android:background="?attr/dashboard_divider"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
@ -131,7 +131,6 @@
|
||||||
android:height="48dp"
|
android:height="48dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/shared_string_cancel"
|
android:text="@string/shared_string_cancel"
|
||||||
android:textColor="@color/dashboard_general_button_text_light"
|
|
||||||
app:textAllCapsCompat="true"/>
|
app:textAllCapsCompat="true"/>
|
||||||
|
|
||||||
<net.osmand.plus.widgets.ButtonEx
|
<net.osmand.plus.widgets.ButtonEx
|
||||||
|
@ -139,7 +138,6 @@
|
||||||
style="@style/DashboardGeneralButton"
|
style="@style/DashboardGeneralButton"
|
||||||
android:height="48dp"
|
android:height="48dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/dashboard_general_button_text_light"
|
|
||||||
app:textAllCapsCompat="true"
|
app:textAllCapsCompat="true"
|
||||||
tools:text="Save"/>
|
tools:text="Save"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/divider_color"/>
|
android:background="?attr/dashboard_divider"/>
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
android:id="@+id/nameTextView"
|
android:id="@+id/nameTextView"
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/divider_color"/>
|
android:background="?attr/dashboard_divider"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/divider_color"/>
|
android:background="?attr/dashboard_divider"/>
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
android:id="@+id/amenityTextView"
|
android:id="@+id/amenityTextView"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:theme="@attr/new_app_theme">
|
osmand:theme="?attr/new_app_theme">
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
android:id="@+id/contactInfoTextView"
|
android:id="@+id/contactInfoTextView"
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
android:textSize="@dimen/default_sub_text_size"
|
android:textSize="@dimen/default_sub_text_size"
|
||||||
osmand:typeface="@string/font_roboto_medium"/>
|
osmand:typeface="@string/font_roboto_medium"/>
|
||||||
|
|
||||||
<!--XXX due to bug in NestedScroolView-->
|
<!--XXX due to bug in NestedScrollView-->
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="500dp"
|
android:layout_height="500dp"
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/divider_color"/>
|
android:background="?android:textColorSecondary"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -59,13 +59,13 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/divider_color"/>
|
android:background="?android:textColorSecondary"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/divider_color"/>
|
android:background="?android:textColorSecondary"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/divider_color"/>
|
android:background="?android:textColorSecondary"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -843,7 +843,7 @@
|
||||||
<string name="poi_error_unexpected_template">Произошла неожиданная ошибка при выполнении действия {0}.</string>
|
<string name="poi_error_unexpected_template">Произошла неожиданная ошибка при выполнении действия {0}.</string>
|
||||||
<string name="poi_error_io_error_template">Произошла ошибка ввода/вывода при выполнении действия {0}.</string>
|
<string name="poi_error_io_error_template">Произошла ошибка ввода/вывода при выполнении действия {0}.</string>
|
||||||
<string name="poi_error_info_not_loaded">Произошла ошибка при загрузке информации о POI</string>
|
<string name="poi_error_info_not_loaded">Произошла ошибка при загрузке информации о POI</string>
|
||||||
<string name="poi_dialog_name">Имя</string>
|
<string name="poi_dialog_name">Название</string>
|
||||||
<string name="poi_dialog_opening_hours">Время работы</string>
|
<string name="poi_dialog_opening_hours">Время работы</string>
|
||||||
<string name="poi_dialog_comment">Комментарий</string>
|
<string name="poi_dialog_comment">Комментарий</string>
|
||||||
<string name="poi_dialog_comment_default">Изменение POI</string>
|
<string name="poi_dialog_comment_default">Изменение POI</string>
|
||||||
|
|
|
@ -2260,4 +2260,5 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
|
||||||
<string name="working_days">Working days</string>
|
<string name="working_days">Working days</string>
|
||||||
<string name="recent_places">Recent places</string>
|
<string name="recent_places">Recent places</string>
|
||||||
<string name="favourites">Favourites</string>
|
<string name="favourites">Favourites</string>
|
||||||
|
<string name="saved_at_time">Successfully saved at: %1$s</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -131,21 +131,17 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="OsmandDarkTheme.DarkActionbar">
|
<style name="OsmandDarkTheme.DarkActionbar">
|
||||||
<item name="android:textColorPrimary">@color/color_white</item>
|
|
||||||
<item name="android:textColorSecondary">@color/inactive_item_orange</item>
|
|
||||||
<item name="android:textColorHint">@color/inactive_item_orange</item>
|
|
||||||
<item name="colorAccent">@color/color_white</item>
|
<item name="colorAccent">@color/color_white</item>
|
||||||
<!--<item name="actionMenuTextColor">@color/color_white</item>-->
|
<item name="android:textColorSecondary">@color/dash_search_icon_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="OsmandDarkTheme.Toolbar">
|
<style name="OsmandDarkTheme.Toolbar">
|
||||||
<item name="android:textColorPrimary">@color/color_white</item>
|
<item name="android:textColorSecondary">@color/dash_search_icon_dark</item>
|
||||||
<item name="android:textColorSecondary">@color/color_white</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="OsmandDarkTheme.NewAppTheme">
|
<style name="OsmandDarkTheme.NewAppTheme">
|
||||||
|
<item name="android:textColorSecondary">@color/dash_search_icon_dark</item>
|
||||||
<item name="colorAccent">@color/osmand_orange</item>
|
<item name="colorAccent">@color/osmand_orange</item>
|
||||||
<item name="android:textColorSecondary">@color/divider_color</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
|
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
|
||||||
|
@ -186,7 +182,7 @@
|
||||||
<item name="android:textColorPrimary">@color/color_white</item>
|
<item name="android:textColorPrimary">@color/color_white</item>
|
||||||
<item name="spinnerItemTextColor">@color/color_white</item>
|
<item name="spinnerItemTextColor">@color/color_white</item>
|
||||||
<item name="spinnerListBackground">@color/spinner_list_background_dark</item>
|
<item name="spinnerListBackground">@color/spinner_list_background_dark</item>
|
||||||
<item name="colorButtonNormal">@color/bg_color_dark</item>
|
<item name="colorButtonNormal">@color/actionbar_dark_color</item>
|
||||||
|
|
||||||
<item name="android:actionModeBackground">@color/actionbar_dark_color</item>
|
<item name="android:actionModeBackground">@color/actionbar_dark_color</item>
|
||||||
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||||
|
|
|
@ -45,6 +45,8 @@ import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
import net.osmand.plus.views.mapwidgets.TextInfoWidget;
|
import net.osmand.plus.views.mapwidgets.TextInfoWidget;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import gnu.trove.list.array.TIntArrayList;
|
import gnu.trove.list.array.TIntArrayList;
|
||||||
|
@ -325,6 +327,11 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
SavingTrackHelper helper = app.getSavingTrackHelper();
|
SavingTrackHelper helper = app.getSavingTrackHelper();
|
||||||
helper.saveDataToGpx(app.getAppCustomization().getTracksDir());
|
helper.saveDataToGpx(app.getAppCustomization().getTracksDir());
|
||||||
helper.close();
|
helper.close();
|
||||||
|
DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(app);
|
||||||
|
final String formattedTime =
|
||||||
|
timeFormat.format(new Date(helper.getLastTimeUpdated()));
|
||||||
|
showNotification(app, String.format(app.getString(R.string.saved_at_time),
|
||||||
|
formattedTime));
|
||||||
} finally {
|
} finally {
|
||||||
isSaving = false;
|
isSaving = false;
|
||||||
}
|
}
|
||||||
|
@ -345,7 +352,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startGPXMonitoring(Activity map) {
|
public void startGPXMonitoring(final Activity map) {
|
||||||
final ValueHolder<Integer> vs = new ValueHolder<Integer>();
|
final ValueHolder<Integer> vs = new ValueHolder<Integer>();
|
||||||
final ValueHolder<Boolean> choice = new ValueHolder<Boolean>();
|
final ValueHolder<Boolean> choice = new ValueHolder<Boolean>();
|
||||||
vs.value = settings.SAVE_GLOBAL_TRACK_INTERVAL.get();
|
vs.value = settings.SAVE_GLOBAL_TRACK_INTERVAL.get();
|
||||||
|
@ -364,7 +371,11 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
settings.SERVICE_OFF_INTERVAL.set(settings.SAVE_GLOBAL_TRACK_INTERVAL.get());
|
settings.SERVICE_OFF_INTERVAL.set(settings.SAVE_GLOBAL_TRACK_INTERVAL.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
app.startNavigationService(NavigationService.USED_BY_GPX);
|
app.startNavigationService(NavigationService.USED_BY_GPX);
|
||||||
|
|
||||||
|
|
||||||
|
showNotification(map, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(choice.value) {
|
if(choice.value) {
|
||||||
|
@ -379,38 +390,32 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String stop = map.getResources().getString(R.string.shared_string_control_stop);
|
private static void showNotification(Context context, String contentText) {
|
||||||
|
String stop = context.getResources().getString(R.string.shared_string_control_stop);
|
||||||
Intent stopIntent = new Intent(NavigationService.OSMAND_STOP_SERVICE_ACTION);
|
Intent stopIntent = new Intent(NavigationService.OSMAND_STOP_SERVICE_ACTION);
|
||||||
PendingIntent stopPendingIntent = PendingIntent.getBroadcast(map, 0, stopIntent,
|
PendingIntent stopPendingIntent = PendingIntent.getBroadcast(context, 0, stopIntent,
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
String save = map.getResources().getString(R.string.shared_string_save);
|
String save = context.getResources().getString(R.string.shared_string_save);
|
||||||
Intent saveIntent = new Intent(OSMAND_SAVE_SERVICE_ACTION);
|
Intent saveIntent = new Intent(OSMAND_SAVE_SERVICE_ACTION);
|
||||||
PendingIntent savePendingIntent = PendingIntent.getBroadcast(map, 0, saveIntent,
|
PendingIntent savePendingIntent = PendingIntent.getBroadcast(context, 0, saveIntent,
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
|
||||||
BroadcastReceiver saveBroadcastReceiver = new BroadcastReceiver() {
|
BroadcastReceiver saveBroadcastReceiver = new SaveBroadcastReceiver();
|
||||||
@Override
|
context.registerReceiver(saveBroadcastReceiver, new IntentFilter(OSMAND_SAVE_SERVICE_ACTION));
|
||||||
public void onReceive(Context context, Intent intent) {
|
|
||||||
final OsmandMonitoringPlugin plugin = OsmandPlugin
|
|
||||||
.getEnabledPlugin(OsmandMonitoringPlugin.class);
|
|
||||||
if (plugin != null) {
|
|
||||||
plugin.saveCurrentTrack();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
map.registerReceiver(saveBroadcastReceiver, new IntentFilter(OSMAND_SAVE_SERVICE_ACTION));
|
|
||||||
|
|
||||||
final NotificationCompat.Builder notificationBuilder =
|
final NotificationCompat.Builder notificationBuilder =
|
||||||
new android.support.v7.app.NotificationCompat.Builder(map)
|
new android.support.v7.app.NotificationCompat.Builder(context)
|
||||||
.setContentTitle(map.getResources().getString(R.string.map_widget_monitoring))
|
.setContentTitle(context.getResources().getString(R.string.map_widget_monitoring))
|
||||||
.setSmallIcon(R.drawable.ic_action_polygom_dark)
|
.setContentText(contentText)
|
||||||
|
.setSmallIcon(R.drawable.ic_action_polygom_dark)
|
||||||
// .setLargeIcon(Helpers.getBitmap(R.drawable.mirakel, getBaseContext()))
|
// .setLargeIcon(Helpers.getBitmap(R.drawable.mirakel, getBaseContext()))
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.addAction(R.drawable.ic_action_rec_stop, stop, stopPendingIntent)
|
.addAction(R.drawable.ic_action_rec_stop, stop, stopPendingIntent)
|
||||||
.addAction(R.drawable.ic_action_save, save, savePendingIntent);
|
.addAction(R.drawable.ic_action_save, save, savePendingIntent);
|
||||||
NotificationManager mNotificationManager =
|
NotificationManager mNotificationManager =
|
||||||
(NotificationManager) map.getSystemService(Context.NOTIFICATION_SERVICE);
|
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
mNotificationManager.notify(notificationId, notificationBuilder.build());
|
mNotificationManager.notify(notificationId, notificationBuilder.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -513,4 +518,15 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||||
return new DashFragmentData(DashTrackFragment.TAG, DashTrackFragment.class,
|
return new DashFragmentData(DashTrackFragment.TAG, DashTrackFragment.class,
|
||||||
R.string.record_plugin_name, 11);
|
R.string.record_plugin_name, 11);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class SaveBroadcastReceiver extends BroadcastReceiver {
|
||||||
|
@Override
|
||||||
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
final OsmandMonitoringPlugin plugin = OsmandPlugin
|
||||||
|
.getEnabledPlugin(OsmandMonitoringPlugin.class);
|
||||||
|
if (plugin != null) {
|
||||||
|
plugin.saveCurrentTrack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -56,7 +56,7 @@ public class AdvancedDataFragment extends Fragment {
|
||||||
|
|
||||||
deleteDrawable = ((OsmandApplication) getActivity().getApplication()).getIconsCache()
|
deleteDrawable = ((OsmandApplication) getActivity().getApplication()).getIconsCache()
|
||||||
.getPaintedContentIcon(R.drawable.ic_action_remove_dark,
|
.getPaintedContentIcon(R.drawable.ic_action_remove_dark,
|
||||||
getActivity().getResources().getColor(R.color.icon_color_light));
|
getActivity().getResources().getColor(R.color.dash_search_icon_dark));
|
||||||
TextView nameTextView = (TextView) view.findViewById(R.id.nameTextView);
|
TextView nameTextView = (TextView) view.findViewById(R.id.nameTextView);
|
||||||
TextView amenityTagTextView = (TextView) view.findViewById(R.id.amenityTagTextView);
|
TextView amenityTagTextView = (TextView) view.findViewById(R.id.amenityTagTextView);
|
||||||
TextView amenityTextView = (TextView) view.findViewById(R.id.amenityTextView);
|
TextView amenityTextView = (TextView) view.findViewById(R.id.amenityTextView);
|
||||||
|
|
|
@ -52,21 +52,29 @@ public class BasicDataFragment extends Fragment {
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
IconsCache iconsCache = ((OsmandApplication) getActivity().getApplication()).getIconsCache();
|
|
||||||
View view = inflater.inflate(R.layout.fragment_edit_poi_normal, container, false);
|
View view = inflater.inflate(R.layout.fragment_edit_poi_normal, container, false);
|
||||||
|
|
||||||
|
IconsCache iconsCache = getMyApplication().getIconsCache();
|
||||||
|
int iconColor = getResources().getColor(R.color.dash_search_icon_dark);
|
||||||
|
|
||||||
ImageView streetImageView = (ImageView) view.findViewById(R.id.streetImageView);
|
ImageView streetImageView = (ImageView) view.findViewById(R.id.streetImageView);
|
||||||
streetImageView.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_street_name));
|
streetImageView.setImageDrawable(
|
||||||
|
iconsCache.getPaintedContentIcon(R.drawable.ic_action_street_name, iconColor));
|
||||||
ImageView houseNumberImageView = (ImageView) view.findViewById(R.id.houseNumberImageView);
|
ImageView houseNumberImageView = (ImageView) view.findViewById(R.id.houseNumberImageView);
|
||||||
houseNumberImageView.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_building_number));
|
houseNumberImageView.setImageDrawable(
|
||||||
|
iconsCache.getPaintedContentIcon(R.drawable.ic_action_building_number, iconColor));
|
||||||
ImageView phoneImageView = (ImageView) view.findViewById(R.id.phoneImageView);
|
ImageView phoneImageView = (ImageView) view.findViewById(R.id.phoneImageView);
|
||||||
phoneImageView.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_call_dark));
|
phoneImageView.setImageDrawable(
|
||||||
|
iconsCache.getPaintedContentIcon(R.drawable.ic_action_call_dark, iconColor));
|
||||||
ImageView webSiteImageView = (ImageView) view.findViewById(R.id.webSiteImageView);
|
ImageView webSiteImageView = (ImageView) view.findViewById(R.id.webSiteImageView);
|
||||||
webSiteImageView.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_world_globe_dark));
|
webSiteImageView.setImageDrawable(
|
||||||
|
iconsCache.getPaintedContentIcon(R.drawable.ic_world_globe_dark, iconColor));
|
||||||
ImageView descriptionImageView = (ImageView) view.findViewById(R.id.descriptionImageView);
|
ImageView descriptionImageView = (ImageView) view.findViewById(R.id.descriptionImageView);
|
||||||
descriptionImageView.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_description));
|
descriptionImageView.setImageDrawable(
|
||||||
|
iconsCache.getPaintedContentIcon(R.drawable.ic_action_description, iconColor));
|
||||||
ImageView openingHoursImageView = (ImageView) view.findViewById(R.id.openingHoursImageView);
|
ImageView openingHoursImageView = (ImageView) view.findViewById(R.id.openingHoursImageView);
|
||||||
openingHoursImageView.setImageDrawable(iconsCache.getContentIcon(R.drawable.ic_action_time));
|
openingHoursImageView.setImageDrawable(
|
||||||
|
iconsCache.getPaintedContentIcon(R.drawable.ic_action_time, iconColor));
|
||||||
|
|
||||||
streetEditText = (EditText) view.findViewById(R.id.streetEditText);
|
streetEditText = (EditText) view.findViewById(R.id.streetEditText);
|
||||||
streetEditText.addTextChangedListener(new MyOnFocusChangeListener(getData(),
|
streetEditText.addTextChangedListener(new MyOnFocusChangeListener(getData(),
|
||||||
|
@ -96,10 +104,10 @@ public class BasicDataFragment extends Fragment {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
LinearLayout openHoursContainer = (LinearLayout) view.findViewById(R.id.openHoursContainer);
|
LinearLayout openHoursContainer = (LinearLayout) view.findViewById(R.id.openHoursContainer);
|
||||||
Drawable clockDrawable = iconsCache.getContentIcon(R.drawable.ic_action_time);
|
Drawable clockDrawable = iconsCache
|
||||||
|
.getPaintedContentIcon(R.drawable.ic_action_time, iconColor);
|
||||||
Drawable deleteDrawable = iconsCache
|
Drawable deleteDrawable = iconsCache
|
||||||
.getPaintedContentIcon(R.drawable.ic_action_remove_dark,
|
.getPaintedContentIcon(R.drawable.ic_action_remove_dark, iconColor);
|
||||||
getActivity().getResources().getColor(R.color.icon_color_light));
|
|
||||||
if (savedInstanceState != null && savedInstanceState.containsKey(OPENING_HOURS)) {
|
if (savedInstanceState != null && savedInstanceState.containsKey(OPENING_HOURS)) {
|
||||||
mOpeningHoursAdapter = new OpeningHoursAdapter(
|
mOpeningHoursAdapter = new OpeningHoursAdapter(
|
||||||
(OpeningHoursParser.OpeningHours) savedInstanceState.getSerializable(OPENING_HOURS),
|
(OpeningHoursParser.OpeningHours) savedInstanceState.getSerializable(OPENING_HOURS),
|
||||||
|
@ -112,6 +120,10 @@ public class BasicDataFragment extends Fragment {
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private OsmandApplication getMyApplication() {
|
||||||
|
return (OsmandApplication) getActivity().getApplication();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
|
@ -200,7 +200,7 @@ public class EditPoiFragment extends DialogFragment {
|
||||||
onlineDocumentationButton.setImageDrawable(
|
onlineDocumentationButton.setImageDrawable(
|
||||||
getMyApplication().getIconsCache()
|
getMyApplication().getIconsCache()
|
||||||
.getPaintedContentIcon(R.drawable.ic_action_help,
|
.getPaintedContentIcon(R.drawable.ic_action_help,
|
||||||
getResources().getColor(R.color.inactive_item_orange)));
|
getResources().getColor(R.color.dash_search_icon_dark)));
|
||||||
final ImageButton poiTypeButton = (ImageButton) view.findViewById(R.id.poiTypeButton);
|
final ImageButton poiTypeButton = (ImageButton) view.findViewById(R.id.poiTypeButton);
|
||||||
poiTypeButton.setOnClickListener(new View.OnClickListener() {
|
poiTypeButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue