From 468ee0d705de100e9051934116b30a433ec40d75 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Thu, 10 May 2018 17:34:57 +0300 Subject: [PATCH] Format code --- .../WikivoyageArticleDialogFragment.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index a9d49242f6..496f91a91d 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -23,6 +23,7 @@ import android.webkit.JavascriptInterface; import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.TextView; + import net.osmand.AndroidUtils; import net.osmand.IndexConstants; import net.osmand.plus.OsmandApplication; @@ -181,10 +182,10 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme String link = data.getStringExtra(WikivoyageArticleContentsFragment.CONTENT_ITEM_LINK_KEY); String title = data.getStringExtra(WikivoyageArticleContentsFragment.CONTENT_ITEM_TITLE_KEY); moveToAnchor(link, title); - } else if (requestCode == WikivoyageShowPicturesDialogFragment.SHOW_PICTURES_CHANGED_REQUEST_CODE) { + } else if (requestCode == WikivoyageShowPicturesDialogFragment.SHOW_PICTURES_CHANGED_REQUEST_CODE) { updateWebSettings(); populateArticle(); - } else if (requestCode == WikivoyageArticleNavigationFragment.OPEN_ARTICLE_REQUEST_CODE) { + } else if (requestCode == WikivoyageArticleNavigationFragment.OPEN_ARTICLE_REQUEST_CODE) { long cityId = data.getLongExtra(WikivoyageArticleNavigationFragment.CITY_ID_KEY, -1); String selectedLang = data.getStringExtra(WikivoyageArticleNavigationFragment.SELECTED_LANG_KEY); if (cityId != -1 && !TextUtils.isEmpty(selectedLang)) { @@ -316,15 +317,15 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme String[] aggregatedPartOfArrayOrig = article.getAggregatedPartOf().split(","); if (aggregatedPartOfArrayOrig.length > 0) { String current = aggregatedPartOfArrayOrig[0]; - sb.append("
"); + sb.append("
"); if (aggregatedPartOfArrayOrig.length > 0) { - for (int i = 0; i < aggregatedPartOfArrayOrig.length ; i++) { + for (int i = 0; i < aggregatedPartOfArrayOrig.length; i++) { if (i > 0) { - sb.append("  •  ").append(aggregatedPartOfArrayOrig[i]); + sb.append("  •  ").append(aggregatedPartOfArrayOrig[i]); } else { - if (!TextUtils.isEmpty(current)) { - sb.append("").append(current).append(""); - } + if (!TextUtils.isEmpty(current)) { + sb.append("").append(current).append(""); + } } } } @@ -334,11 +335,10 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme String url = TravelArticle.getImageUrl(imageTitle, false); if (!TextUtils.isEmpty(imageTitle) && getSettings().WIKI_ARTICLE_SHOW_IMAGES.get() != OFF && !url.startsWith(EMPTY_URL)) { - sb.append("
"); + sb.append("
"); } - sb.append("
\n"); sb.append("

").append(article.getTitle()).append("

"); sb.append(article.getContent()); @@ -395,19 +395,19 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme WikivoyageArticleDialogFragment.this, cityId, selectedLang); } } - + @Override protected void closeFragment() { int backStackEntryCount = getFragmentManager().getBackStackEntryCount(); int pop = -1; - for(int i = backStackEntryCount - 1; i >= 0; i--) { + for (int i = backStackEntryCount - 1; i >= 0; i--) { BackStackEntry entry = getFragmentManager().getBackStackEntryAt(i); - if(!TAG.equals(entry.getName())) { + if (!TAG.equals(entry.getName())) { pop = i; break; } } - if(pop == -1) { + if (pop == -1) { dismiss(); } else { getFragmentManager().popBackStackImmediate(pop, 0);