From d52178d793df693db7899c5e070ba3108907848e Mon Sep 17 00:00:00 2001 From: Ezerous Date: Thu, 18 Oct 2018 13:15:24 +0300 Subject: [PATCH] Reduced size of username in drawer --- app/build.gradle | 5 ++--- .../thmmy/mthmmy/activities/AboutActivity.java | 12 ++++++------ .../thmmy/mthmmy/activities/LoginActivity.java | 4 ++-- .../mthmmy/activities/board/BoardActivity.java | 11 ++++++----- .../mthmmy/activities/board/BoardAdapter.java | 2 +- .../bookmarks/BoardBookmarksFragment.java | 4 ++-- .../activities/bookmarks/BookmarkActivity.java | 11 ++++++----- .../bookmarks/TopicBookmarksFragment.java | 6 +++--- .../create_content/CreateContentActivity.java | 3 ++- .../activities/downloads/DownloadsAdapter.java | 2 +- .../activities/main/forum/ForumAdapter.java | 4 ++-- .../activities/main/forum/ForumFragment.java | 6 +++--- .../activities/main/recent/RecentAdapter.java | 4 ++-- .../activities/main/recent/RecentFragment.java | 6 +++--- .../activities/main/unread/UnreadAdapter.java | 4 ++-- .../activities/main/unread/UnreadFragment.java | 8 ++++---- .../activities/profile/ProfileActivity.java | 16 ++++++++-------- .../profile/latestPosts/LatestPostsAdapter.java | 2 +- .../profile/latestPosts/LatestPostsFragment.java | 6 +++--- .../activities/profile/stats/StatsFragment.java | 2 +- .../profile/summary/SummaryFragment.java | 2 +- .../activities/settings/SettingsActivity.java | 2 +- .../activities/settings/SettingsFragment.java | 8 ++++---- .../mthmmy/activities/topic/TopicActivity.java | 15 ++++++++------- .../mthmmy/activities/topic/TopicAdapter.java | 15 +++++++-------- .../mthmmy/activities/upload/UploadActivity.java | 11 ++++++----- .../upload/UploadFieldsBuilderActivity.java | 6 +++--- .../mthmmy/activities/upload/UploadsHelper.java | 4 ++-- .../gr/thmmy/mthmmy/base/BaseApplication.java | 2 +- .../java/gr/thmmy/mthmmy/base/BaseFragment.java | 2 +- .../thmmy/mthmmy/editorview/EmojiKeyboard.java | 6 +++--- .../mthmmy/editorview/EmojiKeyboardAdapter.java | 6 +++--- .../mthmmy/editorview/FormatButtonsAdapter.java | 6 +++--- .../java/gr/thmmy/mthmmy/model/Bookmark.java | 6 +++--- .../main/java/gr/thmmy/mthmmy/model/Post.java | 4 ++-- .../java/gr/thmmy/mthmmy/model/Shoutbox.java | 3 --- .../mthmmy/services/NotificationService.java | 6 +++--- .../gr/thmmy/mthmmy/session/SessionManager.java | 4 ++-- .../utils/AppCompatSpinnerWithoutDefault.java | 3 ++- .../thmmy/mthmmy/utils/CenterVerticalSpan.java | 3 ++- .../mthmmy/utils/CustomLinearLayoutManager.java | 2 +- .../thmmy/mthmmy/utils/CustomRecyclerView.java | 3 ++- .../java/gr/thmmy/mthmmy/utils/FileUtils.java | 3 ++- .../mthmmy/utils/ScrollAwareFABBehavior.java | 10 ++++++---- .../mthmmy/utils/ScrollAwareLinearBehavior.java | 10 ++++++---- .../gr/thmmy/mthmmy/viewmodel/BaseViewModel.java | 1 - .../thmmy/mthmmy/viewmodel/TopicViewModel.java | 2 +- app/src/main/res/values/dimens.xml | 1 + 48 files changed, 136 insertions(+), 128 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a5e0cbee..be0f9541 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -75,13 +75,14 @@ static def getCommitHash() { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.0.0' - implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.preference:preference:1.0.0' implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'com.google.android.material:material:1.0.0' implementation 'com.google.firebase:firebase-core:16.0.4' implementation 'com.google.firebase:firebase-messaging:17.3.3' implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5' @@ -101,8 +102,6 @@ dependencies { implementation "ru.noties:markwon:2.0.0" implementation 'net.gotev:uploadservice:3.4.2' implementation 'net.gotev:uploadservice-okhttp:3.4.2' - implementation 'com.google.android.material:material:1.0.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' } apply plugin: 'com.google.gms.google-services' diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/AboutActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/AboutActivity.java index 741e11f3..93016bc0 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/AboutActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/AboutActivity.java @@ -4,11 +4,6 @@ import android.content.Intent; import android.content.pm.ActivityInfo; import android.net.Uri; import android.os.Bundle; -import com.google.android.material.appbar.AppBarLayout; -import androidx.coordinatorlayout.widget.CoordinatorLayout; -import androidx.drawerlayout.widget.DrawerLayout; -import androidx.appcompat.app.AlertDialog; - import android.text.SpannableString; import android.text.method.LinkMovementMethod; import android.text.style.UnderlineSpan; @@ -19,6 +14,11 @@ import android.widget.FrameLayout; import android.widget.ScrollView; import android.widget.TextView; +import com.google.android.material.appbar.AppBarLayout; + +import androidx.appcompat.app.AlertDialog; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import androidx.drawerlayout.widget.DrawerLayout; import gr.thmmy.mthmmy.BuildConfig; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseActivity; @@ -50,7 +50,7 @@ public class AboutActivity extends BaseActivity { String versionInfo = ""; if(gitExists) - versionInfo = "-" + BuildConfig.CURRENT_BRANCH + "-" + commitHash; + versionInfo = "-" + BuildConfig.CURRENT_BRANCH + "-" + commitHash + " "; //Initialize appbar appBar = findViewById(R.id.appbar); diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java index ba423202..29ab9b1b 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/LoginActivity.java @@ -3,8 +3,6 @@ package gr.thmmy.mthmmy.activities; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; -import androidx.preference.PreferenceManager; -import androidx.appcompat.widget.AppCompatButton; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; @@ -14,6 +12,8 @@ import android.widget.Toast; import com.google.firebase.analytics.FirebaseAnalytics; +import androidx.appcompat.widget.AppCompatButton; +import androidx.preference.PreferenceManager; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.main.MainActivity; import gr.thmmy.mthmmy.base.BaseActivity; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java index addf7ff5..ae6852fb 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java @@ -4,15 +4,12 @@ import android.content.Intent; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; -import com.google.android.material.floatingactionbutton.FloatingActionButton; -import androidx.appcompat.app.AlertDialog; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.ProgressBar; import android.widget.Toast; +import com.google.android.material.floatingactionbutton.FloatingActionButton; + import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; @@ -20,6 +17,10 @@ import org.jsoup.select.Elements; import java.util.ArrayList; import java.util.Objects; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.LoginActivity; import gr.thmmy.mthmmy.activities.create_content.CreateContentActivity; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardAdapter.java index 6b0c7267..7467c408 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardAdapter.java @@ -5,7 +5,6 @@ import android.content.Intent; import android.graphics.Typeface; import android.os.Build; import android.os.Bundle; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -16,6 +15,7 @@ import android.widget.TextView; import java.util.ArrayList; import java.util.Objects; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.topic.TopicActivity; import gr.thmmy.mthmmy.model.Board; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java index b191aebd..8a14611c 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BoardBookmarksFragment.java @@ -5,8 +5,6 @@ import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -16,6 +14,8 @@ import android.widget.TextView; import java.util.ArrayList; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.model.Bookmark; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarkActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarkActivity.java index 57cec031..d6ba695c 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarkActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/BookmarkActivity.java @@ -2,17 +2,18 @@ package gr.thmmy.mthmmy.activities.bookmarks; import android.content.Intent; import android.os.Bundle; +import android.widget.Toast; + import com.google.android.material.tabs.TabLayout; + +import java.util.ArrayList; +import java.util.List; + import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; import androidx.fragment.app.FragmentStatePagerAdapter; import androidx.viewpager.widget.ViewPager; -import android.widget.Toast; - -import java.util.ArrayList; -import java.util.List; - import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.board.BoardActivity; import gr.thmmy.mthmmy.activities.topic.TopicActivity; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/TopicBookmarksFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/TopicBookmarksFragment.java index d57cba4e..77992b2d 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/TopicBookmarksFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/bookmarks/TopicBookmarksFragment.java @@ -5,9 +5,6 @@ import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat; -import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -17,6 +14,9 @@ import android.widget.TextView; import java.util.ArrayList; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.model.Bookmark; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/CreateContentActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/CreateContentActivity.java index bc9b3382..920a03b9 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/CreateContentActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/create_content/CreateContentActivity.java @@ -4,13 +4,14 @@ import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; -import com.google.android.material.textfield.TextInputLayout; import android.text.InputType; import android.text.TextUtils; import android.view.View; import android.view.inputmethod.EditorInfo; import android.widget.Toast; +import com.google.android.material.textfield.TextInputLayout; + import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.settings.SettingsActivity; import gr.thmmy.mthmmy.base.BaseActivity; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsAdapter.java index 5f38aea5..5b6ec26e 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/downloads/DownloadsAdapter.java @@ -5,7 +5,6 @@ import android.content.Intent; import android.graphics.Typeface; import android.os.Build; import android.os.Bundle; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -18,6 +17,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.Objects; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseActivity; import gr.thmmy.mthmmy.model.Download; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumAdapter.java index 1890ff8f..718c1b8d 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumAdapter.java @@ -1,8 +1,6 @@ package gr.thmmy.mthmmy.activities.main.forum; import android.content.Context; -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -14,6 +12,8 @@ import com.bignerdranch.expandablerecyclerview.ParentViewHolder; import java.util.List; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.Board; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumFragment.java index 5b1aa286..782ffb71 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/forum/ForumFragment.java @@ -2,9 +2,6 @@ package gr.thmmy.mthmmy.activities.main.forum; import android.os.AsyncTask; import android.os.Bundle; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -22,6 +19,9 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseActivity; import gr.thmmy.mthmmy.base.BaseApplication; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentAdapter.java index 7a05cb3e..31871069 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentAdapter.java @@ -1,8 +1,6 @@ package gr.thmmy.mthmmy.activities.main.recent; import android.content.Context; -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -10,6 +8,8 @@ import android.widget.TextView; import java.util.List; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.TopicSummary; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentFragment.java index 34175435..01f84261 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/recent/RecentFragment.java @@ -2,9 +2,6 @@ package gr.thmmy.mthmmy.activities.main.recent; import android.os.AsyncTask; import android.os.Bundle; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -20,6 +17,9 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseApplication; import gr.thmmy.mthmmy.base.BaseFragment; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadAdapter.java index 826e37fb..8810da1a 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadAdapter.java @@ -1,7 +1,5 @@ package gr.thmmy.mthmmy.activities.main.unread; -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -9,6 +7,8 @@ import android.widget.TextView; import java.util.List; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.TopicSummary; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadFragment.java index 18ff8039..76b595dd 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/unread/UnreadFragment.java @@ -2,10 +2,6 @@ package gr.thmmy.mthmmy.activities.main.unread; import android.os.AsyncTask; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -21,6 +17,10 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseApplication; import gr.thmmy.mthmmy.base.BaseFragment; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/ProfileActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/ProfileActivity.java index ce19849d..99015a2b 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/ProfileActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/ProfileActivity.java @@ -7,14 +7,6 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import com.google.android.material.floatingactionbutton.FloatingActionButton; -import com.google.android.material.tabs.TabLayout; -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentManager; -import androidx.fragment.app.FragmentPagerAdapter; -import androidx.core.content.res.ResourcesCompat; -import androidx.viewpager.widget.ViewPager; -import androidx.appcompat.app.AppCompatDelegate; import android.text.Spannable; import android.text.SpannableString; import android.text.Spanned; @@ -26,6 +18,8 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.tabs.TabLayout; import com.squareup.picasso.Picasso; import org.jsoup.Jsoup; @@ -39,6 +33,12 @@ import java.util.Objects; import javax.net.ssl.SSLHandshakeException; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.core.content.res.ResourcesCompat; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.viewpager.widget.ViewPager; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.profile.latestPosts.LatestPostsFragment; import gr.thmmy.mthmmy.activities.profile.stats.StatsFragment; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java index 31ec223d..e3c3ec8d 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java @@ -1,6 +1,5 @@ package gr.thmmy.mthmmy.activities.profile.latestPosts; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -10,6 +9,7 @@ import android.widget.TextView; import java.util.ArrayList; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.PostSummary; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsFragment.java index 356fbab7..9736d3fd 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsFragment.java @@ -2,9 +2,6 @@ package gr.thmmy.mthmmy.activities.profile.latestPosts; import android.os.AsyncTask; import android.os.Bundle; -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -20,6 +17,9 @@ import java.util.ArrayList; import javax.net.ssl.SSLHandshakeException; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseActivity; import gr.thmmy.mthmmy.base.BaseFragment; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java index 2ae7140a..eca17c0e 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java @@ -4,7 +4,6 @@ import android.graphics.Color; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -38,6 +37,7 @@ import java.util.List; import javax.net.ssl.SSLHandshakeException; +import androidx.fragment.app.Fragment; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseActivity; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/summary/SummaryFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/summary/SummaryFragment.java index f3d68fe4..867707ee 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/profile/summary/SummaryFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/profile/summary/SummaryFragment.java @@ -4,7 +4,6 @@ import android.graphics.Color; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import androidx.fragment.app.Fragment; import android.text.Html; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; @@ -22,6 +21,7 @@ import org.jsoup.select.Elements; import java.util.ArrayList; import java.util.Objects; +import androidx.fragment.app.Fragment; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.utils.parsing.ParseHelpers; import timber.log.Timber; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsActivity.java index cc2a7f6d..a884d3a6 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsActivity.java @@ -1,8 +1,8 @@ package gr.thmmy.mthmmy.activities.settings; import android.os.Bundle; -import androidx.fragment.app.FragmentTransaction; +import androidx.fragment.app.FragmentTransaction; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseActivity; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java index 5956e79a..eb0a2070 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java @@ -8,15 +8,15 @@ import android.media.RingtoneManager; import android.net.Uri; import android.os.Bundle; import android.provider.Settings; -import androidx.annotation.NonNull; -import androidx.preference.ListPreference; -import androidx.preference.Preference; -import androidx.preference.PreferenceFragmentCompat; import android.view.View; import android.widget.Toast; import java.util.ArrayList; +import androidx.annotation.NonNull; +import androidx.preference.ListPreference; +import androidx.preference.Preference; +import androidx.preference.PreferenceFragmentCompat; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseApplication; import timber.log.Timber; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java index d7284ae8..88be719c 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java @@ -2,7 +2,6 @@ package gr.thmmy.mthmmy.activities.topic; import android.annotation.SuppressLint; import android.app.NotificationManager; -import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.content.Intent; import android.graphics.Rect; @@ -10,12 +9,6 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Handler; -import com.google.android.material.floatingactionbutton.FloatingActionButton; -import com.google.android.material.snackbar.Snackbar; -import androidx.core.content.res.ResourcesCompat; -import androidx.appcompat.app.AlertDialog; -import androidx.appcompat.app.AppCompatDelegate; -import androidx.recyclerview.widget.RecyclerView; import android.text.Spannable; import android.text.SpannableString; import android.text.SpannableStringBuilder; @@ -34,8 +27,16 @@ import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; + import java.util.ArrayList; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.core.content.res.ResourcesCompat; +import androidx.lifecycle.ViewModelProviders; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.topic.tasks.EditTask; import gr.thmmy.mthmmy.activities.topic.tasks.PrepareForEditTask; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java index 1c32ce2d..53ef01cc 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java @@ -2,7 +2,6 @@ package gr.thmmy.mthmmy.activities.topic; import android.annotation.SuppressLint; import android.annotation.TargetApi; -import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.content.Intent; import android.graphics.Color; @@ -11,13 +10,6 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.core.content.res.ResourcesCompat; -import androidx.appcompat.app.AlertDialog; -import androidx.appcompat.content.res.AppCompatResources; -import androidx.appcompat.widget.AppCompatButton; -import androidx.recyclerview.widget.RecyclerView; - import android.text.Html; import android.text.InputType; import android.text.TextUtils; @@ -54,6 +46,13 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.content.res.AppCompatResources; +import androidx.appcompat.widget.AppCompatButton; +import androidx.core.content.res.ResourcesCompat; +import androidx.lifecycle.ViewModelProviders; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.board.BoardActivity; import gr.thmmy.mthmmy.activities.profile.ProfileActivity; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java index a7d7dc22..44988402 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadActivity.java @@ -11,11 +11,6 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.provider.MediaStore; -import com.google.android.material.floatingactionbutton.FloatingActionButton; -import androidx.appcompat.content.res.AppCompatResources; -import androidx.preference.PreferenceManager; -import androidx.appcompat.widget.AppCompatButton; -import androidx.appcompat.widget.AppCompatTextView; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; @@ -24,6 +19,8 @@ import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.Toast; +import com.google.android.material.floatingactionbutton.FloatingActionButton; + import net.gotev.uploadservice.MultipartUploadRequest; import net.gotev.uploadservice.ServerResponse; import net.gotev.uploadservice.UploadInfo; @@ -43,6 +40,10 @@ import java.util.Date; import java.util.List; import java.util.Locale; +import androidx.appcompat.content.res.AppCompatResources; +import androidx.appcompat.widget.AppCompatButton; +import androidx.appcompat.widget.AppCompatTextView; +import androidx.preference.PreferenceManager; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseActivity; import gr.thmmy.mthmmy.base.BaseApplication; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadFieldsBuilderActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadFieldsBuilderActivity.java index fffb5064..f9fd9407 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadFieldsBuilderActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadFieldsBuilderActivity.java @@ -3,9 +3,6 @@ package gr.thmmy.mthmmy.activities.upload; import android.app.Activity; import android.content.Intent; import android.os.Bundle; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AppCompatActivity; -import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.view.View; @@ -16,6 +13,9 @@ import android.widget.Toast; import java.util.Calendar; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import gr.thmmy.mthmmy.R; import timber.log.Timber; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadsHelper.java b/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadsHelper.java index 0da38a6e..e5f5301b 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadsHelper.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/upload/UploadsHelper.java @@ -10,8 +10,6 @@ import android.media.ExifInterface; import android.net.Uri; import android.os.Environment; import android.provider.OpenableColumns; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; import android.widget.Toast; import java.io.BufferedInputStream; @@ -22,6 +20,8 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import timber.log.Timber; class UploadsHelper { diff --git a/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java b/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java index a6cf97eb..d181301d 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java +++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java @@ -6,7 +6,6 @@ import android.content.SharedPreferences; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; -import androidx.core.content.ContextCompat; import android.util.DisplayMetrics; import android.widget.ImageView; @@ -29,6 +28,7 @@ import net.gotev.uploadservice.okhttp.OkHttpStack; import java.util.Objects; import java.util.concurrent.TimeUnit; +import androidx.core.content.ContextCompat; import androidx.preference.PreferenceManager; import gr.thmmy.mthmmy.BuildConfig; import gr.thmmy.mthmmy.R; diff --git a/app/src/main/java/gr/thmmy/mthmmy/base/BaseFragment.java b/app/src/main/java/gr/thmmy/mthmmy/base/BaseFragment.java index 960834e0..03622e83 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseFragment.java @@ -2,9 +2,9 @@ package gr.thmmy.mthmmy.base; import android.content.Context; import android.os.Bundle; + import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; - import okhttp3.OkHttpClient; public abstract class BaseFragment extends Fragment { diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboard.java b/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboard.java index 717aedf0..cd57fb5e 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboard.java +++ b/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboard.java @@ -2,9 +2,6 @@ package gr.thmmy.mthmmy.editorview; import android.content.Context; import android.os.Handler; -import androidx.appcompat.widget.AppCompatImageButton; -import androidx.recyclerview.widget.GridLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.util.AttributeSet; import android.view.LayoutInflater; @@ -14,6 +11,9 @@ import android.widget.LinearLayout; import java.util.HashSet; +import androidx.appcompat.widget.AppCompatImageButton; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; public class EmojiKeyboard extends LinearLayout implements IEmojiKeyboard { diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboardAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboardAdapter.java index 39e81c06..c3b0758b 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboardAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboardAdapter.java @@ -1,13 +1,13 @@ package gr.thmmy.mthmmy.editorview; import android.graphics.drawable.AnimationDrawable; -import androidx.annotation.NonNull; -import androidx.appcompat.widget.AppCompatImageButton; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.AppCompatImageButton; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; public class EmojiKeyboardAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/FormatButtonsAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/editorview/FormatButtonsAdapter.java index 6daa6ccc..98277550 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/FormatButtonsAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/editorview/FormatButtonsAdapter.java @@ -1,12 +1,12 @@ package gr.thmmy.mthmmy.editorview; -import androidx.annotation.NonNull; -import androidx.appcompat.widget.AppCompatImageButton; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.AppCompatImageButton; +import androidx.recyclerview.widget.RecyclerView; import gr.thmmy.mthmmy.R; public class FormatButtonsAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/gr/thmmy/mthmmy/model/Bookmark.java b/app/src/main/java/gr/thmmy/mthmmy/model/Bookmark.java index 6c07448b..de35e0d0 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/model/Bookmark.java +++ b/app/src/main/java/gr/thmmy/mthmmy/model/Bookmark.java @@ -1,11 +1,11 @@ package gr.thmmy.mthmmy.model; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - import java.util.ArrayList; import java.util.Objects; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + public class Bookmark implements java.io.Serializable { private final String title, id; private boolean isNotificationsEnabled; diff --git a/app/src/main/java/gr/thmmy/mthmmy/model/Post.java b/app/src/main/java/gr/thmmy/mthmmy/model/Post.java index ce212d3b..f3c9bd8d 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/model/Post.java +++ b/app/src/main/java/gr/thmmy/mthmmy/model/Post.java @@ -1,10 +1,10 @@ package gr.thmmy.mthmmy.model; -import androidx.annotation.Nullable; - import java.util.ArrayList; import java.util.Objects; +import androidx.annotation.Nullable; + /** * Class that defines a topic's post. All member variables are declared final (thus no setters are * supplied). Class has two constructors and getter methods for all variables. diff --git a/app/src/main/java/gr/thmmy/mthmmy/model/Shoutbox.java b/app/src/main/java/gr/thmmy/mthmmy/model/Shoutbox.java index 73f0cc3e..0bc13d30 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/model/Shoutbox.java +++ b/app/src/main/java/gr/thmmy/mthmmy/model/Shoutbox.java @@ -1,8 +1,5 @@ package gr.thmmy.mthmmy.model; -import androidx.annotation.NonNull; -import timber.log.Timber; - public class Shoutbox { private Shout[] shouts; private String sc, sendShoutUrl, shoutName, shoutSend, shoutUrl; diff --git a/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java b/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java index eadda267..6d254021 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java +++ b/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java @@ -12,9 +12,6 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.service.notification.StatusBarNotification; -import androidx.annotation.RequiresApi; -import androidx.core.app.NotificationCompat; -import androidx.preference.PreferenceManager; import com.google.firebase.messaging.FirebaseMessagingService; import com.google.firebase.messaging.RemoteMessage; @@ -22,6 +19,9 @@ import com.google.firebase.messaging.RemoteMessage; import org.json.JSONException; import org.json.JSONObject; +import androidx.annotation.RequiresApi; +import androidx.core.app.NotificationCompat; +import androidx.preference.PreferenceManager; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.topic.TopicActivity; import gr.thmmy.mthmmy.base.BaseApplication; diff --git a/app/src/main/java/gr/thmmy/mthmmy/session/SessionManager.java b/app/src/main/java/gr/thmmy/mthmmy/session/SessionManager.java index 560c7089..97e1dddb 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/session/SessionManager.java +++ b/app/src/main/java/gr/thmmy/mthmmy/session/SessionManager.java @@ -1,8 +1,6 @@ package gr.thmmy.mthmmy.session; import android.content.SharedPreferences; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; import com.franmontiel.persistentcookiejar.PersistentCookieJar; import com.franmontiel.persistentcookiejar.persistence.SharedPrefsCookiePersistor; @@ -17,6 +15,8 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import gr.thmmy.mthmmy.utils.parsing.ParseException; import okhttp3.Cookie; import okhttp3.FormBody; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/AppCompatSpinnerWithoutDefault.java b/app/src/main/java/gr/thmmy/mthmmy/utils/AppCompatSpinnerWithoutDefault.java index e4848661..b64bb57d 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/AppCompatSpinnerWithoutDefault.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/AppCompatSpinnerWithoutDefault.java @@ -2,7 +2,6 @@ package gr.thmmy.mthmmy.utils; import android.annotation.SuppressLint; import android.content.Context; -import androidx.appcompat.widget.AppCompatSpinner; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; @@ -15,6 +14,8 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import androidx.appcompat.widget.AppCompatSpinner; + public class AppCompatSpinnerWithoutDefault extends AppCompatSpinner { public AppCompatSpinnerWithoutDefault(Context context) { super(context); diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CenterVerticalSpan.java b/app/src/main/java/gr/thmmy/mthmmy/utils/CenterVerticalSpan.java index 5038fe19..104dd01e 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CenterVerticalSpan.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/CenterVerticalSpan.java @@ -3,9 +3,10 @@ package gr.thmmy.mthmmy.utils; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; -import androidx.annotation.NonNull; import android.text.style.ReplacementSpan; +import androidx.annotation.NonNull; + public class CenterVerticalSpan extends ReplacementSpan { @Override public int getSize(@NonNull Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) { diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CustomLinearLayoutManager.java b/app/src/main/java/gr/thmmy/mthmmy/utils/CustomLinearLayoutManager.java index 8e8cf800..de9abfd0 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CustomLinearLayoutManager.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/CustomLinearLayoutManager.java @@ -1,9 +1,9 @@ package gr.thmmy.mthmmy.utils; import android.content.Context; + import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; - import timber.log.Timber; public class CustomLinearLayoutManager extends LinearLayoutManager { diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CustomRecyclerView.java b/app/src/main/java/gr/thmmy/mthmmy/utils/CustomRecyclerView.java index 828b7dab..766e7207 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CustomRecyclerView.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/CustomRecyclerView.java @@ -1,10 +1,11 @@ package gr.thmmy.mthmmy.utils; import android.content.Context; +import android.util.AttributeSet; + import androidx.annotation.Nullable; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import android.util.AttributeSet; //Custom RecyclerView, so EdgeEffect and SwipeRefresh both work public class CustomRecyclerView extends RecyclerView { diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/FileUtils.java b/app/src/main/java/gr/thmmy/mthmmy/utils/FileUtils.java index b9121a7b..1c8eb0b0 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/FileUtils.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/FileUtils.java @@ -1,10 +1,11 @@ package gr.thmmy.mthmmy.utils; -import androidx.annotation.NonNull; import android.webkit.MimeTypeMap; import java.io.File; +import androidx.annotation.NonNull; + import static gr.thmmy.mthmmy.services.DownloadHelper.SAVE_DIR; public class FileUtils { diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java b/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java index d832c6f2..46d412bc 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java @@ -1,13 +1,15 @@ package gr.thmmy.mthmmy.utils; import android.content.Context; -import androidx.annotation.NonNull; -import androidx.coordinatorlayout.widget.CoordinatorLayout; +import android.util.AttributeSet; +import android.view.View; + import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.snackbar.Snackbar; + +import androidx.annotation.NonNull; +import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.core.view.ViewCompat; -import android.util.AttributeSet; -import android.view.View; /** * Extends FloatingActionButton's behavior so the button will hide when scrolling down and show diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java b/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java index c5dfa227..91e2305c 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java @@ -2,14 +2,16 @@ package gr.thmmy.mthmmy.utils; import android.animation.Animator; import android.content.Context; +import android.util.AttributeSet; +import android.view.View; +import android.view.ViewPropertyAnimator; + +import com.google.android.material.snackbar.Snackbar; + import androidx.annotation.NonNull; import androidx.coordinatorlayout.widget.CoordinatorLayout; -import com.google.android.material.snackbar.Snackbar; import androidx.core.view.ViewCompat; import androidx.interpolator.view.animation.FastOutSlowInInterpolator; -import android.util.AttributeSet; -import android.view.View; -import android.view.ViewPropertyAnimator; /** * Extends LinearLayout's behavior. Used for bottom navigation bar. diff --git a/app/src/main/java/gr/thmmy/mthmmy/viewmodel/BaseViewModel.java b/app/src/main/java/gr/thmmy/mthmmy/viewmodel/BaseViewModel.java index 5787b36d..a038c033 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/viewmodel/BaseViewModel.java +++ b/app/src/main/java/gr/thmmy/mthmmy/viewmodel/BaseViewModel.java @@ -3,7 +3,6 @@ package gr.thmmy.mthmmy.viewmodel; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; - import gr.thmmy.mthmmy.model.Bookmark; public class BaseViewModel extends ViewModel { diff --git a/app/src/main/java/gr/thmmy/mthmmy/viewmodel/TopicViewModel.java b/app/src/main/java/gr/thmmy/mthmmy/viewmodel/TopicViewModel.java index 200ac80d..e68dcfb0 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/viewmodel/TopicViewModel.java +++ b/app/src/main/java/gr/thmmy/mthmmy/viewmodel/TopicViewModel.java @@ -1,6 +1,5 @@ package gr.thmmy.mthmmy.viewmodel; -import androidx.lifecycle.MutableLiveData; import android.content.Context; import android.content.SharedPreferences; import android.os.AsyncTask; @@ -11,6 +10,7 @@ import android.widget.RadioGroup; import java.util.ArrayList; +import androidx.lifecycle.MutableLiveData; import gr.thmmy.mthmmy.activities.settings.SettingsActivity; import gr.thmmy.mthmmy.activities.topic.tasks.DeleteTask; import gr.thmmy.mthmmy.activities.topic.tasks.EditTask; diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index f8c62284..40501360 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -12,4 +12,5 @@ 24dp 6dp 12dp + 16sp