This commit is contained in:
lunaticbum 2024-08-27 20:01:05 +09:00
parent 467b0dc720
commit 69510bdbb9
5 changed files with 25 additions and 14 deletions

View File

@ -21,10 +21,14 @@ package rasel.lunar.launcher
import android.app.Application import android.app.Application
import android.content.ComponentCallbacks2 import android.content.ComponentCallbacks2
import android.database.sqlite.SQLiteDatabase import android.database.sqlite.SQLiteDatabase
import com.squareup.picasso.Picasso
internal class LunarLauncher : Application() { internal class LunarLauncher : Application() {
override fun onCreate() {
super.onCreate()
Picasso.get().setIndicatorsEnabled(true)
}
override fun onTrimMemory(level: Int) { override fun onTrimMemory(level: Int) {
super.onTrimMemory(level) super.onTrimMemory(level)
if (level >= ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) SQLiteDatabase.releaseMemory() if (level >= ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) SQLiteDatabase.releaseMemory()

View File

@ -251,6 +251,7 @@ internal class LauncherHome : Fragment() {
} }
} }
} }
WebView.setWebContentsDebuggingEnabled(false)
binding.searcher01.apply { binding.searcher01.apply {
this.addJavascriptInterface(MyJavaScriptInterface(this),"MyJavaScriptInterface") this.addJavascriptInterface(MyJavaScriptInterface(this),"MyJavaScriptInterface")
setBackgroundColor(Color.WHITE) // 백그라운드 색상 설정 setBackgroundColor(Color.WHITE) // 백그라운드 색상 설정
@ -505,7 +506,7 @@ internal class LauncherHome : Fragment() {
listItem.add(RssItem(model = model, title = title, pageLink = pageLink, image = imgg, tags = tags, date = simpldateFormat.parse(date).time)) listItem.add(RssItem(model = model, title = title, pageLink = pageLink, image = imgg, tags = tags, date = simpldateFormat.parse(date).time))
}.apply { }.apply {
BLog.LOGE("listItem.size >>> ${listItem.size}") BLog.LOGE("listItem.size >>> ${listItem.size}")
if (prevUrl!=null && prevUrl.length > TEST_PAG.length && prevUrl.contains("/page/") && listItem.size < (24 * 5) ) { if (prevUrl!=null && prevUrl.length > TEST_PAG.length && prevUrl.contains("/page/") && listItem.size < (24 * 2) ) {
BLog.LOGE("listItem.size >>> ${listItem.size} do next ") BLog.LOGE("listItem.size >>> ${listItem.size} do next ")
webView.postDelayed({webView.loadUrl(prevUrl)}, 5000L) webView.postDelayed({webView.loadUrl(prevUrl)}, 5000L)
} else { } else {

View File

@ -19,12 +19,15 @@
package rasel.lunar.launcher.todos package rasel.lunar.launcher.todos
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import androidx.core.content.ContextCompat.startActivity import androidx.core.content.ContextCompat.startActivity
import androidx.core.net.toUri
import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.google.gson.Gson import com.google.gson.Gson
@ -57,10 +60,15 @@ internal class RssItemAdapter (
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: RssTag, position: Int) { override fun onBindViewHolder(holder: RssTag, position: Int) {
val todo = smsList[position] val todo = smsList[position]
BLog.LOGE("position >>>> ${position}")
holder.view.itemText.text = "\u25CF ${Gson().toJson(todo)}" holder.view.itemText.text = "\u25CF ${Gson().toJson(todo)}"
Picasso.get().load(todo.pageLink).into(holder.view.circlePreview)
Picasso.get().load(todo.image.toUri()).into(holder.view.circlePreview)
BLog.LOGE("holder.view.itemText.text >>> ${holder.view.itemText.text}")
holder.view.itemText.setOnLongClickListener { holder.view.itemText.setOnLongClickListener {
val clipBoard =
lActivity!!.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
clipBoard.setPrimaryClip(ClipData.newPlainText("", todo.image))
true true
} }

View File

@ -58,6 +58,7 @@ internal class RssTagAdapter(
val todo = smsList[position] val todo = smsList[position]
holder.view.itemText.text = "\u25CF ${Gson().toJson(todo)}" holder.view.itemText.text = "\u25CF ${Gson().toJson(todo)}"
BLog.LOGE("holder.view.itemText.text >>> ${holder.view.itemText.text}")
/* multiline texts are enabled for TodoManager */ /* multiline texts are enabled for TodoManager */
// holder.view.itemText.isSingleLine = false // holder.view.itemText.isSingleLine = false
/* launch edit or update dialog on item click */ /* launch edit or update dialog on item click */

View File

@ -1,28 +1,25 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<!--rasel.lunar.launcher.view.CircleImageView-->
<rasel.lunar.launcher.view.CircleImageView <ImageView
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:id="@+id/circle_preview" android:id="@+id/circle_preview"
style="@style/SearchMenuItem" android:layout_width="40dp"
android:adjustViewBounds="true" android:layout_height="40dp"/>
android:scaleType="fitCenter"
android:layout_width="0dp"
android:layout_height="20dp"/>
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/itemText" android:id="@+id/itemText"
android:layout_width="@dimen/zero" android:layout_width="@dimen/zero"
android:layout_height="40dp" android:layout_height="40dp"
android:padding="@dimen/twelve" android:padding="@dimen/twelve"
android:singleLine="false" android:lines="3"
android:lines="0"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"