parent
6cbb9586af
commit
f4394a7059
@ -0,0 +1,37 @@ |
||||
package io.legado.app.ui.rss.subscription |
||||
|
||||
import android.os.Bundle |
||||
import android.view.Menu |
||||
import android.view.MenuItem |
||||
import io.legado.app.R |
||||
import io.legado.app.base.BaseActivity |
||||
import io.legado.app.databinding.ActivitySourceSubBinding |
||||
|
||||
class SourceSubscription : BaseActivity<ActivitySourceSubBinding>() { |
||||
|
||||
override fun getViewBinding(): ActivitySourceSubBinding { |
||||
return ActivitySourceSubBinding.inflate(layoutInflater) |
||||
} |
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) { |
||||
|
||||
} |
||||
|
||||
override fun onCompatCreateOptionsMenu(menu: Menu): Boolean { |
||||
menuInflater.inflate(R.menu.source_subscription, menu) |
||||
return super.onCompatCreateOptionsMenu(menu) |
||||
} |
||||
|
||||
override fun onCompatOptionsItemSelected(item: MenuItem): Boolean { |
||||
when (item.itemId) { |
||||
R.id.menu_add -> editSubscription() |
||||
} |
||||
return super.onCompatOptionsItemSelected(item) |
||||
} |
||||
|
||||
private fun editSubscription() { |
||||
|
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,21 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:orientation="vertical"> |
||||
|
||||
<io.legado.app.ui.widget.TitleBar |
||||
android:id="@+id/title_bar" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
app:title="@string/source_subscription" /> |
||||
|
||||
<androidx.recyclerview.widget.RecyclerView |
||||
android:id="@+id/recycler_view" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> |
||||
|
||||
|
||||
</LinearLayout> |
@ -0,0 +1,11 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto"> |
||||
|
||||
<item |
||||
android:id="@+id/menu_add" |
||||
android:icon="@drawable/ic_add" |
||||
android:title="@string/add" |
||||
app:showAsAction="always" /> |
||||
|
||||
</menu> |
Loading…
Reference in new issue