diff --git a/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml b/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml
deleted file mode 100644
index 57e135820b..0000000000
--- a/OsmAnd/res/layout/dash_audio_video_notes_plugin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout/dash_common_fragment.xml b/OsmAnd/res/layout/dash_common_fragment.xml
index 1cf14e4e4a..48edc29a13 100644
--- a/OsmAnd/res/layout/dash_common_fragment.xml
+++ b/OsmAnd/res/layout/dash_common_fragment.xml
@@ -12,10 +12,11 @@
android:layout_height="@dimen/dashHeaderHeight"
android:orientation="horizontal" >
-
+ android:text="@string/shared_string_my_places"
+ osmand:typeface="@string/font_roboto_medium" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout/dash_list_fragment.xml b/OsmAnd/res/layout/dash_list_fragment.xml
deleted file mode 100644
index e59365f350..0000000000
--- a/OsmAnd/res/layout/dash_list_fragment.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OsmAnd/res/layout/dash_plugins_fragment.xml b/OsmAnd/res/layout/dash_plugins_fragment.xml
deleted file mode 100644
index d3ca0737dc..0000000000
--- a/OsmAnd/res/layout/dash_plugins_fragment.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OsmAnd/res/layout/plugins.xml b/OsmAnd/res/layout/plugins.xml
index 8e43cef589..095bfee61c 100644
--- a/OsmAnd/res/layout/plugins.xml
+++ b/OsmAnd/res/layout/plugins.xml
@@ -9,10 +9,6 @@
diff --git a/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java
index 758964d1e1..1aed4e4733 100644
--- a/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java
+++ b/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java
@@ -39,10 +39,8 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
plugin = OsmandPlugin.getEnabledPlugin(AudioVideoNotesPlugin.class);
- View view = getActivity().getLayoutInflater().inflate(R.layout.dash_audio_video_notes_plugin, container, false);
- Typeface typeface = FontCache.getRobotoMedium(getActivity());
- ((TextView) view.findViewById(R.id.notes_text)).setTypeface(typeface);
- ((Button) view.findViewById(R.id.show_all)).setTypeface(typeface);
+ View view = getActivity().getLayoutInflater().inflate(R.layout.dash_common_fragment, container, false);
+ ((TextView) view.findViewById(R.id.fav_text)).setText(R.string.map_widget_av_notes);
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -75,7 +73,7 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
mainView.setVisibility(View.VISIBLE);
}
- LinearLayout notesLayout = (LinearLayout) mainView.findViewById(R.id.notes);
+ LinearLayout notesLayout = (LinearLayout) mainView.findViewById(R.id.items);
notesLayout.removeAllViews();
if (notes.size() > 3){
while (notes.size() != 3){
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashDownloadMapsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashDownloadMapsFragment.java
deleted file mode 100644
index 048c7a8b84..0000000000
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashDownloadMapsFragment.java
+++ /dev/null
@@ -1,128 +0,0 @@
-package net.osmand.plus.dashboard;
-
-import java.io.File;
-import java.text.MessageFormat;
-import java.util.Locale;
-
-import net.osmand.IndexConstants;
-import net.osmand.plus.R;
-import net.osmand.plus.download.DownloadActivity;
-import net.osmand.plus.helpers.FontCache;
-import android.content.Intent;
-import android.graphics.Typeface;
-import android.os.AsyncTask;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-import android.widget.TextView;
-
-/**
- * Created by dummy on 02.12.14.
- */
-public class DashDownloadMapsFragment extends DashBaseFragment {
-
- public static final String TAG = "DASH_DOWNLOAD_MAPS_FRAGMENT";
- MessageFormat formatMb = new MessageFormat("{0, number,##.#} MB", Locale.US);
- MessageFormat formatGb = new MessageFormat("{0, number,#.##} GB", Locale.US);
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- final View view = getActivity().getLayoutInflater().inflate(R.layout.dash_download_maps_fragment, container,
- false);
- Typeface typeface = FontCache.getRobotoMedium(getActivity());
- final TextView message = ((TextView) view.findViewById(R.id.message));
- message.setTypeface(typeface);
-
- Button local = ((Button) view.findViewById(R.id.local_downloads));
- local.setTypeface(typeface);
- local.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- final Intent intent = new Intent(view.getContext(), getMyApplication().getAppCustomization()
- .getDownloadIndexActivity());
- intent.putExtra(DownloadActivity.TAB_TO_OPEN, DownloadActivity.LOCAL_TAB);
- // intent.putExtra(DownloadActivity.SINGLE_TAB, true);
- getActivity().startActivity(intent);
- }
- });
-
- Button cancelBtn = ((Button) view.findViewById(R.id.download_new_map));
- cancelBtn.setTypeface(typeface);
- cancelBtn.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- final Intent intent = new Intent(view.getContext(), getMyApplication().getAppCustomization()
- .getDownloadIndexActivity());
- intent.putExtra(DownloadActivity.TAB_TO_OPEN, DownloadActivity.DOWNLOAD_TAB);
- // intent.putExtra(DownloadActivity.SINGLE_TAB, true);
- getActivity().startActivity(intent);
- }
- });
- return view;
- }
-
- @Override
- public void onOpenDash() {
- refreshData();
- }
-
- public void refreshData() {
- if (getView() == null) {
- return;
- }
-
- final TextView message = ((TextView) getView().findViewById(R.id.message));
- final Button local = ((Button) getView().findViewById(R.id.local_downloads));
- new AsyncTask() {
- int countMaps = 0;
- long size = 0;
-
- @Override
- protected Void doInBackground(Void... params) {
- updateCount(IndexConstants.MAPS_PATH);
- updateCount(IndexConstants.SRTM_INDEX_DIR);
- return null;
- }
-
- protected void updateCount(String s) {
- if (!DashDownloadMapsFragment.this.isAdded() || getMyApplication() == null) {
- return;
- }
- File ms = getMyApplication().getAppPath(s);
- if (ms.exists()) {
- File[] lf = ms.listFiles();
- if (lf != null) {
- for (File f : ms.listFiles()) {
- if (f.getName().endsWith(IndexConstants.BINARY_MAP_INDEX_EXT)) {
- size += f.length();
- countMaps++;
- }
- }
- }
- }
- }
-
- @Override
- protected void onPostExecute(Void result) {
- super.onPostExecute(result);
- if (!DashDownloadMapsFragment.this.isAdded() || getMyApplication() == null) {
- return;
- }
- if (countMaps > 0) {
- long mb = 1 << 20;
- long gb = 1 << 30;
- String sz = size > gb ? formatGb.format(new Object[] { (float) size / (gb) }) : formatMb
- .format(new Object[] { (float) size / mb });
- message.setText(getString(R.string.dash_download_msg, countMaps + "") + " (" + sz + ")");
- local.setVisibility(View.VISIBLE);
- } else {
- message.setText(getString(R.string.dash_download_msg_none));
- local.setVisibility(View.GONE);
- }
-
- }
- }.execute((Void) null);
- }
-}
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java
index 489c405c07..228d7e7003 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java
@@ -41,10 +41,6 @@ public class DashFavoritesFragment extends DashLocationFragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = getActivity().getLayoutInflater().inflate(R.layout.dash_common_fragment, container, false);
- Typeface typeface = FontCache.getRobotoMedium(getActivity());
- ((TextView) view.findViewById(R.id.fav_text)).setTypeface(typeface);
- ((Button) view.findViewById(R.id.show_all)).setTypeface(typeface);
-
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashListFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashListFragment.java
deleted file mode 100644
index c2aa01b1fd..0000000000
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashListFragment.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package net.osmand.plus.dashboard;
-
-import net.osmand.plus.R;
-import net.osmand.plus.helpers.FontCache;
-import android.graphics.Typeface;
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.ListView;
-import android.widget.TextView;
-
-/**
- * Created by Denis on 24.11.2014.
- */
-public class DashListFragment extends DashBaseFragment {
- public static final String TAG = "DASH_LIST_FRAGMENT";
-
-
- @Override
- public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View view = getActivity().getLayoutInflater().inflate(R.layout.dash_list_fragment, container, false);
- Typeface typeface = FontCache.getRobotoMedium(getActivity());
- ((TextView) view.findViewById(R.id.fav_text)).setTypeface(typeface);
- ((TextView) view.findViewById(R.id.fav_text)).setText("Here will be text");
- ((Button) view.findViewById(R.id.show_all)).setTypeface(typeface);
- ((Button) view.findViewById(R.id.show_all)).setVisibility(View.GONE);
- return view;
- }
-
- @Override
- public void onOpenDash() {
- setupList();
- }
-
- public void setupList() {
- View mainView = getView();
- mainView.findViewById(R.id.main_fav).setVisibility(View.VISIBLE);
- LinearLayout lv = (LinearLayout) mainView.findViewById(R.id.items);
- lv.removeAllViews();
- ArrayAdapter> la = dashboard.getListAdapter();
- final OnItemClickListener onClick = dashboard.getListAdapterOnClickListener();
- for(int i = 0; i < la.getCount(); i++) {
- final int position = i;
- View v = la.getView(position, null, lv);
- if (onClick != null) {
- v.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- onClick.onItemClick(null, v, position, position);
- }
- });
- }
- lv.addView(v);
- }
- }
-
-
-}
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java
index 4a36d18a0d..5af1badc51 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java
@@ -56,15 +56,17 @@ public class DashPluginsFragment extends DashBaseFragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View contentView = inflater.inflate(R.layout.dash_plugins_fragment, container, false);
- contentView.findViewById(R.id.show_all).setOnClickListener(new View.OnClickListener() {
+ View view = inflater.inflate(R.layout.dash_common_fragment, container, false);
+ TextView header = ((TextView) view.findViewById(R.id.fav_text));
+ header.setText(R.string.prefs_plugins);
+ view.findViewById(R.id.show_all).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(getActivity(), getMyApplication().getAppCustomization().getPluginsActivity()));
}
});
initPlugins();
- return contentView;
+ return view;
}
@@ -95,7 +97,7 @@ public class DashPluginsFragment extends DashBaseFragment {
View contentView = getView();
LayoutInflater inflater = getActivity().getLayoutInflater();
initPlugins();
- LinearLayout pluginsContainer = (LinearLayout) contentView.findViewById(R.id.plugins);
+ LinearLayout pluginsContainer = (LinearLayout) contentView.findViewById(R.id.items);
pluginsContainer.removeAllViews();
for (OsmandPlugin p : plugins) {
inflatePluginView(inflater, pluginsContainer, p);
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java
index 51e89ac6f2..af06af610f 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java
@@ -41,11 +41,6 @@ public class DashRecentsFragment extends DashLocationFragment {
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = getActivity().getLayoutInflater().inflate(R.layout.dash_common_fragment, container, false);
Typeface typeface = FontCache.getRobotoMedium(getActivity());
- ((TextView) view.findViewById(R.id.fav_text)).setTypeface(typeface);
- ((TextView) view.findViewById(R.id.fav_text)).setText(Algorithms
- .capitalizeFirstLetterAndLowercase(getString(R.string.shared_string_history)));
- ((Button) view.findViewById(R.id.show_all)).setTypeface(typeface);
-
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java
index 1891a026b2..d86f5e4608 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java
@@ -42,11 +42,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = getActivity().getLayoutInflater().inflate(R.layout.dash_common_fragment, container, false);
- Typeface typeface = FontCache.getRobotoMedium(getActivity());
- ((TextView) view.findViewById(R.id.fav_text)).setTypeface(typeface);
- ((Button) view.findViewById(R.id.show_all)).setTypeface(typeface);
((TextView) view.findViewById(R.id.fav_text)).setText(getString(R.string.waypoints));
-
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
diff --git a/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java b/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java
index 9dab5cb57b..12e4461c44 100644
--- a/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java
+++ b/OsmAnd/src/net/osmand/plus/development/DashSimulateFragment.java
@@ -37,9 +37,7 @@ public class DashSimulateFragment extends DashBaseFragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = getActivity().getLayoutInflater().inflate(R.layout.dash_common_fragment, container, false);
- Typeface typeface = FontCache.getRobotoMedium(getActivity());
TextView header = (TextView) view.findViewById(R.id.fav_text);
- header.setTypeface(typeface);
header.setText(R.string.simulate_your_location);
((Button) view.findViewById(R.id.show_all)).setVisibility(View.GONE);
LinearLayout tracks = (LinearLayout) view.findViewById(R.id.items);
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java
index 9559201556..fd3f2477ab 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java
@@ -47,13 +47,9 @@ public class DashTrackFragment extends DashBaseFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = getActivity().getLayoutInflater().inflate(R.layout.dash_common_fragment, container, false);
- Typeface typeface = FontCache.getRobotoMedium(getActivity());
TextView header = (TextView) view.findViewById(R.id.fav_text);
- header.setTypeface(typeface);
header.setText(R.string.shared_string_my_tracks);
- ((Button) view.findViewById(R.id.show_all)).setTypeface(typeface);
-
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java
index d92cb1ff0c..a58308d815 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java
@@ -38,13 +38,10 @@ public class DashOsmEditsFragment extends DashBaseFragment implements OsmEditsUp
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
plugin = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class);
- View view = getActivity().getLayoutInflater().inflate(R.layout.dash_audio_video_notes_plugin, container, false);
- Typeface typeface = FontCache.getRobotoMedium(getActivity());
- TextView header = ((TextView) view.findViewById(R.id.notes_text));
- header.setTypeface(typeface);
+ View view = getActivity().getLayoutInflater().inflate(R.layout.dash_common_fragment, container, false);
+ TextView header = ((TextView) view.findViewById(R.id.fav_text));
header.setText(R.string.osm_settings);
Button manage = ((Button) view.findViewById(R.id.show_all));
- manage.setTypeface(typeface);
manage.setText(R.string.osm_editing_manage);
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
@Override
@@ -81,7 +78,7 @@ public class DashOsmEditsFragment extends DashBaseFragment implements OsmEditsUp
mainView.setVisibility(View.VISIBLE);
}
- LinearLayout osmLayout = (LinearLayout) mainView.findViewById(R.id.notes);
+ LinearLayout osmLayout = (LinearLayout) mainView.findViewById(R.id.items);
osmLayout.removeAllViews();
for (final OsmPoint point : dataPoints){