From c94ee97d272300f695f55b8e720ad51fe5cd3fab Mon Sep 17 00:00:00 2001 From: Ezerous Date: Wed, 27 May 2020 15:05:22 +0300 Subject: [PATCH] Refactoring --- .../activities/create_content/CreateContentActivity.java | 4 ++-- .../thmmy/mthmmy/activities/main/forum/ForumFragment.java | 2 +- .../mthmmy/activities/main/recent/RecentAdapter.java | 2 +- .../mthmmy/activities/main/recent/RecentFragment.java | 2 +- .../mthmmy/activities/main/unread/UnreadAdapter.java | 2 +- .../mthmmy/activities/main/unread/UnreadFragment.java | 2 +- .../thmmy/mthmmy/activities/profile/ProfileActivity.java | 4 ++-- .../profile/latestPosts/LatestPostsAdapter.java | 2 +- .../gr/thmmy/mthmmy/activities/shoutbox/ShoutAdapter.java | 2 +- .../mthmmy/activities/shoutbox/ShoutboxFragment.java | 6 +++--- .../gr/thmmy/mthmmy/activities/topic/TopicActivity.java | 4 ++-- .../gr/thmmy/mthmmy/activities/topic/TopicAdapter.java | 8 ++++---- .../gr/thmmy/mthmmy/activities/upload/UploadActivity.java | 2 +- .../main/java/gr/thmmy/mthmmy/base/BaseApplication.java | 2 +- .../main/java/gr/thmmy/mthmmy/utils/DateTimeUtils.java | 4 ++-- app/src/main/java/gr/thmmy/mthmmy/utils/NetworkTask.java | 4 ++-- .../mthmmy/utils/{ => crashreporting}/CrashReporter.java | 2 +- .../utils/{ => crashreporting}/CrashReportingTree.java | 2 +- .../thmmy/mthmmy/utils/{ => ui}/CenterVerticalSpan.java | 2 +- .../gr/thmmy/mthmmy/utils/{ => ui}/CircleTransform.java | 2 +- .../mthmmy/utils/{ => ui}/ScrollAwareFABBehavior.java | 2 +- .../mthmmy/utils/{ => ui}/ScrollAwareLinearBehavior.java | 2 +- .../utils/{ => ui}/WebViewOnTouchClickListener.java | 2 +- .../{utils => views}/AppCompatSpinnerWithoutDefault.java | 2 +- .../{utils => views}/CustomLinearLayoutManager.java | 2 +- .../thmmy/mthmmy/{utils => views}/CustomRecyclerView.java | 2 +- .../mthmmy/{utils => views}/RelativeTimeTextView.java | 2 +- .../mthmmy/{utils => views}/ToggledBackgroundButton.java | 2 +- .../thmmy/mthmmy/{ => views}/editorview/EditorView.java | 2 +- .../mthmmy/{ => views}/editorview/EmojiInputField.java | 2 +- .../mthmmy/{ => views}/editorview/EmojiKeyboard.java | 2 +- .../{ => views}/editorview/EmojiKeyboardAdapter.java | 2 +- .../{ => views}/editorview/FormatButtonsAdapter.java | 2 +- .../mthmmy/{ => views}/editorview/IEmojiKeyboard.java | 2 +- app/src/main/res/layout-v21/activity_profile.xml | 2 +- app/src/main/res/layout/activity_board.xml | 2 +- app/src/main/res/layout/activity_create_content.xml | 4 ++-- app/src/main/res/layout/activity_downloads.xml | 2 +- app/src/main/res/layout/activity_profile.xml | 2 +- app/src/main/res/layout/activity_topic.xml | 6 +++--- app/src/main/res/layout/activity_topic_edit_row.xml | 2 +- .../main/res/layout/activity_topic_quick_reply_row.xml | 2 +- app/src/main/res/layout/activity_upload.xml | 6 +++--- app/src/main/res/layout/fragment_forum.xml | 2 +- app/src/main/res/layout/fragment_recent.xml | 2 +- app/src/main/res/layout/fragment_recent_row.xml | 2 +- app/src/main/res/layout/fragment_shoutbox.xml | 6 +++--- app/src/main/res/layout/fragment_unread.xml | 4 ++-- app/src/main/res/layout/fragment_unread_row.xml | 2 +- build.gradle | 2 +- emojis/build.gradle | 2 +- 51 files changed, 69 insertions(+), 69 deletions(-) rename app/src/main/java/gr/thmmy/mthmmy/utils/{ => crashreporting}/CrashReporter.java (98%) rename app/src/main/java/gr/thmmy/mthmmy/utils/{ => crashreporting}/CrashReportingTree.java (94%) rename app/src/main/java/gr/thmmy/mthmmy/utils/{ => ui}/CenterVerticalSpan.java (96%) rename app/src/main/java/gr/thmmy/mthmmy/utils/{ => ui}/CircleTransform.java (97%) rename app/src/main/java/gr/thmmy/mthmmy/utils/{ => ui}/ScrollAwareFABBehavior.java (98%) rename app/src/main/java/gr/thmmy/mthmmy/utils/{ => ui}/ScrollAwareLinearBehavior.java (99%) rename app/src/main/java/gr/thmmy/mthmmy/utils/{ => ui}/WebViewOnTouchClickListener.java (98%) rename app/src/main/java/gr/thmmy/mthmmy/{utils => views}/AppCompatSpinnerWithoutDefault.java (99%) rename app/src/main/java/gr/thmmy/mthmmy/{utils => views}/CustomLinearLayoutManager.java (97%) rename app/src/main/java/gr/thmmy/mthmmy/{utils => views}/CustomRecyclerView.java (98%) rename app/src/main/java/gr/thmmy/mthmmy/{utils => views}/RelativeTimeTextView.java (99%) rename app/src/main/java/gr/thmmy/mthmmy/{utils => views}/ToggledBackgroundButton.java (95%) rename app/src/main/java/gr/thmmy/mthmmy/{ => views}/editorview/EditorView.java (99%) rename app/src/main/java/gr/thmmy/mthmmy/{ => views}/editorview/EmojiInputField.java (81%) rename app/src/main/java/gr/thmmy/mthmmy/{ => views}/editorview/EmojiKeyboard.java (99%) rename app/src/main/java/gr/thmmy/mthmmy/{ => views}/editorview/EmojiKeyboardAdapter.java (98%) rename app/src/main/java/gr/thmmy/mthmmy/{ => views}/editorview/FormatButtonsAdapter.java (98%) rename app/src/main/java/gr/thmmy/mthmmy/{ => views}/editorview/IEmojiKeyboard.java (95%) 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 920a03b9..29b0c699 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 @@ -15,9 +15,9 @@ 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; -import gr.thmmy.mthmmy.editorview.EditorView; -import gr.thmmy.mthmmy.editorview.EmojiKeyboard; import gr.thmmy.mthmmy.session.SessionManager; +import gr.thmmy.mthmmy.views.editorview.EditorView; +import gr.thmmy.mthmmy.views.editorview.EmojiKeyboard; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import timber.log.Timber; 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 86860ec1..061db9d2 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 @@ -30,10 +30,10 @@ import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.Board; import gr.thmmy.mthmmy.model.Category; import gr.thmmy.mthmmy.session.SessionManager; -import gr.thmmy.mthmmy.utils.CustomRecyclerView; import gr.thmmy.mthmmy.utils.NetworkResultCodes; import gr.thmmy.mthmmy.utils.parsing.NewParseTask; import gr.thmmy.mthmmy.utils.parsing.ParseException; +import gr.thmmy.mthmmy.views.CustomRecyclerView; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; 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 4a805f8b..084c3a3a 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 @@ -14,7 +14,7 @@ import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseApplication; import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.TopicSummary; -import gr.thmmy.mthmmy.utils.RelativeTimeTextView; +import gr.thmmy.mthmmy.views.RelativeTimeTextView; import timber.log.Timber; 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 673dc32a..5b27c570 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 @@ -26,10 +26,10 @@ import gr.thmmy.mthmmy.base.BaseApplication; import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.TopicSummary; import gr.thmmy.mthmmy.session.SessionManager; -import gr.thmmy.mthmmy.utils.CustomRecyclerView; import gr.thmmy.mthmmy.utils.NetworkResultCodes; import gr.thmmy.mthmmy.utils.parsing.NewParseTask; import gr.thmmy.mthmmy.utils.parsing.ParseException; +import gr.thmmy.mthmmy.views.CustomRecyclerView; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import okhttp3.Response; import timber.log.Timber; 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 c9568fb7..068f5e61 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 @@ -14,7 +14,7 @@ import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseApplication; import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.TopicSummary; -import gr.thmmy.mthmmy.utils.RelativeTimeTextView; +import gr.thmmy.mthmmy.views.RelativeTimeTextView; import timber.log.Timber; class UnreadAdapter extends RecyclerView.Adapter { 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 8bac71ba..e388dc2e 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 @@ -31,10 +31,10 @@ import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.TopicSummary; import gr.thmmy.mthmmy.session.SessionManager; -import gr.thmmy.mthmmy.utils.CustomRecyclerView; import gr.thmmy.mthmmy.utils.NetworkResultCodes; import gr.thmmy.mthmmy.utils.parsing.NewParseTask; import gr.thmmy.mthmmy.utils.parsing.ParseException; +import gr.thmmy.mthmmy.views.CustomRecyclerView; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import okhttp3.Request; import okhttp3.Response; 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 e3425c3c..301d4b5a 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 @@ -46,12 +46,12 @@ import gr.thmmy.mthmmy.activities.topic.TopicActivity; import gr.thmmy.mthmmy.base.BaseActivity; import gr.thmmy.mthmmy.model.PostSummary; import gr.thmmy.mthmmy.model.ThmmyPage; -import gr.thmmy.mthmmy.utils.CenterVerticalSpan; -import gr.thmmy.mthmmy.utils.CircleTransform; import gr.thmmy.mthmmy.utils.NetworkResultCodes; import gr.thmmy.mthmmy.utils.Parcel; import gr.thmmy.mthmmy.utils.parsing.NewParseTask; import gr.thmmy.mthmmy.utils.parsing.ParseException; +import gr.thmmy.mthmmy.utils.ui.CenterVerticalSpan; +import gr.thmmy.mthmmy.utils.ui.CircleTransform; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import okhttp3.Response; import timber.log.Timber; 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 5b401f01..83dfddc2 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 @@ -18,7 +18,7 @@ import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseFragment; import gr.thmmy.mthmmy.model.PostSummary; import gr.thmmy.mthmmy.model.TopicSummary; -import gr.thmmy.mthmmy.utils.WebViewOnTouchClickListener; +import gr.thmmy.mthmmy.utils.ui.WebViewOnTouchClickListener; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; /** diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutAdapter.java index 9976975e..d2639fe2 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutAdapter.java @@ -23,7 +23,7 @@ import gr.thmmy.mthmmy.activities.profile.ProfileActivity; import gr.thmmy.mthmmy.activities.topic.TopicActivity; import gr.thmmy.mthmmy.model.Shout; import gr.thmmy.mthmmy.model.ThmmyPage; -import gr.thmmy.mthmmy.utils.CustomRecyclerView; +import gr.thmmy.mthmmy.views.CustomRecyclerView; import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; import static gr.thmmy.mthmmy.activities.board.BoardActivity.BUNDLE_BOARD_TITLE; diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutboxFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutboxFragment.java index ad42a414..12d5f5eb 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutboxFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/shoutbox/ShoutboxFragment.java @@ -19,13 +19,13 @@ import androidx.recyclerview.widget.LinearLayoutManager; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseApplication; -import gr.thmmy.mthmmy.editorview.EditorView; -import gr.thmmy.mthmmy.editorview.EmojiKeyboard; import gr.thmmy.mthmmy.model.Shout; import gr.thmmy.mthmmy.model.Shoutbox; -import gr.thmmy.mthmmy.utils.CustomRecyclerView; import gr.thmmy.mthmmy.utils.NetworkResultCodes; import gr.thmmy.mthmmy.viewmodel.ShoutboxViewModel; +import gr.thmmy.mthmmy.views.CustomRecyclerView; +import gr.thmmy.mthmmy.views.editorview.EditorView; +import gr.thmmy.mthmmy.views.editorview.EmojiKeyboard; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; 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 2a9defb9..8e81cdd4 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 @@ -49,16 +49,16 @@ import gr.thmmy.mthmmy.activities.topic.tasks.ReplyTask; import gr.thmmy.mthmmy.activities.topic.tasks.TopicTask; import gr.thmmy.mthmmy.base.BaseActivity; import gr.thmmy.mthmmy.base.BaseApplication; -import gr.thmmy.mthmmy.editorview.EmojiKeyboard; import gr.thmmy.mthmmy.model.Bookmark; import gr.thmmy.mthmmy.model.Post; import gr.thmmy.mthmmy.model.ThmmyPage; import gr.thmmy.mthmmy.model.TopicItem; -import gr.thmmy.mthmmy.utils.CustomLinearLayoutManager; import gr.thmmy.mthmmy.utils.HTMLUtils; import gr.thmmy.mthmmy.utils.NetworkResultCodes; import gr.thmmy.mthmmy.utils.parsing.ParseHelpers; import gr.thmmy.mthmmy.viewmodel.TopicViewModel; +import gr.thmmy.mthmmy.views.CustomLinearLayoutManager; +import gr.thmmy.mthmmy.views.editorview.EmojiKeyboard; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import timber.log.Timber; 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 327fe44d..1a195624 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 @@ -65,18 +65,18 @@ import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.activities.board.BoardActivity; import gr.thmmy.mthmmy.activities.profile.ProfileActivity; import gr.thmmy.mthmmy.base.BaseActivity; -import gr.thmmy.mthmmy.editorview.EditorView; -import gr.thmmy.mthmmy.editorview.IEmojiKeyboard; import gr.thmmy.mthmmy.model.Poll; import gr.thmmy.mthmmy.model.Post; import gr.thmmy.mthmmy.model.ThmmyFile; import gr.thmmy.mthmmy.model.ThmmyPage; import gr.thmmy.mthmmy.model.TopicItem; -import gr.thmmy.mthmmy.utils.CircleTransform; -import gr.thmmy.mthmmy.utils.WebViewOnTouchClickListener; import gr.thmmy.mthmmy.utils.parsing.ParseHelpers; import gr.thmmy.mthmmy.utils.parsing.ThmmyParser; +import gr.thmmy.mthmmy.utils.ui.CircleTransform; +import gr.thmmy.mthmmy.utils.ui.WebViewOnTouchClickListener; import gr.thmmy.mthmmy.viewmodel.TopicViewModel; +import gr.thmmy.mthmmy.views.editorview.EditorView; +import gr.thmmy.mthmmy.views.editorview.IEmojiKeyboard; import timber.log.Timber; import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; 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 0d9135a4..55f3f16e 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 @@ -64,11 +64,11 @@ import gr.thmmy.mthmmy.base.BaseApplication; import gr.thmmy.mthmmy.model.UploadCategory; import gr.thmmy.mthmmy.model.UploadFile; import gr.thmmy.mthmmy.services.UploadsReceiver; -import gr.thmmy.mthmmy.utils.AppCompatSpinnerWithoutDefault; import gr.thmmy.mthmmy.utils.FileUtils; import gr.thmmy.mthmmy.utils.TakePhoto; import gr.thmmy.mthmmy.utils.parsing.ParseException; import gr.thmmy.mthmmy.utils.parsing.ParseTask; +import gr.thmmy.mthmmy.views.AppCompatSpinnerWithoutDefault; import me.zhanghai.android.materialprogressbar.MaterialProgressBar; import timber.log.Timber; 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 f19bac9e..8bdadf10 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java +++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java @@ -40,7 +40,7 @@ import java.util.concurrent.TimeUnit; import gr.thmmy.mthmmy.BuildConfig; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.session.SessionManager; -import gr.thmmy.mthmmy.utils.CrashReportingTree; +import gr.thmmy.mthmmy.utils.crashreporting.CrashReportingTree; import io.fabric.sdk.android.Fabric; import okhttp3.CipherSuite; import okhttp3.ConnectionSpec; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/DateTimeUtils.java b/app/src/main/java/gr/thmmy/mthmmy/utils/DateTimeUtils.java index 659cde2f..b65fd2f4 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/DateTimeUtils.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/DateTimeUtils.java @@ -8,13 +8,13 @@ import static android.text.format.DateUtils.MINUTE_IN_MILLIS; import static android.text.format.DateUtils.SECOND_IN_MILLIS; import static android.text.format.DateUtils.YEAR_IN_MILLIS; -class DateTimeUtils { +public class DateTimeUtils { private static final long MONTH_IN_MILLIS = 30*DAY_IN_MILLIS; private static final long DECADE_IN_MILLIS = 10*YEAR_IN_MILLIS; @VisibleForTesting - static String getRelativeTimeSpanString(long time) { + public static String getRelativeTimeSpanString(long time) { long now = System.currentTimeMillis(); boolean past = (now >= time); diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/NetworkTask.java b/app/src/main/java/gr/thmmy/mthmmy/utils/NetworkTask.java index 9ae5a309..a8c42c8b 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/NetworkTask.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/NetworkTask.java @@ -10,6 +10,7 @@ import java.io.IOException; import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.base.BaseApplication; +import gr.thmmy.mthmmy.utils.crashreporting.CrashReporter; import gr.thmmy.mthmmy.utils.parsing.ParseException; import okhttp3.OkHttpClient; import okhttp3.Request; @@ -17,8 +18,7 @@ import okhttp3.Response; import timber.log.Timber; public abstract class NetworkTask extends ExternalAsyncTask> { - - protected OnNetworkTaskFinishedListener onNetworkTaskFinishedListener; + private OnNetworkTaskFinishedListener onNetworkTaskFinishedListener; public NetworkTask(OnTaskStartedListener onTaskStartedListener, OnTaskCancelledListener onTaskCancelledListener, OnNetworkTaskFinishedListener onNetworkTaskFinishedListener) { diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CrashReporter.java b/app/src/main/java/gr/thmmy/mthmmy/utils/crashreporting/CrashReporter.java similarity index 98% rename from app/src/main/java/gr/thmmy/mthmmy/utils/CrashReporter.java rename to app/src/main/java/gr/thmmy/mthmmy/utils/crashreporting/CrashReporter.java index 67ba0395..65011440 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CrashReporter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/crashreporting/CrashReporter.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.utils.crashreporting; import com.crashlytics.android.Crashlytics; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CrashReportingTree.java b/app/src/main/java/gr/thmmy/mthmmy/utils/crashreporting/CrashReportingTree.java similarity index 94% rename from app/src/main/java/gr/thmmy/mthmmy/utils/CrashReportingTree.java rename to app/src/main/java/gr/thmmy/mthmmy/utils/crashreporting/CrashReportingTree.java index 8f85459a..f378000e 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CrashReportingTree.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/crashreporting/CrashReportingTree.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.utils.crashreporting; import android.util.Log; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CenterVerticalSpan.java b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/CenterVerticalSpan.java similarity index 96% rename from app/src/main/java/gr/thmmy/mthmmy/utils/CenterVerticalSpan.java rename to app/src/main/java/gr/thmmy/mthmmy/utils/ui/CenterVerticalSpan.java index 104dd01e..8d0c3d60 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CenterVerticalSpan.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/CenterVerticalSpan.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.utils.ui; import android.graphics.Canvas; import android.graphics.Paint; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CircleTransform.java b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/CircleTransform.java similarity index 97% rename from app/src/main/java/gr/thmmy/mthmmy/utils/CircleTransform.java rename to app/src/main/java/gr/thmmy/mthmmy/utils/ui/CircleTransform.java index c6da6010..813463bd 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CircleTransform.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/CircleTransform.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.utils.ui; import android.graphics.Bitmap; import android.graphics.BitmapShader; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/ScrollAwareFABBehavior.java similarity index 98% rename from app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java rename to app/src/main/java/gr/thmmy/mthmmy/utils/ui/ScrollAwareFABBehavior.java index a77502f3..78c5f196 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/ScrollAwareFABBehavior.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.utils.ui; import android.content.Context; import android.util.AttributeSet; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/ScrollAwareLinearBehavior.java similarity index 99% rename from app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java rename to app/src/main/java/gr/thmmy/mthmmy/utils/ui/ScrollAwareLinearBehavior.java index cc877deb..1a7a75b8 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/ScrollAwareLinearBehavior.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.utils.ui; import android.animation.Animator; import android.content.Context; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/WebViewOnTouchClickListener.java b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/WebViewOnTouchClickListener.java similarity index 98% rename from app/src/main/java/gr/thmmy/mthmmy/utils/WebViewOnTouchClickListener.java rename to app/src/main/java/gr/thmmy/mthmmy/utils/ui/WebViewOnTouchClickListener.java index 4cc94989..6239f9d3 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/WebViewOnTouchClickListener.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ui/WebViewOnTouchClickListener.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.utils.ui; import android.annotation.SuppressLint; import android.app.Dialog; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/AppCompatSpinnerWithoutDefault.java b/app/src/main/java/gr/thmmy/mthmmy/views/AppCompatSpinnerWithoutDefault.java similarity index 99% rename from app/src/main/java/gr/thmmy/mthmmy/utils/AppCompatSpinnerWithoutDefault.java rename to app/src/main/java/gr/thmmy/mthmmy/views/AppCompatSpinnerWithoutDefault.java index 77293dfe..e7ba0e4c 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/AppCompatSpinnerWithoutDefault.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/AppCompatSpinnerWithoutDefault.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.views; import android.annotation.SuppressLint; import android.content.Context; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CustomLinearLayoutManager.java b/app/src/main/java/gr/thmmy/mthmmy/views/CustomLinearLayoutManager.java similarity index 97% rename from app/src/main/java/gr/thmmy/mthmmy/utils/CustomLinearLayoutManager.java rename to app/src/main/java/gr/thmmy/mthmmy/views/CustomLinearLayoutManager.java index f4dd5042..50621846 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CustomLinearLayoutManager.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/CustomLinearLayoutManager.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.views; import android.content.Context; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/CustomRecyclerView.java b/app/src/main/java/gr/thmmy/mthmmy/views/CustomRecyclerView.java similarity index 98% rename from app/src/main/java/gr/thmmy/mthmmy/utils/CustomRecyclerView.java rename to app/src/main/java/gr/thmmy/mthmmy/views/CustomRecyclerView.java index 766e7207..1b605cdd 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/CustomRecyclerView.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/CustomRecyclerView.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.views; import android.content.Context; import android.util.AttributeSet; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/RelativeTimeTextView.java b/app/src/main/java/gr/thmmy/mthmmy/views/RelativeTimeTextView.java similarity index 99% rename from app/src/main/java/gr/thmmy/mthmmy/utils/RelativeTimeTextView.java rename to app/src/main/java/gr/thmmy/mthmmy/views/RelativeTimeTextView.java index 9b5b5f74..43ea351f 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/RelativeTimeTextView.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/RelativeTimeTextView.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.views; import android.annotation.SuppressLint; import android.content.Context; diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/ToggledBackgroundButton.java b/app/src/main/java/gr/thmmy/mthmmy/views/ToggledBackgroundButton.java similarity index 95% rename from app/src/main/java/gr/thmmy/mthmmy/utils/ToggledBackgroundButton.java rename to app/src/main/java/gr/thmmy/mthmmy/views/ToggledBackgroundButton.java index 6c189e87..296ecf77 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/ToggledBackgroundButton.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/ToggledBackgroundButton.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.utils; +package gr.thmmy.mthmmy.views; import android.content.Context; import android.util.AttributeSet; diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/EditorView.java b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/EditorView.java similarity index 99% rename from app/src/main/java/gr/thmmy/mthmmy/editorview/EditorView.java rename to app/src/main/java/gr/thmmy/mthmmy/views/editorview/EditorView.java index 97f7d42f..051bfdfb 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/EditorView.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/EditorView.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.editorview; +package gr.thmmy.mthmmy.views.editorview; import android.animation.Animator; import android.annotation.SuppressLint; diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiInputField.java b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/EmojiInputField.java similarity index 81% rename from app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiInputField.java rename to app/src/main/java/gr/thmmy/mthmmy/views/editorview/EmojiInputField.java index 0cdccd60..88d2e790 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiInputField.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/EmojiInputField.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.editorview; +package gr.thmmy.mthmmy.views.editorview; import android.view.inputmethod.InputConnection; diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboard.java b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/EmojiKeyboard.java similarity index 99% rename from app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboard.java rename to app/src/main/java/gr/thmmy/mthmmy/views/editorview/EmojiKeyboard.java index 903ff5fe..dc5b06e5 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboard.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/EmojiKeyboard.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.editorview; +package gr.thmmy.mthmmy.views.editorview; import android.content.Context; import android.os.Handler; diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboardAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/EmojiKeyboardAdapter.java similarity index 98% rename from app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboardAdapter.java rename to app/src/main/java/gr/thmmy/mthmmy/views/editorview/EmojiKeyboardAdapter.java index efcb9519..1f857a16 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/EmojiKeyboardAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/EmojiKeyboardAdapter.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.editorview; +package gr.thmmy.mthmmy.views.editorview; import android.graphics.drawable.AnimationDrawable; import android.view.LayoutInflater; diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/FormatButtonsAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/FormatButtonsAdapter.java similarity index 98% rename from app/src/main/java/gr/thmmy/mthmmy/editorview/FormatButtonsAdapter.java rename to app/src/main/java/gr/thmmy/mthmmy/views/editorview/FormatButtonsAdapter.java index 732149ae..699bf760 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/FormatButtonsAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/FormatButtonsAdapter.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.editorview; +package gr.thmmy.mthmmy.views.editorview; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/IEmojiKeyboard.java b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/IEmojiKeyboard.java similarity index 95% rename from app/src/main/java/gr/thmmy/mthmmy/editorview/IEmojiKeyboard.java rename to app/src/main/java/gr/thmmy/mthmmy/views/editorview/IEmojiKeyboard.java index 3ec906f2..07ab89bb 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/IEmojiKeyboard.java +++ b/app/src/main/java/gr/thmmy/mthmmy/views/editorview/IEmojiKeyboard.java @@ -1,4 +1,4 @@ -package gr.thmmy.mthmmy.editorview; +package gr.thmmy.mthmmy.views.editorview; public interface IEmojiKeyboard { /** diff --git a/app/src/main/res/layout-v21/activity_profile.xml b/app/src/main/res/layout-v21/activity_profile.xml index c5da47d9..f8f2faff 100644 --- a/app/src/main/res/layout-v21/activity_profile.xml +++ b/app/src/main/res/layout-v21/activity_profile.xml @@ -113,7 +113,7 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margins" - app:layout_behavior="gr.thmmy.mthmmy.utils.ScrollAwareFABBehavior" + app:layout_behavior="gr.thmmy.mthmmy.utils.ui.ScrollAwareFABBehavior" app:srcCompat="@drawable/ic_pm_fab"/> diff --git a/app/src/main/res/layout/activity_board.xml b/app/src/main/res/layout/activity_board.xml index 0a61658e..f10dd068 100644 --- a/app/src/main/res/layout/activity_board.xml +++ b/app/src/main/res/layout/activity_board.xml @@ -62,6 +62,6 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margins" - app:layout_behavior="gr.thmmy.mthmmy.utils.ScrollAwareFABBehavior" + app:layout_behavior="gr.thmmy.mthmmy.utils.ui.ScrollAwareFABBehavior" app:srcCompat="@drawable/ic_add_fab" /> diff --git a/app/src/main/res/layout/activity_create_content.xml b/app/src/main/res/layout/activity_create_content.xml index 7e6a9b40..5c42f68b 100644 --- a/app/src/main/res/layout/activity_create_content.xml +++ b/app/src/main/res/layout/activity_create_content.xml @@ -46,7 +46,7 @@ android:inputType="text"/> - - diff --git a/app/src/main/res/layout/activity_profile.xml b/app/src/main/res/layout/activity_profile.xml index 8a51cbd9..3a63ad27 100644 --- a/app/src/main/res/layout/activity_profile.xml +++ b/app/src/main/res/layout/activity_profile.xml @@ -112,7 +112,7 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margins" - app:layout_behavior="gr.thmmy.mthmmy.utils.ScrollAwareFABBehavior" + app:layout_behavior="gr.thmmy.mthmmy.utils.ui.ScrollAwareFABBehavior" app:srcCompat="@drawable/ic_pm_fab"/> diff --git a/app/src/main/res/layout/activity_topic.xml b/app/src/main/res/layout/activity_topic.xml index b61c41cf..24793374 100644 --- a/app/src/main/res/layout/activity_topic.xml +++ b/app/src/main/res/layout/activity_topic.xml @@ -51,7 +51,7 @@ app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="gr.thmmy.mthmmy.activities.topic.TopicActivity" /> - + app:layout_behavior="gr.thmmy.mthmmy.utils.ui.ScrollAwareLinearBehavior"> diff --git a/app/src/main/res/layout/activity_topic_edit_row.xml b/app/src/main/res/layout/activity_topic_edit_row.xml index 39b67582..a5875f53 100644 --- a/app/src/main/res/layout/activity_topic_edit_row.xml +++ b/app/src/main/res/layout/activity_topic_edit_row.xml @@ -76,7 +76,7 @@ android:textSize="10sp" tools:ignore="SmallSp" /> - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_forum.xml b/app/src/main/res/layout/fragment_forum.xml index 2f5de239..a428557b 100644 --- a/app/src/main/res/layout/fragment_forum.xml +++ b/app/src/main/res/layout/fragment_forum.xml @@ -11,7 +11,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_unread_row.xml b/app/src/main/res/layout/fragment_unread_row.xml index 07041cc5..d9da3ace 100644 --- a/app/src/main/res/layout/fragment_unread_row.xml +++ b/app/src/main/res/layout/fragment_unread_row.xml @@ -32,7 +32,7 @@ android:layout_below="@+id/title" android:layout_toEndOf="@+id/dateTime"/> -