This commit is contained in:
lunaticbum 2024-09-05 18:27:39 +09:00
parent 034fb90e3d
commit 278bd3333c
5 changed files with 35 additions and 10 deletions

View File

@ -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.SEPARATOR
import rasel.lunar.launcher.helpers.Constants.Companion.requestCreateWidget import rasel.lunar.launcher.helpers.Constants.Companion.requestCreateWidget
import rasel.lunar.launcher.helpers.Constants.Companion.requestPickWidget 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.listItem
import rasel.lunar.launcher.home.LauncherHome.Companion.listTags import rasel.lunar.launcher.home.LauncherHome.Companion.listTags
import rasel.lunar.launcher.model.RssTagItem import rasel.lunar.launcher.model.RssTagItem
@ -165,6 +166,12 @@ internal class Feeds : Fragment() {
"comic"->{ "comic"->{
refreshComics() refreshComics()
} }
"taxi"-> {
home?.showAl()
}
"tax"-> {
home?.hideAl()
}
"jshow" -> { "jshow" -> {
binding.feedsRss.apply { binding.feedsRss.apply {
rss.adapter = mRssAdapter rss.adapter = mRssAdapter

View File

@ -38,6 +38,7 @@ import androidx.core.content.ContextCompat.RECEIVER_EXPORTED
import androidx.core.content.ContextCompat.registerReceiver import androidx.core.content.ContextCompat.registerReceiver
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
import androidx.lifecycle.LiveData
import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
@ -97,6 +98,7 @@ import java.text.SimpleDateFormat
import java.util.Calendar import java.util.Calendar
import java.util.Date import java.util.Date
import java.util.Locale import java.util.Locale
import kotlin.properties.Delegates
internal class LauncherHome : Fragment() { internal class LauncherHome : Fragment() {
@ -106,7 +108,9 @@ internal class LauncherHome : Fragment() {
private lateinit var settingsPrefs: SharedPreferences private lateinit var settingsPrefs: SharedPreferences
private lateinit var batteryReceiver: BatteryReceiver private lateinit var batteryReceiver: BatteryReceiver
private var shouldResume = true private var shouldResume = true
companion object { companion object {
var home : LauncherHome? = null
var lastedFinishedPageUrl : String = "" var lastedFinishedPageUrl : String = ""
var recentCalls = hashMapOf<String, RecentCall>() var recentCalls = hashMapOf<String, RecentCall>()
var callList = arrayListOf<RecentCall>() var callList = arrayListOf<RecentCall>()
@ -156,7 +160,7 @@ internal class LauncherHome : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
home = this
binding = LauncherHomeBinding.inflate(inflater, container, false) binding = LauncherHomeBinding.inflate(inflater, container, false)
fragManager = lActivity!!.supportFragmentManager fragManager = lActivity!!.supportFragmentManager
settingsPrefs = requireContext().getSharedPreferences(PREFS_SETTINGS, 0) settingsPrefs = requireContext().getSharedPreferences(PREFS_SETTINGS, 0)

View File

@ -117,6 +117,7 @@ class CircleImageView : androidx.appcompat.widget.AppCompatImageView {
mLabelPaint.color = Color.WHITE mLabelPaint.color = Color.WHITE
mLabelPaint.isFakeBoldText = true mLabelPaint.isFakeBoldText = true
mLabelPaint.textAlign = Paint.Align.CENTER mLabelPaint.textAlign = Paint.Align.CENTER
mLabelPaint.textSize = height * 0.2f
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
outlineProvider = OutlineProvider() outlineProvider = OutlineProvider()
} }

View File

@ -7,14 +7,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<rasel.lunar.launcher.view.CircleImageView
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
style="@style/SearchIcons"
app:civ_label="카카오 택시"
android:layout_height="60dp"
android:src="@drawable/kakaot"
android:id="@+id/alchol_katalkT"/>
<TextView <TextView
android:id="@+id/batteryProgress" android:id="@+id/batteryProgress"
@ -41,7 +34,26 @@
app:layout_constraintTop_toBottomOf="@+id/batteryProgress" app:layout_constraintTop_toBottomOf="@+id/batteryProgress"
android:textSize="16sp" android:textSize="16sp"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
<rasel.lunar.launcher.view.CircleImageView
app:layout_constraintLeft_toLeftOf="@id/time"
app:layout_constraintTop_toTopOf="@id/time"
app:layout_constraintBottom_toBottomOf="@id/time"
android:layout_marginTop="2.5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginBottom="2.5dp"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:background="@null"
android:layout_width="wrap_content"
app:civ_border_width="1dp"
app:civ_border_color="#000000"
app:civ_label="택시"
android:layout_margin="5dp"
android:visibility="visible"
android:layout_height="0dp"
android:src="@drawable/kakaot"
android:id="@+id/alchol_katalkT"/>
<!-- <TextClock--> <!-- <TextClock-->
<!-- android:id="@+id/time"--> <!-- android:id="@+id/time"-->
<!-- android:layout_width="wrap_content"--> <!-- android:layout_width="wrap_content"-->

View File

@ -6,5 +6,6 @@
<attr name="civ_border_overlay" format="boolean" /> <attr name="civ_border_overlay" format="boolean" />
<attr name="civ_circle_background_color" format="color" /> <attr name="civ_circle_background_color" format="color" />
<attr name="civ_label" format="string" /> <attr name="civ_label" format="string" />
<attr name="civ_ts" format="dimension" />
</declare-styleable> </declare-styleable>
</resources> </resources>