Format code

This commit is contained in:
Alex Sytnyk 2018-05-10 17:34:57 +03:00
parent 6c1202a845
commit 468ee0d705

View file

@ -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;
@ -316,9 +317,9 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme
String[] aggregatedPartOfArrayOrig = article.getAggregatedPartOf().split(",");
if (aggregatedPartOfArrayOrig.length > 0) {
String current = aggregatedPartOfArrayOrig[0];
sb.append("<div class=\"nav-bar"+nightModeClass+"\" onClick=\"showNavigation()\">");
sb.append("<div class=\"nav-bar" + nightModeClass + "\" onClick=\"showNavigation()\">");
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("&nbsp;&nbsp;•&nbsp;&nbsp;").append(aggregatedPartOfArrayOrig[i]);
} else {
@ -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("<div class=\"title-image"+nightModeClass+"\" style=\"background-image: url(").append(url).append(")\"></div>");
sb.append("<div class=\"title-image" + nightModeClass + "\" style=\"background-image: url(").append(url).append(")\"></div>");
}
sb.append("<div class=\"main" + nightModeClass + "\">\n");
sb.append("<h1>").append(article.getTitle()).append("</h1>");
sb.append(article.getContent());
@ -400,14 +400,14 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme
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);