..
This commit is contained in:
parent
ecb6122e7f
commit
f2311bd7f9
@ -1125,9 +1125,15 @@ fun openYouTube(schemeString : String) {
|
||||
}
|
||||
|
||||
fun openReddit(schemeString : String) {
|
||||
BLog.LOGE("schemeString >>>> ${schemeString}")
|
||||
var uri = schemeString.toUri()
|
||||
val gmmIntentUri = Uri.parse(schemeString)
|
||||
val mapIntent = Intent(Intent.ACTION_VIEW, gmmIntentUri)
|
||||
mapIntent.setPackage("com.reddit.frontpage")
|
||||
if (uri != null && uri.host?.contains("facebook") == true) {
|
||||
|
||||
} else {
|
||||
mapIntent.setPackage("com.reddit.frontpage")
|
||||
}
|
||||
lActivity?.startActivity(mapIntent)
|
||||
}
|
||||
|
||||
|
||||
@ -303,11 +303,13 @@ internal class LauncherHome : Fragment() {
|
||||
binding.currentMusic.visibility = View.VISIBLE
|
||||
binding.nextPlay.visibility = View.GONE
|
||||
binding.artist.text = it.artists
|
||||
binding.artist.isSelected = true
|
||||
binding.title.text = it.title
|
||||
var bitmap: Bitmap? = null
|
||||
binding.title.isSelected = true
|
||||
try {
|
||||
bitmap = BitmapConverter.StringToBitmap(it.albumArt)
|
||||
binding.albumArt.setImageBitmap(bitmap)
|
||||
BitmapConverter.StringToBitmap(it.albumArt)?.let {
|
||||
binding.albumArt.setImageBitmap(it)
|
||||
}
|
||||
} catch (exception: java.lang.Exception) {
|
||||
// log error
|
||||
}
|
||||
|
||||
@ -38,8 +38,10 @@ import bums.lunatic.launcher.openNews
|
||||
import bums.lunatic.launcher.openOpera
|
||||
import bums.lunatic.launcher.openReddit
|
||||
import bums.lunatic.launcher.openYouTube
|
||||
import bums.lunatic.launcher.utils.BLog
|
||||
import bums.lunatic.launcher.workers.WorkersDb
|
||||
import com.google.android.material.imageview.ShapeableImageView
|
||||
import com.google.gson.Gson
|
||||
import com.squareup.picasso.Picasso
|
||||
import io.realm.kotlin.UpdatePolicy
|
||||
import java.text.SimpleDateFormat
|
||||
@ -121,7 +123,9 @@ internal class RssItemAdapter (
|
||||
} else {
|
||||
holder.view.date.text = emptyDate
|
||||
}
|
||||
|
||||
if(RssDataType.FMKORAE.equals(rssData.category())) {
|
||||
BLog.LOGE("rssData >>>> ${Gson().toJson(rssData)}")
|
||||
}
|
||||
holder.view.title.text = "".plus(if(rssData.vote) " * " else "").plus(rssData.title().plus("[R:${rssData.read}]"))
|
||||
holder.view.desc.text = rssData.description()
|
||||
|
||||
|
||||
@ -30,10 +30,10 @@ class WeatherHourlyAdapter(private val dataSet: ArrayList<Hour>): RecyclerView.A
|
||||
.into(holder.viewItem.imgWeather)
|
||||
}
|
||||
// BLog.LOGE("reeeeeeeeeee >>> ${holder.viewItem.hour.text}")
|
||||
holder.viewItem.amOrPm.visibility =
|
||||
if (arrayListOf(12, 0).contains(WeatherInfoManager.toZonedDateTime(it.time_epoch).hour) || position == 0) {
|
||||
View.VISIBLE
|
||||
} else View.INVISIBLE
|
||||
// holder.viewItem.amOrPm.visibility =
|
||||
// if (arrayListOf(12, 0).contains(WeatherInfoManager.toZonedDateTime(it.time_epoch).hour) || position == 0) {
|
||||
// View.VISIBLE
|
||||
// } else View.INVISIBLE
|
||||
holder.viewItem.hour.apply {
|
||||
if (WeatherInfoManager.toZonedDateTime(it.time_epoch).hour == 0) {
|
||||
this@apply.setTextColor(Color.BLACK)
|
||||
|
||||
@ -19,6 +19,13 @@ object RssList {
|
||||
)
|
||||
val newsFeeds = arrayListOf(
|
||||
"https://news.google.com/rss?hl=ko&gl=KR&ceid=KR:ko",
|
||||
"https://imnews.imbc.com/rss/google_news/narrativeNews.rss",
|
||||
"http://www.hani.co.kr/rss",
|
||||
"http://biz.heraldcorp.com/common_prog/rssdisp.php?ct=010000000000.xml",
|
||||
"https://rss.inews24.com/rss/news_inews.xml",
|
||||
"https://rss.nocutnews.co.kr/category/it.xml",
|
||||
"https://rss.nocutnews.co.kr/news/news.xml",
|
||||
"https://rss.nocutnews.co.kr/news/top.xml",
|
||||
)
|
||||
|
||||
val feedJsons = arrayListOf(
|
||||
@ -43,21 +50,14 @@ object RssList {
|
||||
fun getFeedUrls() = keyWords.map { "https://news.google.com/rss/search?q=${URLEncoder.encode(it)}=ko&gl=KR&ceid=KR%3Ako/" }
|
||||
|
||||
val keyWords = listOf(
|
||||
"영화",
|
||||
"개발",
|
||||
"신작",
|
||||
"신보",
|
||||
"IT",
|
||||
"날씨",
|
||||
"테크",
|
||||
"래퍼",
|
||||
"부동산",
|
||||
"과학",
|
||||
"당뇨",
|
||||
"신장",
|
||||
"여행",
|
||||
"음반",
|
||||
"도끼",
|
||||
"힙합",
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ class FmKoreaGetter : BaseGetter {
|
||||
RssDataType.FMKORAE.isOn {
|
||||
val now = Date()
|
||||
try {
|
||||
val fmkoreaUrls = arrayListOf("https://www.fmkorea.com")
|
||||
val fmkoreaUrls = arrayListOf("https://www.fmkorea.com/best","https://www.fmkorea.com/best2")
|
||||
fmkoreaUrls.forEach {
|
||||
Jsoup.connect(it).userAgent(USAGT).get().let { fmkorea ->
|
||||
// BLog.LOGE("fmkorea >>> ${fmkorea.title()}")
|
||||
@ -50,7 +50,7 @@ class FmKoreaGetter : BaseGetter {
|
||||
"역사"
|
||||
) == true
|
||||
) {
|
||||
if (this.pubDate() > commicsDateTime) {
|
||||
if (this.pubDate() > commicsDateTime && tumb.length > 10) {
|
||||
temp.add(this.getRssData())
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<corners
|
||||
android:radius="15dp" />
|
||||
android:radius="@dimen/base_radius" />
|
||||
<solid
|
||||
android:color="?attr/scrimBackground" />
|
||||
<stroke
|
||||
@ -15,7 +15,7 @@
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<corners
|
||||
android:radius="15dp" />
|
||||
android:radius="@dimen/base_radius" />
|
||||
<solid
|
||||
android:color="@android:color/transparent" />
|
||||
<stroke
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="15dp"/>
|
||||
<corners android:radius="@dimen/base_radius"/>
|
||||
<solid android:color="#44000000"/>
|
||||
|
||||
<stroke android:width="1dp" android:color="#33FFFFFF"/>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:topLeftRadius="30dp" />
|
||||
<corners android:topLeftRadius="@dimen/base_radius" />
|
||||
|
||||
<solid android:color="#fff" />
|
||||
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
<item android:state_selected="true">
|
||||
<shape>
|
||||
<solid android:color="@android:color/white"/>
|
||||
<corners android:radius="10dp"/>
|
||||
<corners android:radius="@dimen/base_radius"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_selected="false">
|
||||
<shape>
|
||||
<solid android:color="@android:color/transparent"/>
|
||||
<corners android:radius="10dp"/>
|
||||
<corners android:radius="@dimen/base_radius"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@ -3,7 +3,7 @@
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<corners
|
||||
android:radius="15dp" />
|
||||
android:radius="@dimen/base_radius" />
|
||||
<solid
|
||||
android:color="@android:color/transparent" />
|
||||
<stroke
|
||||
@ -14,7 +14,7 @@
|
||||
<item android:state_pressed="false">
|
||||
<shape>
|
||||
<corners
|
||||
android:radius="15dp" />
|
||||
android:radius="@dimen/base_radius" />
|
||||
<solid
|
||||
android:color="?attr/scrimBackground" />
|
||||
</shape>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners
|
||||
android:topLeftRadius="24dp"
|
||||
android:topRightRadius="24dp" />
|
||||
android:topLeftRadius="@dimen/base_radius"
|
||||
android:topRightRadius="@dimen/base_radius" />
|
||||
</shape>
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="15dp"/>
|
||||
<corners android:radius="@dimen/base_radius"/>
|
||||
<solid android:color="#22CCCCCC"/>
|
||||
<stroke android:color="@color/sms_board" android:width="1dp"/>
|
||||
</shape>
|
||||
@ -7,15 +7,16 @@
|
||||
android:layout_width="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="90dp"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:padding="4dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
style="@style/normal"
|
||||
style="@style/small"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/amOrPm"
|
||||
android:gravity="center"
|
||||
@ -23,11 +24,12 @@
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_margin="@dimen/default_layout_margin"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/amOrPm"
|
||||
style="@style/normal"
|
||||
android:layout_width="50dp"
|
||||
style="@style/small"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/hour"
|
||||
android:background="@drawable/date_bg"
|
||||
@ -36,11 +38,13 @@
|
||||
android:textAlignment="center"/>
|
||||
<ImageView
|
||||
android:padding="8dp"
|
||||
android:layout_margin="@dimen/default_layout_margin"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/hour"
|
||||
android:id="@+id/imgWeather"
|
||||
android:layout_width="70dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/hour"
|
||||
app:layout_constraintBottom_toTopOf="@id/textDress"
|
||||
android:layout_width="60dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/level_dress_img"
|
||||
@ -48,7 +52,7 @@
|
||||
android:contentDescription="온도별 옷차림"
|
||||
app:tint="@android:color/white"/>
|
||||
<TextView
|
||||
app:layout_constraintBottom_toBottomOf="@id/imgWeather"
|
||||
app:layout_constraintBottom_toTopOf="@id/temperature"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:includeFontPadding="false"
|
||||
@ -60,7 +64,7 @@
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"/>
|
||||
<TextView
|
||||
app:layout_constraintTop_toBottomOf="@id/textDress"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
style="@style/normal"
|
||||
@ -70,7 +74,6 @@
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@{info.temp}"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
|
||||
android:gravity="center"
|
||||
android:textAlignment="center"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -7,8 +7,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/batteryProgress"
|
||||
android:layout_width="wrap_content"
|
||||
@ -23,7 +21,7 @@
|
||||
<bums.lunatic.launcher.view.DateTimeView
|
||||
android:layout_margin="@dimen/default_layout_margin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:background="@drawable/base_bg"
|
||||
android:text="this is init sentence"
|
||||
android:id="@+id/time"
|
||||
@ -39,7 +37,8 @@
|
||||
app:layout_constraintRight_toRightOf="@id/time"
|
||||
app:layout_constraintTop_toTopOf="@id/time"
|
||||
app:layout_constraintBottom_toBottomOf="@id/time"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_margin="@dimen/default_layout_margin"
|
||||
android:layout_height="40dp"/>
|
||||
|
||||
@ -60,18 +59,18 @@
|
||||
android:src="@drawable/kakaot"
|
||||
android:id="@+id/alchol_katalkT"/>
|
||||
|
||||
<!-- <com.google.android.material.textview.MaterialTextView-->
|
||||
<!-- android:id="@+id/weather"-->
|
||||
<!-- app:layout_goneMarginBottom="0dp"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:textIsSelectable="false"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/time"-->
|
||||
<!-- />-->
|
||||
<!-- <com.google.android.material.textview.MaterialTextView-->
|
||||
<!-- android:id="@+id/weather"-->
|
||||
<!-- app:layout_goneMarginBottom="0dp"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:textIsSelectable="false"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/time"-->
|
||||
<!-- />-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/current_music"
|
||||
@ -85,42 +84,56 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
app:shapeAppearanceOverlay="@style/roundedImageView"
|
||||
android:layout_height="60dp">
|
||||
<bums.lunatic.launcher.view.CircleImageView
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:id="@+id/album_art"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"/>
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"/>
|
||||
<TextView
|
||||
android:layout_margin="@dimen/default_layout_margin"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/album_art"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:gravity="right"
|
||||
app:layout_constraintRight_toLeftOf="@id/next_btn"
|
||||
android:gravity="left"
|
||||
style="@style/small"
|
||||
android:lines="1"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:layout_width="0dp"
|
||||
android:id="@+id/artist"
|
||||
android:layout_height="wrap_content"/>
|
||||
<TextView
|
||||
android:layout_margin="@dimen/default_layout_margin"
|
||||
app:layout_constraintTop_toBottomOf="@id/artist"
|
||||
android:id="@+id/title"
|
||||
android:gravity="center"
|
||||
android:textSize="16dp"
|
||||
android:gravity="left"
|
||||
style="@style/small"
|
||||
android:lines="1"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/album_art"
|
||||
app:layout_constraintLeft_toRightOf="@id/album_art"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/next_btn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_margin="@dimen/default_layout_margin"
|
||||
android:id="@+id/next_btn"
|
||||
android:src="@drawable/next_song"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_width="40dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -12,16 +12,18 @@
|
||||
<ImageView
|
||||
android:adjustViewBounds="true"
|
||||
android:padding="0dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:contentDescription="시계 아이콘"
|
||||
app:srcCompat="@drawable/ico_time"
|
||||
tools:ignore="ImageContrastCheck"
|
||||
android:layout_marginStart="@dimen/default_layout_margin"
|
||||
app:tint="@android:color/white"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintBottom_toBottomOf="@id/textView2"
|
||||
app:layout_constraintTop_toTopOf="@id/textView2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
@ -31,6 +33,7 @@
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="left|center_vertical"
|
||||
android:text="시간별 예보"
|
||||
style="@style/normal"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/_14sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/imageView"
|
||||
@ -47,6 +50,7 @@
|
||||
android:textColor="@android:color/white"
|
||||
android:gravity="center_vertical|right"
|
||||
android:textSize="@dimen/_12sp"
|
||||
style="@style/normal"
|
||||
android:layout_marginEnd="@dimen/default_layout_margin"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/imageView"
|
||||
|
||||
@ -34,5 +34,6 @@
|
||||
|
||||
<!-- appbar height -->
|
||||
<dimen name="appbar_height">329dp</dimen>
|
||||
<dimen name="base_radius">10dp</dimen>
|
||||
|
||||
</resources>
|
||||
Loading…
x
Reference in New Issue
Block a user