This commit is contained in:
lunaticbum 2024-09-05 18:38:52 +09:00
parent 278bd3333c
commit 8c87f33ef2
5 changed files with 29 additions and 3 deletions

View File

@ -79,6 +79,7 @@
android:name=".settings.SettingsActivity"
android:label="@string/lunar_settings"
android:launchMode="singleTask"
android:excludeFromRecents="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />

View File

@ -25,6 +25,7 @@ import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.content.SharedPreferences
import android.net.Uri
import android.os.Bundle
import android.os.Handler
import android.os.Looper
@ -94,6 +95,7 @@ import rasel.lunar.launcher.workers.DCGetter
import rasel.lunar.launcher.workers.RecentCall
import rasel.lunar.launcher.workers.RecentSms
import rasel.lunar.launcher.workers.WorkersDb
import java.net.URLEncoder
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Date
@ -392,10 +394,24 @@ internal class LauncherHome : Fragment() {
fun showAl() {
binding.alcholKatalkT.visibility = View.VISIBLE
}
binding.alcholKatalkT.setOnClickListener {
openSearchApps("kakaot://taxi?dest_lat=${URLEncoder.encode("37.467696")}&dest_lng=${URLEncoder.encode("127.101063")}","com.kakao.taxi")
}
}
fun openSearchApps(schemeString : String, pakage : String? = null) {
val gmmIntentUri = Uri.parse(schemeString)
val mapIntent = Intent(Intent.ACTION_VIEW, gmmIntentUri)
pakage?.let {
mapIntent.setPackage(pakage)
}
startActivity(mapIntent)
}
fun hideAl() {
binding.alcholKatalkT.visibility = View.GONE
binding.alcholKatalkT.setOnClickListener {
}
}
fun chooseAdpater () {

View File

@ -32,6 +32,7 @@ import rasel.lunar.launcher.LauncherActivity.Companion.lActivity
import rasel.lunar.launcher.databinding.ListItemWithBinding
import rasel.lunar.launcher.model.NotificationItem
import rasel.lunar.launcher.utils.BLog
import rasel.lunar.launcher.workers.WorkersDb
import java.text.SimpleDateFormat
import java.util.Date
@ -59,6 +60,13 @@ internal class NotificationItemAdapter (
holder.view.title.text = todo.tikerMsg
holder.view.desc.text = todo.pkgName
holder.view.date.text = dateFormat.format(Date(todo.postTime))
holder.view.circlePreview.setOnLongClickListener {
WorkersDb.getRealm().writeBlocking {
delete(query<NotificationItem>(NotificationItem::class).query("pkgName == $0",todo.pkgName).find())
}
true
}
} catch (e: PackageManager.NameNotFoundException) {
return
}

View File

@ -18,7 +18,7 @@
android:layout_width="@dimen/zero"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/rss_feed"
android:text="TxtCommand"
style="@style/asdda"
/>
<com.google.android.material.button.MaterialButton

View File

@ -49,8 +49,9 @@
app:civ_border_width="1dp"
app:civ_border_color="#000000"
app:civ_label="택시"
android:layout_margin="5dp"
android:visibility="visible"
android:visibility="gone"
android:layout_height="0dp"
android:src="@drawable/kakaot"
android:id="@+id/alchol_katalkT"/>