diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 7e9b905..c6de634 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -31,15 +31,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/components/GlanceSettingsDialog.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/components/GlanceSettingsDialog.kt
index 1175016..ec7a273 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/components/GlanceSettingsDialog.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/components/GlanceSettingsDialog.kt
@@ -7,10 +7,7 @@ import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
-import android.util.EventLog
-import android.util.Log
import android.view.View
-import androidx.core.app.NotificationManagerCompat
import androidx.core.view.isVisible
import com.google.android.gms.auth.api.signin.GoogleSignIn
import com.google.android.gms.auth.api.signin.GoogleSignInAccount
@@ -29,8 +26,8 @@ import com.tommasoberlose.anotherwidget.helpers.AlarmHelper
import com.tommasoberlose.anotherwidget.helpers.GreetingsHelper
import com.tommasoberlose.anotherwidget.helpers.MediaPlayerHelper
import com.tommasoberlose.anotherwidget.receivers.ActivityDetectionReceiver
-import com.tommasoberlose.anotherwidget.ui.activities.AppNotificationsFilterActivity
-import com.tommasoberlose.anotherwidget.ui.activities.MusicPlayersFilterActivity
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.AppNotificationsFilterActivity
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.MusicPlayersFilterActivity
import com.tommasoberlose.anotherwidget.ui.fragments.MainFragment
import com.tommasoberlose.anotherwidget.utils.checkGrantedPermission
import kotlinx.android.synthetic.main.glance_provider_settings_layout.view.*
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/MainActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/MainActivity.kt
index 4f477e7..b3e057d 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/MainActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/MainActivity.kt
@@ -1,62 +1,27 @@
package com.tommasoberlose.anotherwidget.ui.activities
import android.Manifest
-import android.animation.ValueAnimator
import android.app.Activity
import android.appwidget.AppWidgetManager
import android.content.Intent
-import android.content.SharedPreferences
-import android.graphics.Bitmap
-import android.graphics.Matrix
-import android.net.Uri
-import android.os.Build
import android.os.Bundle
-import android.provider.Settings
-import android.util.DisplayMetrics
-import android.util.Log
-import android.util.TypedValue
import android.view.View
-import android.widget.RelativeLayout
import androidx.appcompat.app.AppCompatActivity
-import androidx.core.animation.addListener
-import androidx.core.content.ContextCompat
-import androidx.core.view.isVisible
-import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
-import androidx.lifecycle.lifecycleScope
import androidx.navigation.NavController
import androidx.navigation.Navigation
-import com.chibatching.kotpref.Kotpref
-import com.google.android.material.badge.BadgeDrawable
-import com.google.android.material.tabs.TabLayoutMediator
import com.karumi.dexter.Dexter
import com.karumi.dexter.MultiplePermissionsReport
import com.karumi.dexter.PermissionToken
import com.karumi.dexter.listener.PermissionRequest
import com.karumi.dexter.listener.multi.MultiplePermissionsListener
import com.tommasoberlose.anotherwidget.R
-import com.tommasoberlose.anotherwidget.components.MaterialBottomSheetDialog
import com.tommasoberlose.anotherwidget.global.Actions
-import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.global.RequestCode
-import com.tommasoberlose.anotherwidget.helpers.BitmapHelper
-import com.tommasoberlose.anotherwidget.helpers.ColorHelper
-import com.tommasoberlose.anotherwidget.helpers.ColorHelper.isColorDark
-import com.tommasoberlose.anotherwidget.helpers.WeatherHelper
-import com.tommasoberlose.anotherwidget.ui.adapters.ViewPagerAdapter
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.WeatherProviderActivity
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
-import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
-import com.tommasoberlose.anotherwidget.utils.checkGrantedPermission
-import com.tommasoberlose.anotherwidget.utils.getCurrentWallpaper
-import com.tommasoberlose.anotherwidget.utils.toPixel
import kotlinx.android.synthetic.main.activity_main.*
-import kotlinx.android.synthetic.main.fragment_tab_selector.*
-import kotlinx.android.synthetic.main.the_widget_sans.*
-import kotlinx.coroutines.*
-import org.greenrobot.eventbus.EventBus
-import org.greenrobot.eventbus.Subscribe
-import org.greenrobot.eventbus.ThreadMode
class MainActivity : AppCompatActivity() {
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/IntegrationsActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/settings/IntegrationsActivity.kt
similarity index 96%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/IntegrationsActivity.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/settings/IntegrationsActivity.kt
index 06d04a8..49e1a54 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/IntegrationsActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/settings/IntegrationsActivity.kt
@@ -1,4 +1,4 @@
-package com.tommasoberlose.anotherwidget.ui.activities
+package com.tommasoberlose.anotherwidget.ui.activities.settings
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/SupportDevActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/settings/SupportDevActivity.kt
similarity index 92%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/SupportDevActivity.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/settings/SupportDevActivity.kt
index 55ead01..9dcbb30 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/SupportDevActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/settings/SupportDevActivity.kt
@@ -1,13 +1,7 @@
-package com.tommasoberlose.anotherwidget.ui.activities
+package com.tommasoberlose.anotherwidget.ui.activities.settings
-import android.app.Activity
-import android.content.Intent
-import android.location.Address
import android.os.Bundle
-import android.util.Log
-import android.view.View
import android.widget.TextView
-import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import androidx.databinding.DataBindingUtil
@@ -17,10 +11,8 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.android.billingclient.api.*
import com.android.billingclient.api.BillingClient.BillingResponseCode.OK
import com.android.billingclient.api.BillingClient.BillingResponseCode.USER_CANCELED
-import com.chibatching.kotpref.bulk
import com.tommasoberlose.anotherwidget.R
import com.tommasoberlose.anotherwidget.databinding.ActivitySupportDevBinding
-import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.ui.viewmodels.SupportDevViewModel
import com.tommasoberlose.anotherwidget.utils.toast
import kotlinx.android.synthetic.main.activity_support_dev.*
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/AppNotificationsFilterActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/AppNotificationsFilterActivity.kt
similarity index 98%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/AppNotificationsFilterActivity.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/AppNotificationsFilterActivity.kt
index f7b47e3..1eb5f3f 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/AppNotificationsFilterActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/AppNotificationsFilterActivity.kt
@@ -1,4 +1,4 @@
-package com.tommasoberlose.anotherwidget.ui.activities
+package com.tommasoberlose.anotherwidget.ui.activities.tabs
import android.content.pm.ResolveInfo
import android.os.Bundle
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/ChooseApplicationActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/ChooseApplicationActivity.kt
similarity index 97%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/ChooseApplicationActivity.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/ChooseApplicationActivity.kt
index 89dbe6f..52ca741 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/ChooseApplicationActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/ChooseApplicationActivity.kt
@@ -1,12 +1,10 @@
-package com.tommasoberlose.anotherwidget.ui.activities
+package com.tommasoberlose.anotherwidget.ui.activities.tabs
import android.app.Activity
import android.os.Bundle
import com.tommasoberlose.anotherwidget.R
import android.content.Intent
-import android.content.pm.ApplicationInfo
import android.content.pm.ResolveInfo
-import android.util.Log
import android.view.View
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/CustomDateActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/CustomDateActivity.kt
similarity index 95%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/CustomDateActivity.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/CustomDateActivity.kt
index 915a412..ee5807c 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/CustomDateActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/CustomDateActivity.kt
@@ -1,24 +1,18 @@
-package com.tommasoberlose.anotherwidget.ui.activities
+package com.tommasoberlose.anotherwidget.ui.activities.tabs
-import android.app.Activity
-import android.location.Address
import android.os.Bundle
-import android.util.Log
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
-import androidx.core.view.isVisible
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import com.chibatching.kotpref.blockingBulk
-import com.chibatching.kotpref.bulk
import com.tommasoberlose.anotherwidget.R
import com.tommasoberlose.anotherwidget.databinding.ActivityCustomDateBinding
import com.tommasoberlose.anotherwidget.global.Preferences
-import com.tommasoberlose.anotherwidget.helpers.DateHelper
import com.tommasoberlose.anotherwidget.ui.viewmodels.CustomDateViewModel
import com.tommasoberlose.anotherwidget.utils.getCapWordString
import com.tommasoberlose.anotherwidget.utils.openURI
@@ -53,7 +47,8 @@ class CustomDateActivity : AppCompatActivity() {
.register(R.layout.custom_date_example_item) { item, injector ->
injector
.text(R.id.custom_date_example_format, item)
- .text(R.id.custom_date_example_value, SimpleDateFormat(item, Locale.getDefault()).format(DATE.time))
+ .text(R.id.custom_date_example_value, SimpleDateFormat(item, Locale.getDefault()).format(
+ DATE.time))
}
.attachTo(list_view)
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/CustomFontActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/CustomFontActivity.kt
similarity index 98%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/CustomFontActivity.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/CustomFontActivity.kt
index fcbe0b7..7ed0399 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/CustomFontActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/CustomFontActivity.kt
@@ -1,4 +1,4 @@
-package com.tommasoberlose.anotherwidget.ui.activities
+package com.tommasoberlose.anotherwidget.ui.activities.tabs
import android.app.Activity
import android.content.Intent
@@ -25,7 +25,6 @@ import com.tommasoberlose.anotherwidget.components.BottomSheetMenu
import com.tommasoberlose.anotherwidget.databinding.ActivityCustomFontBinding
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
-import com.tommasoberlose.anotherwidget.helpers.DateHelper
import com.tommasoberlose.anotherwidget.helpers.SettingsStringHelper
import com.tommasoberlose.anotherwidget.ui.viewmodels.CustomFontViewModel
import kotlinx.android.synthetic.main.activity_choose_application.*
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/CustomLocationActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/CustomLocationActivity.kt
similarity index 89%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/CustomLocationActivity.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/CustomLocationActivity.kt
index e6b22dd..1b26a6f 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/CustomLocationActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/CustomLocationActivity.kt
@@ -1,19 +1,12 @@
-package com.tommasoberlose.anotherwidget.ui.activities
+package com.tommasoberlose.anotherwidget.ui.activities.tabs
import android.Manifest
-import android.annotation.SuppressLint
import android.app.Activity
import android.location.Address
import android.location.Geocoder
-import android.os.Build
import android.os.Bundle
import com.tommasoberlose.anotherwidget.R
-import android.text.Editable
-import android.text.TextWatcher
import android.view.View
-import android.view.Window
-import android.widget.AdapterView
-import android.widget.ArrayAdapter
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import androidx.databinding.DataBindingUtil
@@ -22,18 +15,13 @@ import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import com.chibatching.kotpref.bulk
-import com.google.android.material.transition.MaterialFadeThrough
-import com.google.android.material.transition.MaterialSharedAxis
import com.karumi.dexter.Dexter
import com.karumi.dexter.MultiplePermissionsReport
import com.karumi.dexter.PermissionToken
import com.karumi.dexter.listener.PermissionRequest
import com.karumi.dexter.listener.multi.MultiplePermissionsListener
-import com.tommasoberlose.anotherwidget.components.MaterialBottomSheetDialog
-import com.tommasoberlose.anotherwidget.databinding.ActivityChooseApplicationBinding
import com.tommasoberlose.anotherwidget.databinding.ActivityCustomLocationBinding
import com.tommasoberlose.anotherwidget.global.Preferences
-import com.tommasoberlose.anotherwidget.ui.viewmodels.ChooseApplicationViewModel
import com.tommasoberlose.anotherwidget.ui.viewmodels.CustomLocationViewModel
import kotlinx.android.synthetic.main.activity_custom_location.*
import kotlinx.android.synthetic.main.activity_custom_location.action_back
@@ -43,9 +31,6 @@ import kotlinx.android.synthetic.main.activity_custom_location.loader
import kotlinx.android.synthetic.main.activity_music_players_filter.*
import kotlinx.coroutines.*
import net.idik.lib.slimadapter.SlimAdapter
-import org.greenrobot.eventbus.EventBus
-import org.greenrobot.eventbus.ThreadMode
-import org.greenrobot.eventbus.Subscribe
class CustomLocationActivity : AppCompatActivity() {
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/MusicPlayersFilterActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/MusicPlayersFilterActivity.kt
similarity index 92%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/MusicPlayersFilterActivity.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/MusicPlayersFilterActivity.kt
index 495a659..2432a98 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/MusicPlayersFilterActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/MusicPlayersFilterActivity.kt
@@ -1,16 +1,11 @@
-package com.tommasoberlose.anotherwidget.ui.activities
+package com.tommasoberlose.anotherwidget.ui.activities.tabs
-import android.app.Activity
import android.os.Bundle
import com.tommasoberlose.anotherwidget.R
-import android.content.Intent
-import android.content.pm.ApplicationInfo
import android.content.pm.ResolveInfo
-import android.util.Log
import android.view.View
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
-import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.Observer
@@ -18,17 +13,13 @@ import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import com.bumptech.glide.Glide
-import com.tommasoberlose.anotherwidget.databinding.ActivityChooseApplicationBinding
import com.tommasoberlose.anotherwidget.databinding.ActivityMusicPlayersFilterBinding
-import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.helpers.MediaPlayerHelper
-import com.tommasoberlose.anotherwidget.ui.viewmodels.ChooseApplicationViewModel
import com.tommasoberlose.anotherwidget.ui.viewmodels.MusicPlayersFilterViewModel
import kotlinx.android.synthetic.main.activity_music_players_filter.*
import kotlinx.coroutines.*
import net.idik.lib.slimadapter.SlimAdapter
-import kotlin.Comparator as Comparator1
class MusicPlayersFilterActivity : AppCompatActivity() {
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/WeatherProviderActivity.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/WeatherProviderActivity.kt
similarity index 87%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/WeatherProviderActivity.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/WeatherProviderActivity.kt
index 1b80f1f..4b8466a 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/WeatherProviderActivity.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/activities/tabs/WeatherProviderActivity.kt
@@ -1,45 +1,25 @@
-package com.tommasoberlose.anotherwidget.ui.activities
+package com.tommasoberlose.anotherwidget.ui.activities.tabs
import android.app.Activity
-import android.content.Intent
-import android.content.pm.ResolveInfo
import android.os.Bundle
-import android.util.Log
import android.view.View
-import android.widget.ImageView
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
-import androidx.core.widget.addTextChangedListener
-import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
-import com.bumptech.glide.Glide
import com.google.android.material.snackbar.Snackbar
import com.tommasoberlose.anotherwidget.R
-import com.tommasoberlose.anotherwidget.components.BottomSheetMenu
import com.tommasoberlose.anotherwidget.components.BottomSheetWeatherProviderSettings
-import com.tommasoberlose.anotherwidget.databinding.ActivityChooseApplicationBinding
-import com.tommasoberlose.anotherwidget.databinding.ActivityWeatherProviderBinding
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.helpers.WeatherHelper
-import com.tommasoberlose.anotherwidget.network.WeatherNetworkApi
import com.tommasoberlose.anotherwidget.ui.fragments.MainFragment
-import com.tommasoberlose.anotherwidget.ui.viewmodels.ChooseApplicationViewModel
-import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
import com.tommasoberlose.anotherwidget.ui.viewmodels.WeatherProviderViewModel
-import com.tommasoberlose.anotherwidget.utils.collapse
-import com.tommasoberlose.anotherwidget.utils.expand
-import com.tommasoberlose.anotherwidget.utils.openURI
-import com.tommasoberlose.anotherwidget.utils.reveal
import kotlinx.android.synthetic.main.activity_weather_provider.*
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
-import kotlinx.coroutines.withContext
import net.idik.lib.slimadapter.SlimAdapter
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/adapters/ViewPagerAdapter.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/adapters/ViewPagerAdapter.kt
index 018bcea..5aa3e33 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/adapters/ViewPagerAdapter.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/adapters/ViewPagerAdapter.kt
@@ -3,7 +3,7 @@ package com.tommasoberlose.anotherwidget.ui.adapters
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
-import com.tommasoberlose.anotherwidget.ui.fragments.*
+import com.tommasoberlose.anotherwidget.ui.fragments.tabs.*
class ViewPagerAdapter(fragmentActivity: FragmentActivity) :
FragmentStateAdapter(fragmentActivity) {
@@ -12,11 +12,11 @@ class ViewPagerAdapter(fragmentActivity: FragmentActivity) :
override fun createFragment(position: Int): Fragment {
return when (position) {
- 1 -> CalendarTabFragment.newInstance()
- 2 -> WeatherTabFragment.newInstance()
- 3 -> ClockTabFragment.newInstance()
+ 1 -> CalendarFragment.newInstance()
+ 2 -> WeatherFragment.newInstance()
+ 3 -> ClockFragment.newInstance()
4 -> GlanceTabFragment.newInstance()
- else -> GeneralTabFragment.newInstance()
+ else -> LayoutFragment.newInstance()
}
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/SettingsFragment.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/SettingsFragment.kt
index 2d8b210..b8da8cf 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/SettingsFragment.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/SettingsFragment.kt
@@ -4,7 +4,6 @@ import android.Manifest
import android.content.Intent
import android.os.Build
import android.os.Bundle
-import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -31,9 +30,9 @@ import com.tommasoberlose.anotherwidget.helpers.ActiveNotificationsHelper
import com.tommasoberlose.anotherwidget.helpers.CalendarHelper
import com.tommasoberlose.anotherwidget.helpers.MediaPlayerHelper
import com.tommasoberlose.anotherwidget.helpers.WeatherHelper
-import com.tommasoberlose.anotherwidget.ui.activities.IntegrationsActivity
+import com.tommasoberlose.anotherwidget.ui.activities.settings.IntegrationsActivity
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
-import com.tommasoberlose.anotherwidget.ui.activities.SupportDevActivity
+import com.tommasoberlose.anotherwidget.ui.activities.settings.SupportDevActivity
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
import com.tommasoberlose.anotherwidget.utils.checkGrantedPermission
import com.tommasoberlose.anotherwidget.utils.openURI
@@ -65,7 +64,7 @@ class SettingsFragment : Fragment() {
viewModel = ViewModelProvider(activity as MainActivity).get(MainViewModel::class.java)
val binding = DataBindingUtil.inflate(inflater,
- R.layout.fragment_settings,
+ R.layout.fragment_app_settings,
container,
false)
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/CalendarTabFragment.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/CalendarFragment.kt
similarity index 95%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/CalendarTabFragment.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/CalendarFragment.kt
index b1a69b9..75e6093 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/CalendarTabFragment.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/CalendarFragment.kt
@@ -1,4 +1,4 @@
-package com.tommasoberlose.anotherwidget.ui.fragments
+package com.tommasoberlose.anotherwidget.ui.fragments.tabs
import android.Manifest
import android.app.Activity
@@ -8,7 +8,6 @@ import android.provider.CalendarContract
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import androidx.core.view.isVisible
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
@@ -16,11 +15,6 @@ import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import com.chibatching.kotpref.bulk
import com.google.android.material.transition.MaterialSharedAxis
-import com.karumi.dexter.Dexter
-import com.karumi.dexter.MultiplePermissionsReport
-import com.karumi.dexter.PermissionToken
-import com.karumi.dexter.listener.PermissionRequest
-import com.karumi.dexter.listener.multi.MultiplePermissionsListener
import com.tommasoberlose.anotherwidget.R
import com.tommasoberlose.anotherwidget.components.BottomSheetMenu
import com.tommasoberlose.anotherwidget.models.CalendarSelector
@@ -28,7 +22,7 @@ import com.tommasoberlose.anotherwidget.databinding.FragmentCalendarSettingsBind
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.global.RequestCode
-import com.tommasoberlose.anotherwidget.ui.activities.ChooseApplicationActivity
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.ChooseApplicationActivity
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
import com.tommasoberlose.anotherwidget.helpers.CalendarHelper
@@ -39,16 +33,14 @@ import com.tommasoberlose.anotherwidget.utils.isDefaultSet
import com.tommasoberlose.anotherwidget.utils.toast
import kotlinx.android.synthetic.main.fragment_calendar_settings.*
import kotlinx.android.synthetic.main.fragment_calendar_settings.scrollView
-import kotlinx.android.synthetic.main.fragment_settings.*
-import kotlinx.android.synthetic.main.fragment_tab_selector.*
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlin.Comparator
-class CalendarTabFragment : Fragment() {
+class CalendarFragment : Fragment() {
companion object {
- fun newInstance() = CalendarTabFragment()
+ fun newInstance() = CalendarFragment()
}
private lateinit var viewModel: MainViewModel
@@ -65,7 +57,7 @@ class CalendarTabFragment : Fragment() {
): View {
viewModel = ViewModelProvider(activity as MainActivity).get(MainViewModel::class.java)
- val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_calendar_settings, container, false)
+ val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_tab_calendar, container, false)
subscribeUi(binding, viewModel)
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/ClockTabFragment.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/ClockFragment.kt
similarity index 93%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/ClockTabFragment.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/ClockFragment.kt
index bd6f87e..4ba944f 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/ClockTabFragment.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/ClockFragment.kt
@@ -1,19 +1,12 @@
-package com.tommasoberlose.anotherwidget.ui.fragments
+package com.tommasoberlose.anotherwidget.ui.fragments.tabs
import android.app.Activity
-import android.app.AlarmManager
-import android.content.BroadcastReceiver
-import android.content.Context
import android.content.Intent
-import android.content.IntentFilter
-import android.content.pm.PackageManager
import android.os.Bundle
import android.text.format.DateFormat
-import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import androidx.core.view.isVisible
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
@@ -24,36 +17,31 @@ import com.google.android.material.transition.MaterialSharedAxis
import com.tommasoberlose.anotherwidget.R
import com.tommasoberlose.anotherwidget.components.BottomSheetColorPicker
import com.tommasoberlose.anotherwidget.components.BottomSheetMenu
-import com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
import com.tommasoberlose.anotherwidget.databinding.FragmentClockSettingsBinding
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.global.RequestCode
-import com.tommasoberlose.anotherwidget.helpers.AlarmHelper
import com.tommasoberlose.anotherwidget.helpers.ColorHelper
import com.tommasoberlose.anotherwidget.helpers.ColorHelper.toHexValue
import com.tommasoberlose.anotherwidget.helpers.ColorHelper.toIntValue
import com.tommasoberlose.anotherwidget.helpers.IntentHelper
-import com.tommasoberlose.anotherwidget.ui.activities.ChooseApplicationActivity
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.ChooseApplicationActivity
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
import com.tommasoberlose.anotherwidget.utils.isDarkTheme
import com.tommasoberlose.anotherwidget.utils.isDefaultSet
-import kotlinx.android.synthetic.main.fragment_calendar_settings.*
import kotlinx.android.synthetic.main.fragment_clock_settings.*
import kotlinx.android.synthetic.main.fragment_clock_settings.scrollView
-import kotlinx.android.synthetic.main.fragment_tab_selector.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
-import java.lang.Exception
-class ClockTabFragment : Fragment() {
+class ClockFragment : Fragment() {
companion object {
- fun newInstance() = ClockTabFragment()
+ fun newInstance() = ClockFragment()
}
private lateinit var viewModel: MainViewModel
@@ -72,7 +60,7 @@ class ClockTabFragment : Fragment() {
): View {
viewModel = ViewModelProvider(activity as MainActivity).get(MainViewModel::class.java)
- binding = DataBindingUtil.inflate(inflater, R.layout.fragment_clock_settings, container, false)
+ binding = DataBindingUtil.inflate(inflater, R.layout.fragment_clock, container, false)
subscribeUi(binding, viewModel)
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/GlanceTabFragment.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/GlanceTabFragment.kt
similarity index 99%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/GlanceTabFragment.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/GlanceTabFragment.kt
index 05d6d5b..62eb1e9 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/GlanceTabFragment.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/GlanceTabFragment.kt
@@ -1,4 +1,4 @@
-package com.tommasoberlose.anotherwidget.ui.fragments
+package com.tommasoberlose.anotherwidget.ui.fragments.tabs
import android.Manifest
import android.app.Activity
@@ -10,7 +10,6 @@ import android.content.IntentFilter
import android.graphics.Canvas
import android.os.Build
import android.os.Bundle
-import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@@ -19,7 +18,6 @@ import androidx.core.content.ContextCompat
import androidx.core.view.ViewCompat
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
-import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.ItemTouchHelper
@@ -80,7 +78,7 @@ class GlanceTabFragment : Fragment() {
viewModel = ViewModelProvider(activity as MainActivity).get(MainViewModel::class.java)
val binding = DataBindingUtil.inflate(inflater,
- R.layout.fragment_glance_settings,
+ R.layout.fragment_tab_glance,
container,
false)
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/GeneralTabFragment.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/LayoutFragment.kt
similarity index 91%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/GeneralTabFragment.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/LayoutFragment.kt
index 77799ce..0276960 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/GeneralTabFragment.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/LayoutFragment.kt
@@ -1,26 +1,17 @@
-package com.tommasoberlose.anotherwidget.ui.fragments
+package com.tommasoberlose.anotherwidget.ui.fragments.tabs
import android.annotation.SuppressLint
-import android.app.Activity
import android.content.Intent
-import android.graphics.Typeface
import android.os.Bundle
-import android.os.Handler
-import android.os.HandlerThread
-import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import android.widget.Toast
-import androidx.core.provider.FontRequest
-import androidx.core.provider.FontsContractCompat
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import com.chibatching.kotpref.blockingBulk
-import com.chibatching.kotpref.bulk
import com.google.android.material.transition.MaterialSharedAxis
import com.tommasoberlose.anotherwidget.R
import com.tommasoberlose.anotherwidget.components.BottomSheetColorPicker
@@ -28,24 +19,17 @@ import com.tommasoberlose.anotherwidget.components.BottomSheetMenu
import com.tommasoberlose.anotherwidget.databinding.FragmentGeneralSettingsBinding
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
-import com.tommasoberlose.anotherwidget.global.RequestCode
import com.tommasoberlose.anotherwidget.helpers.ColorHelper
import com.tommasoberlose.anotherwidget.helpers.ColorHelper.toHexValue
import com.tommasoberlose.anotherwidget.helpers.ColorHelper.toIntValue
import com.tommasoberlose.anotherwidget.helpers.DateHelper
-import com.tommasoberlose.anotherwidget.helpers.SettingsStringHelper
-import com.tommasoberlose.anotherwidget.helpers.WidgetHelper
-import com.tommasoberlose.anotherwidget.ui.activities.ChooseApplicationActivity
-import com.tommasoberlose.anotherwidget.ui.activities.CustomDateActivity
-import com.tommasoberlose.anotherwidget.ui.activities.CustomFontActivity
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.CustomDateActivity
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
-import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
import com.tommasoberlose.anotherwidget.utils.isDarkTheme
import kotlinx.android.synthetic.main.fragment_calendar_settings.*
import kotlinx.android.synthetic.main.fragment_clock_settings.*
import kotlinx.android.synthetic.main.fragment_general_settings.*
-import kotlinx.android.synthetic.main.fragment_general_settings.scrollView
import kotlinx.android.synthetic.main.fragment_tab_selector.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
@@ -54,10 +38,10 @@ import kotlinx.coroutines.withContext
import java.util.*
-class GeneralTabFragment : Fragment() {
+class LayoutFragment : Fragment() {
companion object {
- fun newInstance() = GeneralTabFragment()
+ fun newInstance() = LayoutFragment()
}
private lateinit var viewModel: MainViewModel
@@ -75,7 +59,7 @@ class GeneralTabFragment : Fragment() {
): View {
viewModel = ViewModelProvider(activity as MainActivity).get(MainViewModel::class.java)
- val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_general_settings, container, false)
+ val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_tab_layout, container, false)
subscribeUi(viewModel)
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/TabSelectorFragment.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/PreferencesFragment.kt
similarity index 89%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/TabSelectorFragment.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/PreferencesFragment.kt
index 11007ad..4123b34 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/TabSelectorFragment.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/PreferencesFragment.kt
@@ -1,22 +1,16 @@
-package com.tommasoberlose.anotherwidget.ui.fragments
+package com.tommasoberlose.anotherwidget.ui.fragments.tabs
import android.Manifest
-import android.app.Activity
-import android.content.Intent
import android.os.Bundle
-import android.provider.CalendarContract
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import androidx.core.view.isVisible
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.navigation.Navigation
-import androidx.navigation.findNavController
-import com.chibatching.kotpref.bulk
import com.google.android.material.transition.MaterialSharedAxis
import com.karumi.dexter.Dexter
import com.karumi.dexter.MultiplePermissionsReport
@@ -24,31 +18,23 @@ import com.karumi.dexter.PermissionToken
import com.karumi.dexter.listener.PermissionRequest
import com.karumi.dexter.listener.multi.MultiplePermissionsListener
import com.tommasoberlose.anotherwidget.R
-import com.tommasoberlose.anotherwidget.components.BottomSheetMenu
import com.tommasoberlose.anotherwidget.components.MaterialBottomSheetDialog
import com.tommasoberlose.anotherwidget.databinding.FragmentTabSelectorBinding
-import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
-import com.tommasoberlose.anotherwidget.global.RequestCode
import com.tommasoberlose.anotherwidget.helpers.CalendarHelper
-import com.tommasoberlose.anotherwidget.helpers.IntentHelper
-import com.tommasoberlose.anotherwidget.helpers.SettingsStringHelper
-import com.tommasoberlose.anotherwidget.models.CalendarSelector
import com.tommasoberlose.anotherwidget.receivers.WeatherReceiver
-import com.tommasoberlose.anotherwidget.ui.activities.ChooseApplicationActivity
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
import com.tommasoberlose.anotherwidget.utils.*
-import kotlinx.android.synthetic.main.fragment_calendar_settings.*
import kotlinx.android.synthetic.main.fragment_tab_selector.*
import kotlinx.android.synthetic.main.fragment_tab_selector.scrollView
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
-class TabSelectorFragment : Fragment() {
+class PreferencesFragment : Fragment() {
companion object {
- fun newInstance() = TabSelectorFragment()
+ fun newInstance() = PreferencesFragment()
}
private lateinit var viewModel: MainViewModel
@@ -66,7 +52,7 @@ class TabSelectorFragment : Fragment() {
): View {
viewModel = ViewModelProvider(activity as MainActivity).get(MainViewModel::class.java)
- val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_tab_selector, container, false)
+ val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_preferences, container, false)
subscribeUi(binding, viewModel)
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/TypographyTabFragment.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/TypographyFragment.kt
similarity index 95%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/TypographyTabFragment.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/TypographyFragment.kt
index 6d88cff..5481cd8 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/TypographyTabFragment.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/TypographyFragment.kt
@@ -1,4 +1,4 @@
-package com.tommasoberlose.anotherwidget.ui.fragments
+package com.tommasoberlose.anotherwidget.ui.fragments.tabs
import android.annotation.SuppressLint
import android.content.Intent
@@ -10,13 +10,11 @@ import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
-import com.chibatching.kotpref.blockingBulk
import com.chibatching.kotpref.bulk
import com.google.android.material.transition.MaterialSharedAxis
import com.tommasoberlose.anotherwidget.R
import com.tommasoberlose.anotherwidget.components.BottomSheetColorPicker
import com.tommasoberlose.anotherwidget.components.BottomSheetMenu
-import com.tommasoberlose.anotherwidget.databinding.FragmentGeneralSettingsBinding
import com.tommasoberlose.anotherwidget.databinding.FragmentTypographyTabBinding
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
@@ -24,28 +22,23 @@ import com.tommasoberlose.anotherwidget.global.RequestCode
import com.tommasoberlose.anotherwidget.helpers.ColorHelper
import com.tommasoberlose.anotherwidget.helpers.ColorHelper.toHexValue
import com.tommasoberlose.anotherwidget.helpers.ColorHelper.toIntValue
-import com.tommasoberlose.anotherwidget.helpers.DateHelper
import com.tommasoberlose.anotherwidget.helpers.SettingsStringHelper
-import com.tommasoberlose.anotherwidget.ui.activities.CustomDateActivity
-import com.tommasoberlose.anotherwidget.ui.activities.CustomFontActivity
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.CustomFontActivity
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
import com.tommasoberlose.anotherwidget.utils.isDarkTheme
-import kotlinx.android.synthetic.main.fragment_calendar_settings.*
-import kotlinx.android.synthetic.main.fragment_tab_selector.*
import kotlinx.android.synthetic.main.fragment_typography_tab.*
import kotlinx.android.synthetic.main.fragment_typography_tab.scrollView
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
-import java.util.*
-class TypographyTabFragment : Fragment() {
+class TypographyFragment : Fragment() {
companion object {
- fun newInstance() = TypographyTabFragment()
+ fun newInstance() = TypographyFragment()
}
private lateinit var viewModel: MainViewModel
@@ -63,7 +56,7 @@ class TypographyTabFragment : Fragment() {
): View {
viewModel = ViewModelProvider(activity as MainActivity).get(MainViewModel::class.java)
- val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_typography_tab, container, false)
+ val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_tab_typography, container, false)
subscribeUi(viewModel)
diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/WeatherTabFragment.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/WeatherFragment.kt
similarity index 93%
rename from app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/WeatherTabFragment.kt
rename to app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/WeatherFragment.kt
index 70fd2a7..406e37f 100644
--- a/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/WeatherTabFragment.kt
+++ b/app/src/main/java/com/tommasoberlose/anotherwidget/ui/fragments/tabs/WeatherFragment.kt
@@ -1,16 +1,12 @@
-package com.tommasoberlose.anotherwidget.ui.fragments
+package com.tommasoberlose.anotherwidget.ui.fragments.tabs
import android.Manifest
import android.app.Activity
import android.content.Intent
-import android.os.Build
import android.os.Bundle
-import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import androidx.core.content.ContextCompat
-import androidx.core.os.BuildCompat
import androidx.core.view.isVisible
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
@@ -32,30 +28,27 @@ import com.tommasoberlose.anotherwidget.databinding.FragmentWeatherSettingsBindi
import com.tommasoberlose.anotherwidget.global.Constants
import com.tommasoberlose.anotherwidget.global.Preferences
import com.tommasoberlose.anotherwidget.global.RequestCode
-import com.tommasoberlose.anotherwidget.helpers.ColorHelper
import com.tommasoberlose.anotherwidget.helpers.SettingsStringHelper
import com.tommasoberlose.anotherwidget.helpers.WeatherHelper
import com.tommasoberlose.anotherwidget.receivers.WeatherReceiver
-import com.tommasoberlose.anotherwidget.ui.activities.ChooseApplicationActivity
-import com.tommasoberlose.anotherwidget.ui.activities.CustomLocationActivity
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.ChooseApplicationActivity
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.CustomLocationActivity
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
-import com.tommasoberlose.anotherwidget.ui.activities.WeatherProviderActivity
+import com.tommasoberlose.anotherwidget.ui.activities.tabs.WeatherProviderActivity
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
import com.tommasoberlose.anotherwidget.utils.checkGrantedPermission
import com.tommasoberlose.anotherwidget.utils.collapse
import com.tommasoberlose.anotherwidget.utils.expand
-import kotlinx.android.synthetic.main.fragment_calendar_settings.*
-import kotlinx.android.synthetic.main.fragment_tab_selector.*
import kotlinx.android.synthetic.main.fragment_weather_settings.*
import kotlinx.android.synthetic.main.fragment_weather_settings.scrollView
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
-class WeatherTabFragment : Fragment() {
+class WeatherFragment : Fragment() {
companion object {
- fun newInstance() = WeatherTabFragment()
+ fun newInstance() = WeatherFragment()
}
private lateinit var viewModel: MainViewModel
@@ -72,7 +65,7 @@ class WeatherTabFragment : Fragment() {
): View {
viewModel = ViewModelProvider(activity as MainActivity).get(MainViewModel::class.java)
- val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_weather_settings, container, false)
+ val binding = DataBindingUtil.inflate(inflater, R.layout.fragment_tab_weather, container, false)
subscribeUi(binding, viewModel)
diff --git a/app/src/main/res/layout/activity_app_notifications_filter.xml b/app/src/main/res/layout/activity_app_notifications_filter.xml
index 1a17d4f..9259c79 100644
--- a/app/src/main/res/layout/activity_app_notifications_filter.xml
+++ b/app/src/main/res/layout/activity_app_notifications_filter.xml
@@ -13,7 +13,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/colorPrimaryDark"
- tools:context="com.tommasoberlose.anotherwidget.ui.activities.AppNotificationsFilterActivity">
+ tools:context="com.tommasoberlose.anotherwidget.ui.activities.tabs.AppNotificationsFilterActivity">
+ tools:context="com.tommasoberlose.anotherwidget.ui.activities.tabs.ChooseApplicationActivity">
+ tools:context="com.tommasoberlose.anotherwidget.ui.activities.tabs.ChooseApplicationActivity">
+ tools:context="com.tommasoberlose.anotherwidget.ui.activities.tabs.CustomLocationActivity">
+ tools:context="com.tommasoberlose.anotherwidget.ui.activities.settings.IntegrationsActivity">
+ tools:context="com.tommasoberlose.anotherwidget.ui.activities.tabs.MusicPlayersFilterActivity">
+ tools:context="com.tommasoberlose.anotherwidget.ui.activities.tabs.ChooseApplicationActivity">
+ tools:context="com.tommasoberlose.anotherwidget.ui.activities.tabs.WeatherProviderActivity">
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_glance_settings.xml b/app/src/main/res/layout/fragment_tab_glance.xml
similarity index 100%
rename from app/src/main/res/layout/fragment_glance_settings.xml
rename to app/src/main/res/layout/fragment_tab_glance.xml
diff --git a/app/src/main/res/layout/fragment_general_settings.xml b/app/src/main/res/layout/fragment_tab_layout.xml
similarity index 100%
rename from app/src/main/res/layout/fragment_general_settings.xml
rename to app/src/main/res/layout/fragment_tab_layout.xml
diff --git a/app/src/main/res/layout/fragment_typography_tab.xml b/app/src/main/res/layout/fragment_tab_typography.xml
similarity index 100%
rename from app/src/main/res/layout/fragment_typography_tab.xml
rename to app/src/main/res/layout/fragment_tab_typography.xml
diff --git a/app/src/main/res/layout/fragment_weather_settings.xml b/app/src/main/res/layout/fragment_tab_weather.xml
similarity index 100%
rename from app/src/main/res/layout/fragment_weather_settings.xml
rename to app/src/main/res/layout/fragment_tab_weather.xml
diff --git a/app/src/main/res/navigation/settings_nav_graph.xml b/app/src/main/res/navigation/settings_nav_graph.xml
index 7c0a223..18a1593 100644
--- a/app/src/main/res/navigation/settings_nav_graph.xml
+++ b/app/src/main/res/navigation/settings_nav_graph.xml
@@ -5,27 +5,27 @@
\ No newline at end of file