diff --git a/build.gradle b/build.gradle index 72e01fd7..6c29ea6e 100644 --- a/build.gradle +++ b/build.gradle @@ -132,7 +132,6 @@ dependencies { implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10' implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.appcompat:appcompat-resources:1.4.1' implementation 'androidx.fragment:fragment-ktx:1.4.1' implementation 'androidx.activity:activity-ktx:1.4.0' implementation "androidx.preference:preference-ktx:1.2.0" diff --git a/src/main/kotlin/com/looker/droidify/ui/adapters/AppDetailAdapter.kt b/src/main/kotlin/com/looker/droidify/ui/adapters/AppDetailAdapter.kt index 4836ec25..d4cd6445 100644 --- a/src/main/kotlin/com/looker/droidify/ui/adapters/AppDetailAdapter.kt +++ b/src/main/kotlin/com/looker/droidify/ui/adapters/AppDetailAdapter.kt @@ -22,9 +22,9 @@ import android.view.Gravity import android.view.MotionEvent import android.view.View import android.view.ViewGroup +import android.widget.LinearLayout import androidx.annotation.DrawableRes import androidx.annotation.StringRes -import androidx.appcompat.widget.LinearLayoutCompat import androidx.core.content.res.ResourcesCompat import androidx.core.net.toUri import androidx.core.text.HtmlCompat @@ -349,7 +349,7 @@ class AppDetailAdapter(private val callbacks: Callbacks) : this.defaultIcon = Utils.getDefaultApplicationIcon(icon.context) } - val targetBlock = itemView.findViewById(R.id.sdk_block)!! + val targetBlock = itemView.findViewById(R.id.sdk_block)!! val divider1 = itemView.findViewById(R.id.divider1)!! val targetSdk = itemView.findViewById(R.id.sdk)!! val version = itemView.findViewById(R.id.version)!! @@ -507,12 +507,12 @@ class AppDetailAdapter(private val callbacks: Callbacks) : } private class EmptyViewHolder(context: Context) : - RecyclerView.ViewHolder(LinearLayoutCompat(context)) { + RecyclerView.ViewHolder(LinearLayout(context)) { val packageName: MaterialTextView init { - itemView as LinearLayoutCompat - itemView.orientation = LinearLayoutCompat.VERTICAL + itemView as LinearLayout + itemView.orientation = LinearLayout.VERTICAL itemView.gravity = Gravity.CENTER itemView.resources.sizeScaled(20).let { itemView.setPadding(it, it, it, it) } val title = MaterialTextView(itemView.context) @@ -523,8 +523,8 @@ class AppDetailAdapter(private val callbacks: Callbacks) : title.setText(R.string.application_not_found) itemView.addView( title, - LinearLayoutCompat.LayoutParams.MATCH_PARENT, - LinearLayoutCompat.LayoutParams.WRAP_CONTENT + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT ) val packageName = MaterialTextView(itemView.context) packageName.gravity = Gravity.CENTER @@ -532,8 +532,8 @@ class AppDetailAdapter(private val callbacks: Callbacks) : packageName.setTextSizeScaled(18) itemView.addView( packageName, - LinearLayoutCompat.LayoutParams.MATCH_PARENT, - LinearLayoutCompat.LayoutParams.WRAP_CONTENT + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT ) itemView.layoutParams = RecyclerView.LayoutParams( RecyclerView.LayoutParams.MATCH_PARENT, diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsNavFragmentX.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsNavFragmentX.kt index 98d949c7..5805e4c0 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsNavFragmentX.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsNavFragmentX.kt @@ -11,8 +11,8 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.view.WindowManager +import android.widget.LinearLayout import androidx.appcompat.app.AlertDialog -import androidx.appcompat.widget.LinearLayoutCompat import androidx.core.net.toUri import androidx.core.widget.NestedScrollView import androidx.fragment.app.DialogFragment @@ -119,7 +119,7 @@ abstract class PrefsNavFragmentX : Fragment() { } } - protected fun LinearLayoutCompat.addText(title: String, summary: String, url: String) { + protected fun LinearLayout.addText(title: String, summary: String, url: String) { val text = MaterialTextView(context) val subText = MaterialTextView(context) text.text = title @@ -132,21 +132,21 @@ abstract class PrefsNavFragmentX : Fragment() { } addView( text, - LinearLayoutCompat.LayoutParams.MATCH_PARENT, - LinearLayoutCompat.LayoutParams.WRAP_CONTENT + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT ) addView( subText, - LinearLayoutCompat.LayoutParams.MATCH_PARENT, - LinearLayoutCompat.LayoutParams.WRAP_CONTENT + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT ) text.setOnClickListener { openURI(url.toUri()) } subText.setOnClickListener { openURI(url.toUri()) } } - protected inline fun LinearLayoutCompat.addCategory( + protected inline fun LinearLayout.addCategory( title: String, - callback: LinearLayoutCompat.() -> Unit, + callback: LinearLayout.() -> Unit, ) { val text = MaterialTextView(context) text.typeface = TypefaceExtra.medium @@ -156,13 +156,13 @@ abstract class PrefsNavFragmentX : Fragment() { resources.sizeScaled(16).let { text.setPadding(it, it, it, 0) } addView( text, - LinearLayoutCompat.LayoutParams.MATCH_PARENT, - LinearLayoutCompat.LayoutParams.WRAP_CONTENT + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT ) callback() } - protected fun LinearLayoutCompat.addPreference( + protected fun LinearLayout.addPreference( key: Preferences.Key, title: String, summaryProvider: () -> String, dialogProvider: ((Context) -> AlertDialog)?, ): Preference { @@ -172,7 +172,7 @@ abstract class PrefsNavFragmentX : Fragment() { return preference } - protected fun LinearLayoutCompat.addSwitch( + protected fun LinearLayout.addSwitch( key: Preferences.Key, title: String, summary: String, @@ -183,7 +183,7 @@ abstract class PrefsNavFragmentX : Fragment() { preference.setCallback { preference.check.isChecked = Preferences[key] } } - protected fun LinearLayoutCompat.addEdit( + protected fun LinearLayout.addEdit( key: Preferences.Key, title: String, valueToString: (T) -> String, stringToValue: (String) -> T?, configureEdit: (TextInputEditText) -> Unit, ) { @@ -219,11 +219,11 @@ abstract class PrefsNavFragmentX : Fragment() { } } - protected fun LinearLayoutCompat.addEditString(key: Preferences.Key, title: String) { + protected fun LinearLayout.addEditString(key: Preferences.Key, title: String) { addEdit(key, title, { it }, { it }, { }) } - protected fun LinearLayoutCompat.addEditInt( + protected fun LinearLayout.addEditInt( key: Preferences.Key, title: String, range: IntRange?, @@ -239,7 +239,7 @@ abstract class PrefsNavFragmentX : Fragment() { } } - protected fun > LinearLayoutCompat.addEnumeration( + protected fun > LinearLayout.addEnumeration( key: Preferences.Key, title: String, valueToString: (T) -> String, @@ -260,7 +260,7 @@ abstract class PrefsNavFragmentX : Fragment() { } } - protected fun LinearLayoutCompat.addList( + protected fun LinearLayout.addList( key: Preferences.Key, title: String, values: List, diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsOtherFragment.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsOtherFragment.kt index a78868a2..5ff0fce7 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsOtherFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsOtherFragment.kt @@ -1,7 +1,7 @@ package com.looker.droidify.ui.fragments import android.view.ViewGroup -import androidx.appcompat.widget.LinearLayoutCompat +import android.widget.LinearLayout import com.google.android.material.circularreveal.CircularRevealFrameLayout import com.looker.droidify.BuildConfig import com.looker.droidify.R @@ -10,8 +10,8 @@ import com.looker.droidify.content.Preferences class PrefsOtherFragment : PrefsNavFragmentX() { override fun setupPrefs(scrollLayout: CircularRevealFrameLayout) { - val preferences = LinearLayoutCompat(scrollLayout.context) - preferences.orientation = LinearLayoutCompat.VERTICAL + val preferences = LinearLayout(scrollLayout.context) + preferences.orientation = LinearLayout.VERTICAL scrollLayout.addView( preferences, ViewGroup.LayoutParams.MATCH_PARENT, diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsUpdatesFragment.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsUpdatesFragment.kt index d04a4afd..9ee823d6 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsUpdatesFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsUpdatesFragment.kt @@ -1,7 +1,7 @@ package com.looker.droidify.ui.fragments import android.view.ViewGroup -import androidx.appcompat.widget.LinearLayoutCompat +import android.widget.LinearLayout import com.google.android.material.circularreveal.CircularRevealFrameLayout import com.looker.droidify.R import com.looker.droidify.content.Preferences @@ -9,8 +9,8 @@ import com.looker.droidify.content.Preferences class PrefsUpdatesFragment : PrefsNavFragmentX() { override fun setupPrefs(scrollLayout: CircularRevealFrameLayout) { - val preferences = LinearLayoutCompat(scrollLayout.context) - preferences.orientation = LinearLayoutCompat.VERTICAL + val preferences = LinearLayout(scrollLayout.context) + preferences.orientation = LinearLayout.VERTICAL scrollLayout.addView( preferences, ViewGroup.LayoutParams.MATCH_PARENT, diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsUserFragment.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsUserFragment.kt index 1fd37edd..5e7fe1b5 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsUserFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/PrefsUserFragment.kt @@ -1,7 +1,7 @@ package com.looker.droidify.ui.fragments import android.view.ViewGroup -import androidx.appcompat.widget.LinearLayoutCompat +import android.widget.LinearLayout import com.google.android.material.circularreveal.CircularRevealFrameLayout import com.looker.droidify.R import com.looker.droidify.content.Preferences @@ -12,8 +12,8 @@ import com.looker.droidify.utility.Utils.translateLocale class PrefsUserFragment : PrefsNavFragmentX() { override fun setupPrefs(scrollLayout: CircularRevealFrameLayout) { - val preferences = LinearLayoutCompat(scrollLayout.context) - preferences.orientation = LinearLayoutCompat.VERTICAL + val preferences = LinearLayout(scrollLayout.context) + preferences.orientation = LinearLayout.VERTICAL scrollLayout.addView( preferences, ViewGroup.LayoutParams.MATCH_PARENT, diff --git a/src/main/res/layout/fragment_explore_x.xml b/src/main/res/layout/fragment_explore_x.xml index aece8b86..c081e301 100644 --- a/src/main/res/layout/fragment_explore_x.xml +++ b/src/main/res/layout/fragment_explore_x.xml @@ -26,7 +26,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - + diff --git a/src/main/res/layout/fragment_installed_x.xml b/src/main/res/layout/fragment_installed_x.xml index 63014e59..41a9dafb 100644 --- a/src/main/res/layout/fragment_installed_x.xml +++ b/src/main/res/layout/fragment_installed_x.xml @@ -22,7 +22,7 @@ - @@ -37,7 +37,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> - - + diff --git a/src/main/res/layout/fragment_latest_x.xml b/src/main/res/layout/fragment_latest_x.xml index 740bfbdb..d5d38a11 100644 --- a/src/main/res/layout/fragment_latest_x.xml +++ b/src/main/res/layout/fragment_latest_x.xml @@ -22,7 +22,7 @@ - @@ -81,6 +81,6 @@ android:layout_weight="1" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@id/modeBar" /> - + diff --git a/src/main/res/layout/fragment_repositories_x.xml b/src/main/res/layout/fragment_repositories_x.xml index eb68de3f..d5b10359 100644 --- a/src/main/res/layout/fragment_repositories_x.xml +++ b/src/main/res/layout/fragment_repositories_x.xml @@ -25,7 +25,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - @@ -45,7 +45,7 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /> - + diff --git a/src/main/res/layout/item_app_info_x.xml b/src/main/res/layout/item_app_info_x.xml index 7ebcdbf2..93f6ce2a 100644 --- a/src/main/res/layout/item_app_info_x.xml +++ b/src/main/res/layout/item_app_info_x.xml @@ -12,7 +12,7 @@ android:paddingTop="12dp" android:paddingBottom="4dp"> - - - - + - + - - - + - - + - - + - - + - - + + - - + - - - + - + \ No newline at end of file diff --git a/src/main/res/layout/permissions_item.xml b/src/main/res/layout/permissions_item.xml index a9fbcef5..b114b5ad 100644 --- a/src/main/res/layout/permissions_item.xml +++ b/src/main/res/layout/permissions_item.xml @@ -6,7 +6,7 @@ - - + \ No newline at end of file diff --git a/src/main/res/layout/preference_item.xml b/src/main/res/layout/preference_item.xml index 71cad1a5..6c1a580a 100644 --- a/src/main/res/layout/preference_item.xml +++ b/src/main/res/layout/preference_item.xml @@ -5,13 +5,13 @@ - - - + - + \ No newline at end of file diff --git a/src/main/res/layout/product_item.xml b/src/main/res/layout/product_item.xml index e820fa56..a73c592a 100644 --- a/src/main/res/layout/product_item.xml +++ b/src/main/res/layout/product_item.xml @@ -11,7 +11,7 @@ android:layout_width="match_parent" android:layout_height="72dp"> - - - - + - - + + \ No newline at end of file diff --git a/src/main/res/layout/release_item.xml b/src/main/res/layout/release_item.xml index 9e60d115..c33c07e9 100644 --- a/src/main/res/layout/release_item.xml +++ b/src/main/res/layout/release_item.xml @@ -11,7 +11,7 @@ android:layout_marginVertical="@dimen/shape_margin_small" android:layout_height="wrap_content"> - - - - + - + - @@ -84,7 +84,7 @@ android:textColor="?android:attr/textColorSecondary" android:textSize="14sp" /> - + - + \ No newline at end of file diff --git a/src/main/res/layout/section_item.xml b/src/main/res/layout/section_item.xml index a2b6e477..63cbd096 100644 --- a/src/main/res/layout/section_item.xml +++ b/src/main/res/layout/section_item.xml @@ -6,7 +6,7 @@ - - + \ No newline at end of file diff --git a/src/main/res/layout/sheet_edit_repository.xml b/src/main/res/layout/sheet_edit_repository.xml index 04e56ca9..9ce7aa98 100644 --- a/src/main/res/layout/sheet_edit_repository.xml +++ b/src/main/res/layout/sheet_edit_repository.xml @@ -17,7 +17,7 @@ android:layout_height="match_parent" android:fillViewport="true"> - - + \ No newline at end of file diff --git a/src/main/res/layout/sheet_repository.xml b/src/main/res/layout/sheet_repository.xml index 2e4e7f1a..fa623ce5 100644 --- a/src/main/res/layout/sheet_repository.xml +++ b/src/main/res/layout/sheet_repository.xml @@ -22,12 +22,12 @@ android:layout_height="match_parent" android:padding="12dp"> - - - + - - + - - + - - + - - + - - + - @@ -192,8 +192,8 @@ android:backgroundTint="?colorPrimary" android:text="@string/edit_repository" android:textColor="?colorSurface" /> - - + + diff --git a/src/main/res/layout/tabs_toolbar.xml b/src/main/res/layout/tabs_toolbar.xml index f2a4f571..99a9a1ca 100644 --- a/src/main/res/layout/tabs_toolbar.xml +++ b/src/main/res/layout/tabs_toolbar.xml @@ -6,7 +6,7 @@ - @@ -22,7 +22,7 @@ android:layout_width="match_parent" android:layout_height="0dp"> - - + - + \ No newline at end of file diff --git a/src/main/res/layout/title_text_item.xml b/src/main/res/layout/title_text_item.xml index 7ee73d67..2f338ec8 100644 --- a/src/main/res/layout/title_text_item.xml +++ b/src/main/res/layout/title_text_item.xml @@ -5,7 +5,7 @@ - - + \ No newline at end of file