mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-19 21:53:56 +00:00
novel icon
This commit is contained in:
@@ -51,6 +51,7 @@ class OfflineMangaAdapter(
|
||||
val itemScoreBG = view.findViewById<View>(R.id.itemCompactScoreBG)
|
||||
val ongoing = view.findViewById<CardView>(R.id.itemCompactOngoing)
|
||||
val totalchapter = view.findViewById<TextView>(R.id.itemCompactTotal)
|
||||
val typeimage = view.findViewById<ImageView>(R.id.itemCompactTypeImage)
|
||||
val type = view.findViewById<TextView>(R.id.itemCompactRelation)
|
||||
val typeView = view.findViewById<LinearLayout>(R.id.itemCompactType)
|
||||
|
||||
@@ -69,6 +70,7 @@ class OfflineMangaAdapter(
|
||||
}
|
||||
|
||||
// Bind item data to the views
|
||||
typeimage.setImageResource(if (item.type == "Novel" ) R.drawable.ic_round_book_24 else R.drawable.ic_round_import_contacts_24)
|
||||
type.text = item.type
|
||||
typeView.visibility = View.VISIBLE
|
||||
imageView.setImageURI(item.image)
|
||||
|
||||
@@ -68,6 +68,7 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||
private lateinit var uiSettings: UserInterfaceSettings
|
||||
var selected = 0
|
||||
var anime = true
|
||||
var novel = false
|
||||
private var adult = false
|
||||
|
||||
@SuppressLint("SetTextI18n", "ClickableViewAccessibility")
|
||||
@@ -305,7 +306,6 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||
}
|
||||
|
||||
adult = media.isAdult
|
||||
|
||||
tabLayout.menu.clear()
|
||||
if (media.anime != null) {
|
||||
viewPager.adapter =
|
||||
@@ -317,7 +317,13 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||
lifecycle,
|
||||
if (media.format == "NOVEL") SupportedMedia.NOVEL else SupportedMedia.MANGA
|
||||
)
|
||||
tabLayout.inflateMenu(R.menu.manga_menu_detail)
|
||||
if (media.format == "NOVEL") {
|
||||
novel = true
|
||||
tabLayout.inflateMenu(R.menu.novel_menu_detail)
|
||||
}
|
||||
else {
|
||||
tabLayout.inflateMenu(R.menu.manga_menu_detail)
|
||||
}
|
||||
anime = false
|
||||
}
|
||||
|
||||
|
||||
10
app/src/main/res/drawable/ic_round_book_24.xml
Normal file
10
app/src/main/res/drawable/ic_round_book_24.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M18,2H6C4.895,2 4,2.895 4,4v16c0,1.105 0.895,2 2,2h12c1.105,0 2,-0.895 2,-2V4C20,2.895 19.105,2 18,2zM11,12l-2.5,-1.5L6,12V5c0,-0.552 0.448,-1 1,-1h3c0.552,0 1,0.448 1,1V12z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
||||
15
app/src/main/res/menu/novel_menu_detail.xml
Normal file
15
app/src/main/res/menu/novel_menu_detail.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/info"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_round_info_24"
|
||||
android:title="@string/info" />
|
||||
|
||||
<item
|
||||
android:id="@+id/read"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_round_book_24"
|
||||
android:title="@string/read" />
|
||||
|
||||
</menu>
|
||||
Reference in New Issue
Block a user