diff --git a/app/src/main/java/net/gsantner/markor/format/TextConverterBase.java b/app/src/main/java/net/gsantner/markor/format/TextConverterBase.java index 946ce4fa20..e8ba5af29a 100644 --- a/app/src/main/java/net/gsantner/markor/format/TextConverterBase.java +++ b/app/src/main/java/net/gsantner/markor/format/TextConverterBase.java @@ -124,8 +124,8 @@ public String convertMarkupShowInWebView(Document document, String content, Acti /** * Convert markup text to target format * - * @param markup Markup text - * @param context Android Context + * @param markup Markup text + * @param context Android Context * @param lightMode * @param lineNum * @return html as String diff --git a/app/src/main/java/net/gsantner/markor/format/wikitext/WikitextTextConverter.java b/app/src/main/java/net/gsantner/markor/format/wikitext/WikitextTextConverter.java index c0598dec0b..ddee87aca2 100644 --- a/app/src/main/java/net/gsantner/markor/format/wikitext/WikitextTextConverter.java +++ b/app/src/main/java/net/gsantner/markor/format/wikitext/WikitextTextConverter.java @@ -35,11 +35,11 @@ public class WikitextTextConverter extends TextConverterBase { /** * First, convert Wikitext to regular Markor markdown. Then, calls the regular converter. * - * @param markup Markup text - * @param context Android Context - * @param lightMode True if the light theme is to apply. + * @param markup Markup text + * @param context Android Context + * @param lightMode True if the light theme is to apply. * @param lineNum - * @param file The file to convert. + * @param file The file to convert. * @return HTML text */ @Override diff --git a/app/src/main/java/net/gsantner/markor/frontend/textview/TextViewUtils.java b/app/src/main/java/net/gsantner/markor/frontend/textview/TextViewUtils.java index 0f0724eda0..889d2debf8 100644 --- a/app/src/main/java/net/gsantner/markor/frontend/textview/TextViewUtils.java +++ b/app/src/main/java/net/gsantner/markor/frontend/textview/TextViewUtils.java @@ -9,7 +9,6 @@ #########################################################*/ package net.gsantner.markor.frontend.textview; -import android.animation.ObjectAnimator; import android.content.res.Resources; import android.graphics.Rect; import android.os.Build; @@ -216,7 +215,7 @@ public static int[] countChars(final CharSequence s, final char... chars) { public static int[] countChars(final CharSequence s, int start, int end, final char... chars) { // Faster specialization for the common single case if (chars.length == 1) { - return new int[] {countChar(s, start, end, chars[0])}; + return new int[]{countChar(s, start, end, chars[0])}; } final int[] counts = new int[chars.length]; diff --git a/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserFragment.java b/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserFragment.java index 33e6d029f3..1f67b39615 100644 --- a/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserFragment.java +++ b/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserFragment.java @@ -21,9 +21,7 @@ import android.app.Activity; import android.content.Context; import android.graphics.Color; -import android.os.Build; import android.os.Bundle; -import android.text.TextUtils; import android.util.Pair; import android.view.Menu; import android.view.MenuInflater; @@ -31,7 +29,6 @@ import android.view.View; import android.widget.TextView; import android.widget.Toast; -import android.widget.Toolbar; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -47,7 +44,6 @@ import net.gsantner.markor.frontend.MarkorDialogFactory; import net.gsantner.markor.frontend.filebrowser.MarkorFileBrowserFactory; import net.gsantner.markor.frontend.filesearch.FileSearchEngine; -import net.gsantner.markor.frontend.textview.TextViewUtils; import net.gsantner.markor.model.AppSettings; import net.gsantner.markor.util.MarkorContextUtils; import net.gsantner.opoc.frontend.base.GsFragmentBase; diff --git a/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserListAdapter.java b/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserListAdapter.java index c4d2dd3e35..fda4c30e88 100644 --- a/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserListAdapter.java +++ b/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserListAdapter.java @@ -487,8 +487,9 @@ public File createDirectoryHere(final CharSequence name) { /** * Show a file in the current folder and blink it - * @param file File to blink - * @param recycler RecyclerView which holds the file items + * + * @param file File to blink + * @param recycler RecyclerView which holds the file items */ public void showAndBlink(final File file, final RecyclerView recycler) { final int pos = getFilePosition(file); diff --git a/app/src/main/java/net/gsantner/opoc/frontend/textview/TextViewUndoRedo.java b/app/src/main/java/net/gsantner/opoc/frontend/textview/TextViewUndoRedo.java index 1c6bab0ecb..f2c9cfc862 100644 --- a/app/src/main/java/net/gsantner/opoc/frontend/textview/TextViewUndoRedo.java +++ b/app/src/main/java/net/gsantner/opoc/frontend/textview/TextViewUndoRedo.java @@ -533,8 +533,9 @@ public void afterTextChanged(final Editable s) { } final int CHAR = 0, SPACE = 1, NL = 2; + private int typeOf(final char c) { - switch(c) { + switch (c) { case '\n': return NL; case ' ':