diff --git a/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt b/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt index 0dddd4426..13ac93c20 100644 --- a/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt @@ -1,22 +1,15 @@ package io.legado.app.ui.main.rss import android.os.Bundle -import android.util.Log -import android.view.Gravity import android.view.Menu import android.view.MenuItem import android.view.View -import android.widget.EditText -import android.widget.LinearLayout import androidx.lifecycle.Observer import androidx.recyclerview.widget.GridLayoutManager import io.legado.app.App import io.legado.app.R import io.legado.app.base.BaseFragment import io.legado.app.data.entities.RssSource -import io.legado.app.lib.dialogs.alert -import io.legado.app.lib.dialogs.cancelButton -import io.legado.app.lib.dialogs.yesButton import io.legado.app.lib.theme.ATH import io.legado.app.ui.rss.article.RssArticlesActivity import io.legado.app.ui.rss.source.manage.RssSourceActivity @@ -43,24 +36,7 @@ class RssFragment : BaseFragment(R.layout.fragment_rss), super.onCompatOptionsItemSelected(item) when (item.itemId) { R.id.menu_rss_config -> startActivity() - R.id.menu_rss_add -> { - alert { - title = "快速添加并预览" - val layout = LinearLayout(activity) - val urlEdit = EditText(activity) - urlEdit.hint = "输入RSS地址" - urlEdit.width = 800 - layout.gravity = Gravity.CENTER - layout.addView(urlEdit) - customView = layout - cancelButton{ - Log.i("RSS","Quick Add URL cancel") - } - yesButton{ - Log.i("RSS","Quick Add URL: ${urlEdit.text}") - startActivity("url" to urlEdit.text.toString().trim()) - } - }.show() + R.id.menu_rss_star -> { } } } diff --git a/app/src/main/res/drawable/ic_star.xml b/app/src/main/res/drawable/ic_star.xml new file mode 100644 index 000000000..a2ebf3532 --- /dev/null +++ b/app/src/main/res/drawable/ic_star.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/menu/main_rss.xml b/app/src/main/res/menu/main_rss.xml index f1e39cae2..4403621bd 100644 --- a/app/src/main/res/menu/main_rss.xml +++ b/app/src/main/res/menu/main_rss.xml @@ -1,16 +1,19 @@ - + + app:showAsAction="always" + tools:ignore="AlwaysShowAction" /> \ No newline at end of file diff --git a/app/src/main/res/menu/rss_source.xml b/app/src/main/res/menu/rss_source.xml index c64fea473..f46fd512c 100644 --- a/app/src/main/res/menu/rss_source.xml +++ b/app/src/main/res/menu/rss_source.xml @@ -54,34 +54,6 @@ android:id="@+id/menu_group_manage" android:title="@string/group_manage" /> - - - - - - - - - - - - - - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0d4bd3286..21f6e3e19 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -34,6 +34,7 @@ 启用 替换净化-搜索 书架 + 收藏 订阅 全部 最近阅读