aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-12-23 20:04:08 -0500
committerGitHub <noreply@github.com>2018-12-23 20:04:08 -0500
commit88b40736874a876576e1dc6c49c299fdfeb600bb (patch)
tree2f73204e2d089e3a4a734643a33c27f9b9921f52 /app/src/main/kotlin/com/pitchedapps
parent813be84a518ca39bba91b26b43b3db56a9d186c7 (diff)
downloadfrost-88b40736874a876576e1dc6c49c299fdfeb600bb.tar.gz
frost-88b40736874a876576e1dc6c49c299fdfeb600bb.tar.bz2
frost-88b40736874a876576e1dc6c49c299fdfeb600bb.zip
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
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt14
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt16
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt8
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/LoginActivity.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/SelectorActivity.kt8
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt10
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt10
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/enums/FeedSort.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/enums/Support.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/enums/Theme.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/services/FrostNotifications.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/services/NotificationService.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt8
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/AnimatedVectorDelegate.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt10
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostContentView.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoView.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostViewPager.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt10
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt6
32 files changed, 87 insertions, 87 deletions
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<Pair<IIcon, () -> 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