////
This commit is contained in:
parent
467b0dc720
commit
69510bdbb9
@ -21,10 +21,14 @@ package rasel.lunar.launcher
|
||||
import android.app.Application
|
||||
import android.content.ComponentCallbacks2
|
||||
import android.database.sqlite.SQLiteDatabase
|
||||
import com.squareup.picasso.Picasso
|
||||
|
||||
|
||||
internal class LunarLauncher : Application() {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
Picasso.get().setIndicatorsEnabled(true)
|
||||
}
|
||||
override fun onTrimMemory(level: Int) {
|
||||
super.onTrimMemory(level)
|
||||
if (level >= ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) SQLiteDatabase.releaseMemory()
|
||||
|
||||
@ -251,6 +251,7 @@ internal class LauncherHome : Fragment() {
|
||||
}
|
||||
}
|
||||
}
|
||||
WebView.setWebContentsDebuggingEnabled(false)
|
||||
binding.searcher01.apply {
|
||||
this.addJavascriptInterface(MyJavaScriptInterface(this),"MyJavaScriptInterface")
|
||||
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))
|
||||
}.apply {
|
||||
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 ")
|
||||
webView.postDelayed({webView.loadUrl(prevUrl)}, 5000L)
|
||||
} else {
|
||||
|
||||
@ -19,12 +19,15 @@
|
||||
package rasel.lunar.launcher.todos
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.ContextCompat.startActivity
|
||||
import androidx.core.net.toUri
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.gson.Gson
|
||||
@ -57,10 +60,15 @@ internal class RssItemAdapter (
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBindViewHolder(holder: RssTag, position: Int) {
|
||||
val todo = smsList[position]
|
||||
BLog.LOGE("position >>>> ${position}")
|
||||
|
||||
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 {
|
||||
val clipBoard =
|
||||
lActivity!!.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||
clipBoard.setPrimaryClip(ClipData.newPlainText("", todo.image))
|
||||
true
|
||||
}
|
||||
|
||||
|
||||
@ -58,6 +58,7 @@ internal class RssTagAdapter(
|
||||
val todo = smsList[position]
|
||||
|
||||
holder.view.itemText.text = "\u25CF ${Gson().toJson(todo)}"
|
||||
BLog.LOGE("holder.view.itemText.text >>> ${holder.view.itemText.text}")
|
||||
/* multiline texts are enabled for TodoManager */
|
||||
// holder.view.itemText.isSingleLine = false
|
||||
/* launch edit or update dialog on item click */
|
||||
|
||||
@ -1,28 +1,25 @@
|
||||
<?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_height="wrap_content"
|
||||
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_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:id="@+id/circle_preview"
|
||||
style="@style/SearchMenuItem"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="20dp"/>
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"/>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/itemText"
|
||||
android:layout_width="@dimen/zero"
|
||||
android:layout_height="40dp"
|
||||
android:padding="@dimen/twelve"
|
||||
android:singleLine="false"
|
||||
android:lines="0"
|
||||
android:lines="3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user