diff --git a/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml b/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml index 1ff12e42fe..4f7fd59209 100644 --- a/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml +++ b/OsmAnd/res/layout/fragment_wikivoyage_explore_dialog.xml @@ -72,6 +72,7 @@ diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreDialogFragment.java index e88e1cfc4f..94f49df409 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/WikivoyageExploreDialogFragment.java @@ -136,12 +136,14 @@ public class WikivoyageExploreDialogFragment extends WikivoyageBaseDialogFragmen return false; } }); + updateSearchVisibility(); populateData(); return mainView; } protected void onDataLoaded() { mainView.findViewById(R.id.progress_bar).setVisibility(View.GONE); + updateSearchVisibility(); if(exploreTabFragment != null) { exploreTabFragment.populateData(); } @@ -150,6 +152,10 @@ public class WikivoyageExploreDialogFragment extends WikivoyageBaseDialogFragmen } } + private void updateSearchVisibility() { + mainView.findViewById(R.id.search_box).setVisibility(getMyApplication().getTravelDbHelper().getSelectedTravelBook() == null ? View.GONE : View.VISIBLE); + } + public void populateData() { mainView.findViewById(R.id.progress_bar).setVisibility(View.VISIBLE); new LoadWikivoyageData(this).execute();