diff --git a/app/src/main/kotlin/rasel/lunar/launcher/feeds/Feeds.kt b/app/src/main/kotlin/rasel/lunar/launcher/feeds/Feeds.kt index a9664944..418828d1 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/feeds/Feeds.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/feeds/Feeds.kt @@ -54,6 +54,7 @@ import rasel.lunar.launcher.helpers.Constants.Companion.PREFS_WIDGETS import rasel.lunar.launcher.helpers.Constants.Companion.SEPARATOR import rasel.lunar.launcher.helpers.Constants.Companion.requestCreateWidget import rasel.lunar.launcher.helpers.Constants.Companion.requestPickWidget +import rasel.lunar.launcher.home.LauncherHome.Companion.home import rasel.lunar.launcher.home.LauncherHome.Companion.listItem import rasel.lunar.launcher.home.LauncherHome.Companion.listTags import rasel.lunar.launcher.model.RssTagItem @@ -165,6 +166,12 @@ internal class Feeds : Fragment() { "comic"->{ refreshComics() } + "taxi"-> { + home?.showAl() + } + "tax"-> { + home?.hideAl() + } "jshow" -> { binding.feedsRss.apply { rss.adapter = mRssAdapter diff --git a/app/src/main/kotlin/rasel/lunar/launcher/home/LauncherHome.kt b/app/src/main/kotlin/rasel/lunar/launcher/home/LauncherHome.kt index 47274b26..3d8861bb 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/home/LauncherHome.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/home/LauncherHome.kt @@ -38,6 +38,7 @@ import androidx.core.content.ContextCompat.RECEIVER_EXPORTED import androidx.core.content.ContextCompat.registerReceiver import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager +import androidx.lifecycle.LiveData import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.LinearLayoutManager @@ -97,6 +98,7 @@ import java.text.SimpleDateFormat import java.util.Calendar import java.util.Date import java.util.Locale +import kotlin.properties.Delegates internal class LauncherHome : Fragment() { @@ -106,7 +108,9 @@ internal class LauncherHome : Fragment() { private lateinit var settingsPrefs: SharedPreferences private lateinit var batteryReceiver: BatteryReceiver private var shouldResume = true + companion object { + var home : LauncherHome? = null var lastedFinishedPageUrl : String = "" var recentCalls = hashMapOf() var callList = arrayListOf() @@ -156,7 +160,7 @@ internal class LauncherHome : Fragment() { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { - + home = this binding = LauncherHomeBinding.inflate(inflater, container, false) fragManager = lActivity!!.supportFragmentManager settingsPrefs = requireContext().getSharedPreferences(PREFS_SETTINGS, 0) diff --git a/app/src/main/kotlin/rasel/lunar/launcher/view/CircleImageView.kt b/app/src/main/kotlin/rasel/lunar/launcher/view/CircleImageView.kt index 27fb7ec0..9156f796 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/view/CircleImageView.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/view/CircleImageView.kt @@ -117,6 +117,7 @@ class CircleImageView : androidx.appcompat.widget.AppCompatImageView { mLabelPaint.color = Color.WHITE mLabelPaint.isFakeBoldText = true mLabelPaint.textAlign = Paint.Align.CENTER + mLabelPaint.textSize = height * 0.2f if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { outlineProvider = OutlineProvider() } diff --git a/app/src/main/res/layout/launcher_home.xml b/app/src/main/res/layout/launcher_home.xml index 388c8a46..5327dedd 100644 --- a/app/src/main/res/layout/launcher_home.xml +++ b/app/src/main/res/layout/launcher_home.xml @@ -7,14 +7,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + - + diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 84d292d5..040fc626 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -6,5 +6,6 @@ + \ No newline at end of file