diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageArticleContentsFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageArticleContentsFragment.java similarity index 94% rename from OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageArticleContentsFragment.java rename to OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageArticleContentsFragment.java index 3f30d4deaa..34d54f6a00 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/WikivoyageArticleContentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageArticleContentsFragment.java @@ -1,4 +1,4 @@ -package net.osmand.plus.wikivoyage.data; +package net.osmand.plus.wikivoyage; import android.content.Context; import android.content.Intent; @@ -21,6 +21,7 @@ import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; +import net.osmand.plus.wikivoyage.data.ContentsJsonParser; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -45,7 +46,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag } else { return; } - ContentsJsonParser.ContentsContainer contentsContainer = ContentsJsonParser.parseJsonContents(contentsJson, getContext()); + ContentsJsonParser.ContentsContainer contentsContainer = ContentsJsonParser.parseJsonContents(contentsJson); if (contentsContainer == null) { return; } @@ -69,7 +70,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag @Override public boolean onChildClick(ExpandableListView parent, View v, - int groupPosition, int childPosition, long id) { + int groupPosition, int childPosition, long id) { link = map.get(listDataChild.get(listDataHeader.get(groupPosition)).get(childPosition)); sendResult(0); dismiss(); @@ -126,7 +127,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag private Drawable itemChildIcon; public ExpandableListAdapter(Context context, List listDataHeader, - LinkedHashMap> listChildData) { + LinkedHashMap> listChildData) { this.context = context; this.listDataHeader = listDataHeader; this.listDataChild = listChildData; @@ -149,7 +150,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag @Override public View getChildView(int groupPosition, final int childPosition, - boolean isLastChild, View convertView, ViewGroup parent) { + boolean isLastChild, View convertView, ViewGroup parent) { String childText = (String) getChild(groupPosition, childPosition); if (convertView == null) { LayoutInflater infalInflater = (LayoutInflater) this.context @@ -190,7 +191,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag @Override public View getGroupView(int groupPosition, boolean isExpanded, - View convertView, ViewGroup parent) { + View convertView, ViewGroup parent) { String headerTitle = (String) getGroup(groupPosition); if (convertView == null) { LayoutInflater infalInflater = (LayoutInflater) this.context diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageArticleDialogFragment.java index 413d3ef7db..a0c5de8a64 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageArticleDialogFragment.java @@ -24,7 +24,6 @@ import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.plus.R; import net.osmand.plus.wikivoyage.data.WikivoyageArticle; -import net.osmand.plus.wikivoyage.data.WikivoyageArticleContentsFragment; import net.osmand.plus.wikivoyage.data.WikivoyageLocalDataHelper; import net.osmand.util.Algorithms; diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/ContentsJsonParser.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/ContentsJsonParser.java index a6686934cd..76773c7507 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/ContentsJsonParser.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/ContentsJsonParser.java @@ -10,10 +10,10 @@ import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; -class ContentsJsonParser { +public class ContentsJsonParser { @Nullable - static ContentsContainer parseJsonContents(String contentsJson) { + public static ContentsContainer parseJsonContents(String contentsJson) { LinkedHashMap map = new LinkedHashMap<>(); ArrayList listDataHeader = new ArrayList<>(); LinkedHashMap> listDataChild = new LinkedHashMap<>(); @@ -54,7 +54,7 @@ class ContentsJsonParser { return new ContentsContainer(map, listDataHeader, listDataChild); } - static class ContentsContainer { + public static class ContentsContainer { public LinkedHashMap map; public ArrayList listDataHeader;