From 88b40736874a876576e1dc6c49c299fdfeb600bb Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 23 Dec 2018 20:04:08 -0500 Subject: Migrate to androidx (#1257) * Initial migration * Update gradle wrapper * Update iconics and revert progressanimator api * Clean up imports * Update dependencies and address some lint issues * Update constants * Remove extra import --- app/src/main/AndroidManifest.xml | 2 +- .../com/pitchedapps/frost/activities/AboutActivity.kt | 14 +++++++------- .../com/pitchedapps/frost/activities/BaseMainActivity.kt | 16 ++++++++-------- .../com/pitchedapps/frost/activities/DebugActivity.kt | 6 +++--- .../com/pitchedapps/frost/activities/ImageActivity.kt | 2 +- .../com/pitchedapps/frost/activities/IntroActivity.kt | 8 ++++---- .../com/pitchedapps/frost/activities/LoginActivity.kt | 6 +++--- .../com/pitchedapps/frost/activities/MainActivity.kt | 4 ++-- .../com/pitchedapps/frost/activities/SelectorActivity.kt | 8 ++++---- .../com/pitchedapps/frost/activities/SettingsActivity.kt | 2 +- .../frost/activities/TabCustomizerActivity.kt | 10 +++++----- .../pitchedapps/frost/activities/WebOverlayActivity.kt | 10 +++++----- .../main/kotlin/com/pitchedapps/frost/enums/FeedSort.kt | 2 +- .../main/kotlin/com/pitchedapps/frost/enums/Support.kt | 2 +- app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt | 2 +- .../main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt | 6 +++--- .../com/pitchedapps/frost/fragments/FragmentBase.kt | 4 ++-- .../com/pitchedapps/frost/intro/IntroMainFragments.kt | 4 ++-- .../com/pitchedapps/frost/services/FrostNotifications.kt | 6 +++--- .../pitchedapps/frost/services/NotificationService.kt | 2 +- .../com/pitchedapps/frost/services/NotificationUtils.kt | 8 ++++---- .../pitchedapps/frost/utils/AnimatedVectorDelegate.kt | 2 +- app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt | 10 +++++----- .../kotlin/com/pitchedapps/frost/views/AccountItem.kt | 4 ++-- .../kotlin/com/pitchedapps/frost/views/BadgedIcon.kt | 2 +- .../com/pitchedapps/frost/views/FrostContentView.kt | 2 +- .../com/pitchedapps/frost/views/FrostRecyclerView.kt | 4 ++-- .../kotlin/com/pitchedapps/frost/views/FrostVideoView.kt | 6 +++--- .../com/pitchedapps/frost/views/FrostVideoViewer.kt | 2 +- .../kotlin/com/pitchedapps/frost/views/FrostViewPager.kt | 2 +- .../main/kotlin/com/pitchedapps/frost/views/Keywords.kt | 10 +++++----- .../kotlin/com/pitchedapps/frost/web/DebugWebView.kt | 2 +- .../kotlin/com/pitchedapps/frost/web/NestedWebView.kt | 6 +++--- app/src/main/res/drawable/frost_f_200.xml | 14 ++++++++++++++ app/src/main/res/drawable/frost_f_256.xml | 14 -------------- app/src/main/res/layout/activity_debug.xml | 10 +++++----- app/src/main/res/layout/activity_image.xml | 6 +++--- app/src/main/res/layout/activity_image_textless.xml | 6 +++--- app/src/main/res/layout/activity_intro.xml | 8 ++++---- app/src/main/res/layout/activity_invalid.xml | 4 ++-- app/src/main/res/layout/activity_login.xml | 6 +++--- app/src/main/res/layout/activity_main.xml | 8 ++++---- app/src/main/res/layout/activity_main_bottom_tabs.xml | 8 ++++---- app/src/main/res/layout/activity_selector.xml | 8 ++++---- app/src/main/res/layout/activity_tab_customizer.xml | 6 +++--- app/src/main/res/layout/activity_web_overlay.xml | 6 +++--- app/src/main/res/layout/iitem_menu.xml | 4 ++-- app/src/main/res/layout/iitem_notification.xml | 4 ++-- app/src/main/res/layout/intro_end.xml | 6 +++--- app/src/main/res/layout/intro_image.xml | 4 ++-- app/src/main/res/layout/intro_theme.xml | 4 ++-- app/src/main/res/layout/intro_welcome.xml | 6 +++--- app/src/main/res/layout/item_about_links.xml | 2 +- app/src/main/res/layout/item_keyword.xml | 2 +- app/src/main/res/layout/login_webview.xml | 6 +++--- app/src/main/res/layout/material_drawer_header.xml | 4 ++-- app/src/main/res/layout/view_account.xml | 4 ++-- app/src/main/res/layout/view_badged_icon.xml | 8 ++++---- app/src/main/res/layout/view_content_base_recycler.xml | 4 ++-- app/src/main/res/layout/view_content_base_web.xml | 4 ++-- app/src/main/res/layout/view_keywords.xml | 8 ++++---- app/src/main/res/layout/view_main_fab.xml | 2 +- app/src/main/res/layout/view_main_tab_layout.xml | 2 +- app/src/main/res/layout/view_main_toolbar.xml | 2 +- app/src/main/res/layout/view_video.xml | 2 +- 65 files changed, 179 insertions(+), 179 deletions(-) create mode 100644 app/src/main/res/drawable/frost_f_200.xml delete mode 100644 app/src/main/res/drawable/frost_f_256.xml (limited to 'app/src/main') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bdfb5688..ed197510 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -156,7 +156,7 @@ diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt index 2261328d..4d333099 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt @@ -1,8 +1,8 @@ package com.pitchedapps.frost.activities -import android.support.constraint.ConstraintLayout -import android.support.constraint.ConstraintSet -import android.support.v7.widget.RecyclerView +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.constraintlayout.widget.ConstraintSet +import androidx.recyclerview.widget.RecyclerView import android.view.View import android.view.ViewGroup import android.widget.ImageView @@ -34,7 +34,7 @@ class AboutActivity : AboutActivityBase(null, { accentColor = Prefs.accentColor backgroundColor = Prefs.bgColor.withMinAlpha(200) cutoutForeground = Prefs.accentColor - cutoutDrawableRes = R.drawable.frost_f_256 + cutoutDrawableRes = R.drawable.frost_f_200 faqPageTitleRes = R.string.faq_title faqXmlRes = R.xml.frost_faq faqParseNewLine = false @@ -137,10 +137,10 @@ class AboutActivity : AboutActivityBase(null, { val size = c.dimenPixelSize(R.dimen.kau_avatar_bounds) images = arrayOf Unit>>( GoogleMaterial.Icon.gmd_arrow_downward to { c.startLink(R.string.github_downloads_url) }, - CommunityMaterial.Icon.cmd_reddit to { c.startLink(R.string.reddit_url) }, + CommunityMaterial.Icon2.cmd_reddit to { c.startLink(R.string.reddit_url) }, CommunityMaterial.Icon.cmd_github_circle to { c.startLink(R.string.github_url) }, - CommunityMaterial.Icon.cmd_slack to { c.startLink(R.string.slack_url) }, - CommunityMaterial.Icon.cmd_xda to { c.startLink(R.string.xda_url) } + CommunityMaterial.Icon2.cmd_slack to { c.startLink(R.string.slack_url) }, + CommunityMaterial.Icon2.cmd_xda to { c.startLink(R.string.xda_url) } ).mapIndexed { i, (icon, onClick) -> ImageView(c).apply { layoutParams = ViewGroup.LayoutParams(size, size) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index 2fce69a8..52f61bea 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -8,14 +8,14 @@ import android.graphics.PointF import android.graphics.drawable.ColorDrawable import android.net.Uri import android.os.Bundle -import android.support.annotation.StringRes -import android.support.design.widget.AppBarLayout -import android.support.design.widget.CoordinatorLayout -import android.support.design.widget.FloatingActionButton -import android.support.design.widget.TabLayout -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentPagerAdapter -import android.support.v7.widget.Toolbar +import androidx.annotation.StringRes +import com.google.android.material.appbar.AppBarLayout +import androidx.coordinatorlayout.widget.CoordinatorLayout +import com.google.android.material.floatingactionbutton.FloatingActionButton +import com.google.android.material.tabs.TabLayout +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentPagerAdapter +import androidx.appcompat.widget.Toolbar import android.view.Menu import android.view.MenuItem import android.webkit.ValueCallback diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt index 9b1d8e79..9a90f090 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt @@ -5,9 +5,9 @@ import android.content.Context import android.content.Intent import android.content.res.ColorStateList import android.os.Bundle -import android.support.design.widget.FloatingActionButton -import android.support.v4.widget.SwipeRefreshLayout -import android.support.v7.widget.Toolbar +import com.google.android.material.floatingactionbutton.FloatingActionButton +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout +import androidx.appcompat.widget.Toolbar import ca.allanwang.kau.internal.KauBaseActivity import ca.allanwang.kau.utils.bindView import ca.allanwang.kau.utils.setIcon diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt index 30a77107..348b36b9 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt @@ -5,7 +5,7 @@ import android.content.res.ColorStateList import android.graphics.Color import android.os.Bundle import android.os.Environment -import android.support.design.widget.FloatingActionButton +import com.google.android.material.floatingactionbutton.FloatingActionButton import android.view.View import ca.allanwang.kau.internal.KauBaseActivity import ca.allanwang.kau.logging.KauLoggerExtension diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt index 4b00c242..c41229da 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt @@ -4,10 +4,10 @@ import android.animation.ValueAnimator import android.content.res.ColorStateList import android.graphics.Color import android.os.Bundle -import android.support.v4.app.Fragment -import android.support.v4.app.FragmentManager -import android.support.v4.app.FragmentPagerAdapter -import android.support.v4.view.ViewPager +import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentManager +import androidx.fragment.app.FragmentPagerAdapter +import androidx.viewpager.widget.ViewPager import android.view.View import android.view.WindowManager import android.widget.Button diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt index b5e2119f..9c8a60aa 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt @@ -3,9 +3,9 @@ package com.pitchedapps.frost.activities import android.graphics.drawable.Drawable import android.os.Bundle import android.os.Handler -import android.support.v4.widget.SwipeRefreshLayout -import android.support.v7.widget.AppCompatTextView -import android.support.v7.widget.Toolbar +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout +import androidx.appcompat.widget.AppCompatTextView +import androidx.appcompat.widget.Toolbar import android.widget.ImageView import ca.allanwang.kau.utils.bindView import ca.allanwang.kau.utils.fadeIn diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt index bf8120de..2555fe5b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt @@ -1,8 +1,8 @@ package com.pitchedapps.frost.activities import android.os.Bundle -import android.support.design.widget.TabLayout -import android.support.v4.view.ViewPager +import com.google.android.material.tabs.TabLayout +import androidx.viewpager.widget.ViewPager import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.views.BadgedIcon import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/SelectorActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/SelectorActivity.kt index 58ab3dac..514af197 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/SelectorActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/SelectorActivity.kt @@ -1,10 +1,10 @@ package com.pitchedapps.frost.activities import android.os.Bundle -import android.support.constraint.ConstraintLayout -import android.support.v7.widget.AppCompatTextView -import android.support.v7.widget.GridLayoutManager -import android.support.v7.widget.RecyclerView +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.appcompat.widget.AppCompatTextView +import androidx.recyclerview.widget.GridLayoutManager +import androidx.recyclerview.widget.RecyclerView import android.view.View import ca.allanwang.kau.utils.bindView import com.mikepenz.fastadapter.FastAdapter diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt index 7561dc88..7663b70f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt @@ -100,7 +100,7 @@ class SettingsActivity : KPrefActivity() { subItems(R.string.newsfeed, getFeedPrefs()) { descRes = R.string.newsfeed_desc - iicon = CommunityMaterial.Icon.cmd_newspaper + iicon = CommunityMaterial.Icon2.cmd_newspaper } subItems(R.string.notifications, getNotificationPrefs()) { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt index 7b2cfbf2..1938add0 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt @@ -3,10 +3,10 @@ package com.pitchedapps.frost.activities import android.app.Activity import android.content.res.ColorStateList import android.os.Bundle -import android.support.design.widget.FloatingActionButton -import android.support.v7.widget.GridLayoutManager -import android.support.v7.widget.RecyclerView -import android.support.v7.widget.helper.ItemTouchHelper +import com.google.android.material.floatingactionbutton.FloatingActionButton +import androidx.recyclerview.widget.GridLayoutManager +import androidx.recyclerview.widget.RecyclerView +import androidx.recyclerview.widget.ItemTouchHelper import android.view.View import android.view.animation.AnimationUtils import android.widget.TextView @@ -50,7 +50,7 @@ class TabCustomizerActivity : BaseActivity() { toolbar.setBackgroundColor(Prefs.headerColor) - recycler.layoutManager = GridLayoutManager(this, TAB_COUNT, GridLayoutManager.VERTICAL, false) + recycler.layoutManager = GridLayoutManager(this, TAB_COUNT, RecyclerView.VERTICAL, false) recycler.adapter = adapter recycler.setHasFixedSize(true) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt index 323a2eb5..6d930fff 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt @@ -5,9 +5,8 @@ import android.content.Intent import android.graphics.PointF import android.net.Uri import android.os.Bundle -import android.support.design.widget.CoordinatorLayout -import android.support.design.widget.Snackbar -import android.support.v7.widget.Toolbar +import androidx.coordinatorlayout.widget.CoordinatorLayout +import androidx.appcompat.widget.Toolbar import android.view.Menu import android.view.MenuItem import android.webkit.ValueCallback @@ -16,6 +15,7 @@ import android.widget.FrameLayout import ca.allanwang.kau.swipe.kauSwipeOnCreate import ca.allanwang.kau.swipe.kauSwipeOnDestroy import ca.allanwang.kau.utils.* +import com.google.android.material.snackbar.BaseTransientBottomBar import com.mikepenz.community_material_typeface_library.CommunityMaterial import com.mikepenz.google_material_typeface_library.GoogleMaterial import com.pitchedapps.frost.R @@ -168,7 +168,7 @@ open class WebOverlayActivityBase(private val forceBasicAgent: Boolean) : BaseAc else reloadBase(true) if (Showcase.firstWebOverlay) { coordinator.frostSnackbar(R.string.web_overlay_swipe_hint) { - duration = Snackbar.LENGTH_INDEFINITE + duration = BaseTransientBottomBar.LENGTH_INDEFINITE setAction(R.string.kau_got_it) { _ -> this.dismiss() } } } @@ -248,7 +248,7 @@ open class WebOverlayActivityBase(private val forceBasicAgent: Boolean) : BaseAc overlayContext?.onMenuCreate(this, menu) toolbar.tint(Prefs.iconColor) setMenuIcons(menu, Prefs.iconColor, - R.id.action_share to CommunityMaterial.Icon.cmd_share, + R.id.action_share to CommunityMaterial.Icon2.cmd_share, R.id.action_copy_link to GoogleMaterial.Icon.gmd_content_copy) return true } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/FeedSort.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/FeedSort.kt index d2de9988..d8a0f349 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/enums/FeedSort.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/FeedSort.kt @@ -1,6 +1,6 @@ package com.pitchedapps.frost.enums -import android.support.annotation.StringRes +import androidx.annotation.StringRes import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FbItem diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/Support.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/Support.kt index ef3c88b6..34fa4b5f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/enums/Support.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/Support.kt @@ -1,7 +1,7 @@ package com.pitchedapps.frost.enums import android.content.Context -import android.support.annotation.StringRes +import androidx.annotation.StringRes import ca.allanwang.kau.utils.string import com.pitchedapps.frost.R import com.pitchedapps.frost.utils.sendFrostEmail diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt index ada0b456..934dda07 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt @@ -1,7 +1,7 @@ package com.pitchedapps.frost.enums import android.graphics.Color -import android.support.annotation.StringRes +import androidx.annotation.StringRes import com.pitchedapps.frost.R import com.pitchedapps.frost.injectors.CssAssets import com.pitchedapps.frost.injectors.InjectorContract diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt index d6915f75..2f0e4e22 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt @@ -1,6 +1,6 @@ package com.pitchedapps.frost.facebook -import android.support.annotation.StringRes +import androidx.annotation.StringRes import com.mikepenz.community_material_typeface_library.CommunityMaterial import com.mikepenz.google_material_typeface_library.GoogleMaterial import com.mikepenz.iconics.typeface.IIcon @@ -25,14 +25,14 @@ enum class FbItem( BIRTHDAYS(R.string.birthdays, GoogleMaterial.Icon.gmd_cake, "events/birthdays"), CHAT(R.string.chat, GoogleMaterial.Icon.gmd_chat, "buddylist"), EVENTS(R.string.events, GoogleMaterial.Icon.gmd_event_note, "events/upcoming"), - FEED(R.string.feed, CommunityMaterial.Icon.cmd_newspaper, ""), + FEED(R.string.feed, CommunityMaterial.Icon2.cmd_newspaper, ""), FEED_MOST_RECENT(R.string.most_recent, GoogleMaterial.Icon.gmd_history, "home.php?sk=h_chr"), FEED_TOP_STORIES(R.string.top_stories, GoogleMaterial.Icon.gmd_star, "home.php?sk=h_nor"), FRIENDS(R.string.friends, GoogleMaterial.Icon.gmd_person_add, "friends/center/requests"), GROUPS(R.string.groups, GoogleMaterial.Icon.gmd_group, "groups"), MENU(R.string.menu, GoogleMaterial.Icon.gmd_menu, "settings", ::MenuFragment), MESSAGES(R.string.messages, MaterialDesignIconic.Icon.gmi_comments, "messages"), - NOTES(R.string.notes, CommunityMaterial.Icon.cmd_note, "notes"), + NOTES(R.string.notes, CommunityMaterial.Icon2.cmd_note, "notes"), NOTIFICATIONS(R.string.notifications, MaterialDesignIconic.Icon.gmi_globe, "notifications", ::NotificationFragment), ON_THIS_DAY(R.string.on_this_day, GoogleMaterial.Icon.gmd_today, "onthisday"), PAGES(R.string.pages, GoogleMaterial.Icon.gmd_flag, "pages"), diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt index cf48893c..34e28c2e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt @@ -2,8 +2,8 @@ package com.pitchedapps.frost.fragments import android.content.Context import android.os.Bundle -import android.support.design.widget.FloatingActionButton -import android.support.v4.app.Fragment +import com.google.android.material.floatingactionbutton.FloatingActionButton +import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup diff --git a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt index 39a39232..6e953777 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt @@ -3,8 +3,8 @@ package com.pitchedapps.frost.intro import android.annotation.SuppressLint import android.content.res.ColorStateList import android.os.Bundle -import android.support.constraint.ConstraintLayout -import android.support.v4.app.Fragment +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt index 295dbe0c..ededaad4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt @@ -8,8 +8,8 @@ import android.net.Uri import android.os.BaseBundle import android.os.Build import android.os.Bundle -import android.support.v4.app.NotificationCompat -import android.support.v4.app.NotificationManagerCompat +import androidx.core.app.NotificationCompat +import androidx.core.app.NotificationManagerCompat import ca.allanwang.kau.utils.dpToPx import ca.allanwang.kau.utils.string import com.pitchedapps.frost.BuildConfig @@ -206,7 +206,7 @@ enum class NotificationType( .setCategory(Notification.CATEGORY_SOCIAL) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - notifBuilder.setGroupAlertBehavior(Notification.GROUP_ALERT_CHILDREN) + notifBuilder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN) } return FrostNotification(group, 1, notifBuilder) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt index 56ff4db7..f15df482 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt @@ -2,7 +2,7 @@ package com.pitchedapps.frost.services import android.app.job.JobParameters import android.app.job.JobService -import android.support.v4.app.NotificationManagerCompat +import androidx.core.app.NotificationManagerCompat import ca.allanwang.kau.utils.string import com.pitchedapps.frost.BuildConfig import com.pitchedapps.frost.R diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt index 59352f8e..707220f6 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt @@ -11,8 +11,8 @@ import android.content.Context import android.net.Uri import android.os.Build import android.os.PersistableBundle -import android.support.annotation.RequiresApi -import android.support.v4.app.NotificationCompat +import androidx.annotation.RequiresApi +import androidx.core.app.NotificationCompat import ca.allanwang.kau.utils.color import ca.allanwang.kau.utils.string import com.pitchedapps.frost.R @@ -70,8 +70,8 @@ fun Context.frostNotification(id: String) = fun NotificationCompat.Builder.setFrostAlert(enable: Boolean, ringtone: String): NotificationCompat.Builder { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { setGroupAlertBehavior( - if (enable) Notification.GROUP_ALERT_CHILDREN - else Notification.GROUP_ALERT_SUMMARY) + if (enable) NotificationCompat.GROUP_ALERT_CHILDREN + else NotificationCompat.GROUP_ALERT_SUMMARY) } else if (!enable) { setDefaults(0) } else { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/AnimatedVectorDelegate.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/AnimatedVectorDelegate.kt index 8d800e9b..223eed3f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/AnimatedVectorDelegate.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/AnimatedVectorDelegate.kt @@ -1,7 +1,7 @@ package com.pitchedapps.frost.utils import android.graphics.drawable.AnimatedVectorDrawable -import android.support.annotation.DrawableRes +import androidx.annotation.DrawableRes import android.widget.ImageView import ca.allanwang.kau.utils.drawable diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt index 6c78d922..650f277b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -8,11 +8,10 @@ import android.content.Intent import android.graphics.Color import android.graphics.drawable.ColorDrawable import android.net.Uri -import android.support.annotation.StringRes -import android.support.design.widget.Snackbar -import android.support.design.widget.SnackbarContentLayout -import android.support.v4.content.FileProvider -import android.support.v7.widget.Toolbar +import androidx.annotation.StringRes +import com.google.android.material.snackbar.Snackbar +import androidx.core.content.FileProvider +import androidx.appcompat.widget.Toolbar import android.view.View import android.widget.FrameLayout import android.widget.TextView @@ -23,6 +22,7 @@ import ca.allanwang.kau.mediapicker.createPrivateMediaFile import ca.allanwang.kau.utils.* import ca.allanwang.kau.xml.showChangelog import com.afollestad.materialdialogs.MaterialDialog +import com.google.android.material.snackbar.SnackbarContentLayout import com.pitchedapps.frost.BuildConfig import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.* diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt index 7262fa17..9f6d0c06 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt @@ -1,8 +1,8 @@ package com.pitchedapps.frost.views import android.graphics.drawable.Drawable -import android.support.v7.widget.AppCompatTextView -import android.support.v7.widget.RecyclerView +import androidx.appcompat.widget.AppCompatTextView +import androidx.recyclerview.widget.RecyclerView import android.view.View import android.widget.ImageView import ca.allanwang.kau.iitems.KauIItem diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt index 60713034..92620567 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt @@ -2,7 +2,7 @@ package com.pitchedapps.frost.views import android.content.Context import android.graphics.drawable.GradientDrawable -import android.support.constraint.ConstraintLayout +import androidx.constraintlayout.widget.ConstraintLayout import android.util.AttributeSet import android.widget.ImageView import android.widget.TextView diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt index 19b1176e..c44a8188 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt @@ -2,7 +2,7 @@ package com.pitchedapps.frost.views import android.content.Context import android.os.Build -import android.support.v4.widget.SwipeRefreshLayout +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import android.util.AttributeSet import android.view.View import android.widget.FrameLayout diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt index 38b09657..19869426 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt @@ -1,8 +1,8 @@ package com.pitchedapps.frost.views import android.content.Context -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView import android.util.AttributeSet import android.view.View import ca.allanwang.kau.utils.circularReveal diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt index d7f44420..85dc7e18 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt @@ -79,7 +79,7 @@ class FrostVideoView @JvmOverloads constructor( if (!isPlaying) showControls() else viewerContract.onControlsHidden() } - }.start() + } } else { hideControls() val (scale, tX, tY) = mapBounds() @@ -90,7 +90,7 @@ class FrostVideoView @JvmOverloads constructor( withAnimator(origScale, scale) { scaleXY = it } withAnimator(origX, tX) { translationX = it } withAnimator(origY, tY) { translationY = it } - }.start() + } } } @@ -210,7 +210,7 @@ class FrostVideoView @JvmOverloads constructor( duration = FAST_ANIMATION_DURATION withAnimator(alpha, 0f) { alpha = it } withEndAction { onFinishedListener() } - }.start() + } else onFinishedListener() } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt index 2d5e376d..5afb3a21 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt @@ -4,7 +4,7 @@ import android.content.Context import android.graphics.Color import android.graphics.PointF import android.net.Uri -import android.support.v7.widget.Toolbar +import androidx.appcompat.widget.Toolbar import android.util.AttributeSet import android.view.MotionEvent import android.view.View diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt index 8122d362..18b7ae49 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt @@ -2,7 +2,7 @@ package com.pitchedapps.frost.views import android.annotation.SuppressLint import android.content.Context -import android.support.v4.view.ViewPager +import androidx.viewpager.widget.ViewPager import android.util.AttributeSet import android.view.MotionEvent import com.pitchedapps.frost.utils.Prefs diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt index 8092133b..c171ce77 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt @@ -2,11 +2,11 @@ package com.pitchedapps.frost.views import android.content.Context import android.graphics.drawable.Drawable -import android.support.constraint.ConstraintLayout -import android.support.v7.widget.AppCompatEditText -import android.support.v7.widget.AppCompatTextView -import android.support.v7.widget.LinearLayoutManager -import android.support.v7.widget.RecyclerView +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.appcompat.widget.AppCompatEditText +import androidx.appcompat.widget.AppCompatTextView +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView import android.util.AttributeSet import android.view.View import android.widget.ImageView diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt index ac62f142..4ce6f005 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt @@ -4,7 +4,7 @@ import android.annotation.SuppressLint import android.content.Context import android.graphics.Bitmap import android.graphics.Color -import android.support.annotation.WorkerThread +import androidx.annotation.WorkerThread import android.util.AttributeSet import android.view.View import android.webkit.WebView diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt index 297c4158..760d81fc 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt @@ -2,9 +2,9 @@ package com.pitchedapps.frost.web import android.annotation.SuppressLint import android.content.Context -import android.support.v4.view.NestedScrollingChild -import android.support.v4.view.NestedScrollingChildHelper -import android.support.v4.view.ViewCompat +import androidx.core.view.NestedScrollingChild +import androidx.core.view.NestedScrollingChildHelper +import androidx.core.view.ViewCompat import android.util.AttributeSet import android.view.MotionEvent import android.webkit.WebView diff --git a/app/src/main/res/drawable/frost_f_200.xml b/app/src/main/res/drawable/frost_f_200.xml new file mode 100644 index 00000000..3f07c641 --- /dev/null +++ b/app/src/main/res/drawable/frost_f_200.xml @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/frost_f_256.xml b/app/src/main/res/drawable/frost_f_256.xml deleted file mode 100644 index 220dee69..00000000 --- a/app/src/main/res/drawable/frost_f_256.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_debug.xml b/app/src/main/res/layout/activity_debug.xml index 42428e49..55553f42 100644 --- a/app/src/main/res/layout/activity_debug.xml +++ b/app/src/main/res/layout/activity_debug.xml @@ -1,5 +1,5 @@ - - - - + - + diff --git a/app/src/main/res/layout/activity_image.xml b/app/src/main/res/layout/activity_image.xml index a2264b25..4e6d4ce1 100644 --- a/app/src/main/res/layout/activity_image.xml +++ b/app/src/main/res/layout/activity_image.xml @@ -1,5 +1,5 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_image_textless.xml b/app/src/main/res/layout/activity_image_textless.xml index c5da87e6..e047b23d 100644 --- a/app/src/main/res/layout/activity_image_textless.xml +++ b/app/src/main/res/layout/activity_image_textless.xml @@ -1,5 +1,5 @@ - @@ -19,7 +19,7 @@ android:scaleX="0.9" android:scaleY="0.9" /> - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_intro.xml b/app/src/main/res/layout/activity_intro.xml index 839e33a9..e61a618d 100644 --- a/app/src/main/res/layout/activity_intro.xml +++ b/app/src/main/res/layout/activity_intro.xml @@ -1,5 +1,5 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_invalid.xml b/app/src/main/res/layout/activity_invalid.xml index dba1375b..42c16b38 100644 --- a/app/src/main/res/layout/activity_invalid.xml +++ b/app/src/main/res/layout/activity_invalid.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index 8b3ca157..653656a6 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -1,5 +1,5 @@ - - - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 883221d9..8fa9283f 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,5 +1,5 @@ - - - + - + diff --git a/app/src/main/res/layout/activity_main_bottom_tabs.xml b/app/src/main/res/layout/activity_main_bottom_tabs.xml index 783aa455..2c2527cd 100644 --- a/app/src/main/res/layout/activity_main_bottom_tabs.xml +++ b/app/src/main/res/layout/activity_main_bottom_tabs.xml @@ -5,7 +5,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - + - + diff --git a/app/src/main/res/layout/activity_selector.xml b/app/src/main/res/layout/activity_selector.xml index d9625731..4bbbd866 100644 --- a/app/src/main/res/layout/activity_selector.xml +++ b/app/src/main/res/layout/activity_selector.xml @@ -1,5 +1,5 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_tab_customizer.xml b/app/src/main/res/layout/activity_tab_customizer.xml index 8e540f11..8cf9d903 100644 --- a/app/src/main/res/layout/activity_tab_customizer.xml +++ b/app/src/main/res/layout/activity_tab_customizer.xml @@ -16,7 +16,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - @@ -36,14 +36,14 @@ - - - - - + diff --git a/app/src/main/res/layout/iitem_menu.xml b/app/src/main/res/layout/iitem_menu.xml index 3dbc7ea1..eb849cca 100644 --- a/app/src/main/res/layout/iitem_menu.xml +++ b/app/src/main/res/layout/iitem_menu.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/iitem_notification.xml b/app/src/main/res/layout/iitem_notification.xml index 266b9dc4..e7cdab73 100644 --- a/app/src/main/res/layout/iitem_notification.xml +++ b/app/src/main/res/layout/iitem_notification.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/intro_end.xml b/app/src/main/res/layout/intro_end.xml index 67931e43..501cf1a9 100644 --- a/app/src/main/res/layout/intro_end.xml +++ b/app/src/main/res/layout/intro_end.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/intro_image.xml b/app/src/main/res/layout/intro_image.xml index 8bdf4c90..97a5bcae 100644 --- a/app/src/main/res/layout/intro_image.xml +++ b/app/src/main/res/layout/intro_image.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/intro_theme.xml b/app/src/main/res/layout/intro_theme.xml index 2a8cead3..cd0538dd 100644 --- a/app/src/main/res/layout/intro_theme.xml +++ b/app/src/main/res/layout/intro_theme.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/intro_welcome.xml b/app/src/main/res/layout/intro_welcome.xml index b53af755..a73657ce 100644 --- a/app/src/main/res/layout/intro_welcome.xml +++ b/app/src/main/res/layout/intro_welcome.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/item_about_links.xml b/app/src/main/res/layout/item_about_links.xml index 09c79f37..2417c321 100644 --- a/app/src/main/res/layout/item_about_links.xml +++ b/app/src/main/res/layout/item_about_links.xml @@ -1,7 +1,7 @@ - - - @@ -18,7 +18,7 @@ android:scaleType="centerInside" android:visibility="invisible" /> - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/material_drawer_header.xml b/app/src/main/res/layout/material_drawer_header.xml index 21cd20a1..085a1870 100644 --- a/app/src/main/res/layout/material_drawer_header.xml +++ b/app/src/main/res/layout/material_drawer_header.xml @@ -92,7 +92,7 @@ android:fontFamily="sans-serif-medium" android:lines="1" android:maxLines="1" - android:textSize="@dimen/material_drawer_account_header_text" /> + android:textSize="@dimen/material_drawer_account_header_title" /> + android:textSize="@dimen/material_drawer_account_header_subtext" /> diff --git a/app/src/main/res/layout/view_account.xml b/app/src/main/res/layout/view_account.xml index 63d3e9cd..de8ee0a2 100644 --- a/app/src/main/res/layout/view_account.xml +++ b/app/src/main/res/layout/view_account.xml @@ -10,11 +10,11 @@ android:layout_width="@dimen/account_image_size" android:layout_height="@dimen/account_image_size" /> - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/view_content_base_recycler.xml b/app/src/main/res/layout/view_content_base_recycler.xml index e1591efe..05b14215 100644 --- a/app/src/main/res/layout/view_content_base_recycler.xml +++ b/app/src/main/res/layout/view_content_base_recycler.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> - @@ -19,7 +19,7 @@ android:focusableInTouchMode="true" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> - + - @@ -19,7 +19,7 @@ android:focusableInTouchMode="true" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> - + - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/view_main_fab.xml b/app/src/main/res/layout/view_main_fab.xml index 7e3ec2aa..e9fe9981 100644 --- a/app/src/main/res/layout/view_main_fab.xml +++ b/app/src/main/res/layout/view_main_fab.xml @@ -1,5 +1,5 @@ - - - -