fix: comment bar not visible (solution is so cursed)

This commit is contained in:
rebelonion 2024-03-15 20:57:36 -05:00
parent cf93f6d657
commit 34a9a55d4f
13 changed files with 363 additions and 294 deletions

View file

@ -490,6 +490,7 @@ fun ImageView.loadImage(url: String?, size: Int = 0) {
}
fun ImageView.loadImage(file: FileUrl?, size: Int = 0) {
file?.url = PrefManager.getVal<String>(PrefName.ImageUrl).ifEmpty { file?.url ?: "" }
if (file?.url?.isNotEmpty() == true) {
tryWith {
val glideUrl = GlideUrl(file.url) { file.headers }
@ -1124,12 +1125,14 @@ fun blurImage(imageView: ImageView, banner: String?){
val sampling = PrefManager.getVal<Float>(PrefName.BlurSampling).toInt()
if (PrefManager.getVal(PrefName.BlurBanners)){
val context = imageView.context
if (!(context as Activity).isDestroyed)
if (!(context as Activity).isDestroyed) {
val url = PrefManager.getVal<String>(PrefName.ImageUrl).ifEmpty { banner }
Glide.with(context as Context)
.load(GlideUrl(banner))
.load(GlideUrl(url))
.diskCacheStrategy(DiskCacheStrategy.ALL).override(400)
.apply(RequestOptions.bitmapTransform(BlurTransformation(radius, sampling)))
.into(imageView)
}
}else{
imageView.loadImage(banner)
}
@ -1138,13 +1141,6 @@ fun blurImage(imageView: ImageView, banner: String?){
}
}
fun logToFile(context: Context, message: String) {
val externalFilesDir = context.getExternalFilesDir(null)
val file = File(externalFilesDir, "notifications.log")
file.appendText(message)
file.appendText("\n")
}
/**
* Builds the markwon instance with all the plugins
* @return the markwon instance

View file

@ -136,7 +136,7 @@ suspend fun <T> tryWithSuspend(
* A url, which can also have headers
* **/
data class FileUrl(
val url: String,
var url: String,
val headers: Map<String, String> = mapOf()
) : Serializable {
companion object {

View file

@ -370,6 +370,7 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
binding.mediaTitle.translationX = -screenWidth
tabLayout.selectionListener = { selected, newId ->
binding.commentInputLayout.visibility = if (selected == 2) View.VISIBLE else View.GONE
this.selected = selected
selectFromID(newId)
viewPager.setCurrentItem(selected, false)

View file

@ -28,6 +28,7 @@ import ani.dantotsu.connections.comments.CommentResponse
import ani.dantotsu.connections.comments.CommentsAPI
import ani.dantotsu.databinding.FragmentCommentsBinding
import ani.dantotsu.loadImage
import ani.dantotsu.media.MediaDetailsActivity
import ani.dantotsu.settings.saving.PrefManager
import ani.dantotsu.settings.saving.PrefName
import ani.dantotsu.snackString
@ -45,7 +46,7 @@ import java.util.TimeZone
@SuppressLint("ClickableViewAccessibility")
class CommentsFragment : Fragment() {
lateinit var binding: FragmentCommentsBinding
lateinit var activity: AppCompatActivity
lateinit var activity: MediaDetailsActivity
private var interactionState = InteractionState.NONE
private var commentWithInteraction: CommentItem? = null
private val section = Section()
@ -69,7 +70,7 @@ class CommentsFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
activity = requireActivity() as AppCompatActivity
activity = requireActivity() as MediaDetailsActivity
//get the media id from the intent
val mediaId = arguments?.getInt("mediaId") ?: -1
mediaName = arguments?.getString("mediaName") ?: "unknown"
@ -82,9 +83,9 @@ class CommentsFragment : Fragment() {
val markwon = buildMarkwon(activity)
binding.commentUserAvatar.loadImage(Anilist.avatar)
activity.binding.commentUserAvatar.loadImage(Anilist.avatar)
val markwonEditor = MarkwonEditor.create(markwon)
binding.commentInput.addTextChangedListener(
activity.binding.commentInput.addTextChangedListener(
MarkwonEditorTextWatcher.withProcess(
markwonEditor
)
@ -95,7 +96,7 @@ class CommentsFragment : Fragment() {
loadAndDisplayComments()
binding.commentsRefresh.isRefreshing = false
}
binding.commentReplyToContainer.visibility = View.GONE
activity.binding.commentReplyToContainer.visibility = View.GONE
}
binding.commentsList.adapter = adapter
@ -110,7 +111,7 @@ class CommentsFragment : Fragment() {
}
}
binding.commentSort.setOnClickListener { view ->
binding.commentSort.setOnClickListener { sortView ->
fun sortComments(sortOrder: String) {
val groups = section.groups
when (sortOrder) {
@ -122,7 +123,7 @@ class CommentsFragment : Fragment() {
section.update(groups)
}
val popup = PopupMenu(activity, view)
val popup = PopupMenu(activity, sortView)
popup.setOnMenuItemClickListener { item ->
val sortOrder = when (item.itemId) {
R.id.comment_sort_newest -> "newest"
@ -179,7 +180,7 @@ class CommentsFragment : Fragment() {
if (!binding.commentsList.canScrollVertically(1) && !isFetching &&
(binding.commentsList.layoutManager as LinearLayoutManager).findLastVisibleItemPosition() == (binding.commentsList.adapter!!.itemCount - 1)
) {
if (pagesLoaded < totalPages) {
if (pagesLoaded < totalPages && totalPages > 1) {
binding.commentBottomRefresh.visibility = View.VISIBLE
loadMoreComments()
lifecycleScope.launch {
@ -232,62 +233,7 @@ class CommentsFragment : Fragment() {
}
})
//if we have scrolled to the bottom of the list, load more comments
/*binding.commentsList.addOnScrollListener(object :
androidx.recyclerview.widget.RecyclerView.OnScrollListener() {
override fun onScrolled(
recyclerView: androidx.recyclerview.widget.RecyclerView,
dx: Int,
dy: Int
) {
super.onScrolled(recyclerView, dx, dy)
if (shouldLoadMoreComments(recyclerView)) {
loadMoreComments()
}
}
private fun shouldLoadMoreComments(recyclerView: androidx.recyclerview.widget.RecyclerView): Boolean {
return !recyclerView.canScrollVertically(1) && pagesLoaded < totalPages && !isFetching
}
private fun loadMoreComments() {
isFetching = true
lifecycleScope.launch {
val comments = fetchComments()
comments?.comments?.forEach { comment ->
updateUIWithComment(comment)
}
totalPages = comments?.totalPages ?: 1
pagesLoaded++
isFetching = false
}
}
private suspend fun fetchComments(): CommentResponse? {
return withContext(Dispatchers.IO) {
CommentsAPI.getCommentsForId(mediaId, pagesLoaded + 1, filterTag)
}
}
//adds additional comments to the section
private suspend fun updateUIWithComment(comment: CommentNotificationWorker) {
withContext(Dispatchers.Main) {
section.add(
CommentItem(
comment,
buildMarkwon(activity),
section,
this@CommentsFragment,
backgroundColor,
0
)
)
}
}
})*/
binding.commentInput.addTextChangedListener(object : TextWatcher {
activity.binding.commentInput.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
@ -295,38 +241,38 @@ class CommentsFragment : Fragment() {
}
override fun afterTextChanged(s: android.text.Editable?) {
if (binding.commentInput.text.length > 300) {
binding.commentInput.text.delete(300, binding.commentInput.text.length)
if ((activity.binding.commentInput.text.length) > 300) {
activity.binding.commentInput.text.delete(300, activity.binding.commentInput.text.length)
snackString("CommentNotificationWorker cannot be longer than 300 characters")
}
}
})
binding.commentInput.setOnFocusChangeListener { _, hasFocus ->
activity.binding.commentInput.setOnFocusChangeListener { _, hasFocus ->
if (hasFocus) {
val targetWidth = binding.commentInputLayout.width -
binding.commentLabel.width -
binding.commentSend.width -
binding.commentUserAvatar.width - 12 + 16
val anim = ValueAnimator.ofInt(binding.commentInput.width, targetWidth)
val targetWidth = activity.binding.commentInputLayout.width -
activity.binding.commentLabel.width -
activity.binding.commentSend.width -
activity.binding.commentUserAvatar.width - 12 + 16
val anim = ValueAnimator.ofInt(activity.binding.commentInput.width, targetWidth)
anim.addUpdateListener { valueAnimator ->
val layoutParams = binding.commentInput.layoutParams
val layoutParams = activity.binding.commentInput.layoutParams
layoutParams.width = valueAnimator.animatedValue as Int
binding.commentInput.layoutParams = layoutParams
activity.binding.commentInput.layoutParams = layoutParams
}
anim.duration = 300
anim.start()
anim.doOnEnd {
binding.commentLabel.visibility = View.VISIBLE
binding.commentSend.visibility = View.VISIBLE
binding.commentLabel.animate().translationX(0f).setDuration(300).start()
binding.commentSend.animate().translationX(0f).setDuration(300).start()
activity.binding.commentLabel.visibility = View.VISIBLE
activity.binding.commentSend.visibility = View.VISIBLE
activity.binding.commentLabel.animate().translationX(0f).setDuration(300).start()
activity.binding.commentSend.animate().translationX(0f).setDuration(300).start()
}
}
binding.commentLabel.setOnClickListener {
activity.binding.commentLabel.setOnClickListener {
//alert dialog to enter a number, with a cancel and ok button
val alertDialog = android.app.AlertDialog.Builder(activity, R.style.MyPopup)
.setTitle("Enter a chapter/episode number tag")
@ -337,13 +283,13 @@ class CommentsFragment : Fragment() {
val text = editText?.text.toString()
tag = text.toIntOrNull()
if (tag == null) {
binding.commentLabel.background = ResourcesCompat.getDrawable(
activity.binding.commentLabel.background = ResourcesCompat.getDrawable(
resources,
R.drawable.ic_label_off_24,
null
)
} else {
binding.commentLabel.background = ResourcesCompat.getDrawable(
activity.binding.commentLabel.background = ResourcesCompat.getDrawable(
resources,
R.drawable.ic_label_24,
null
@ -353,7 +299,7 @@ class CommentsFragment : Fragment() {
}
.setNeutralButton("Clear") { dialog, _ ->
tag = null
binding.commentLabel.background = ResourcesCompat.getDrawable(
activity.binding.commentLabel.background = ResourcesCompat.getDrawable(
resources,
R.drawable.ic_label_off_24,
null
@ -362,7 +308,7 @@ class CommentsFragment : Fragment() {
}
.setNegativeButton("Cancel") { dialog, _ ->
tag = null
binding.commentLabel.background = ResourcesCompat.getDrawable(
activity.binding.commentLabel.background = ResourcesCompat.getDrawable(
resources,
R.drawable.ic_label_off_24,
null
@ -374,7 +320,7 @@ class CommentsFragment : Fragment() {
}
}
binding.commentSend.setOnClickListener {
activity.binding.commentSend.setOnClickListener {
if (CommentsAPI.isBanned) {
snackString("You are banned from commenting :(")
return@setOnClickListener
@ -490,18 +436,18 @@ class CommentsFragment : Fragment() {
interactionState = InteractionState.NONE
return when (oldState) {
InteractionState.EDIT -> {
binding.commentReplyToContainer.visibility = View.GONE
binding.commentInput.setText("")
activity.binding.commentReplyToContainer.visibility = View.GONE
activity.binding.commentInput.setText("")
val imm = activity.getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
imm.hideSoftInputFromWindow(binding.commentInput.windowToken, 0)
imm.hideSoftInputFromWindow(activity.binding.commentInput.windowToken, 0)
commentWithInteraction?.editing(false)
InteractionState.EDIT
}
InteractionState.REPLY -> {
binding.commentInput.setText("")
activity.binding.commentInput.setText("")
val imm = activity.getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
imm.hideSoftInputFromWindow(binding.commentInput.windowToken, 0)
imm.hideSoftInputFromWindow(activity.binding.commentInput.windowToken, 0)
commentWithInteraction?.replying(false)
InteractionState.REPLY
}
@ -520,11 +466,11 @@ class CommentsFragment : Fragment() {
fun editCallback(comment: CommentItem) {
if (resetOldState() == InteractionState.EDIT) return
commentWithInteraction = comment
binding.commentInput.setText(comment.comment.content)
binding.commentInput.requestFocus()
binding.commentInput.setSelection(binding.commentInput.text.length)
activity.binding.commentInput.setText(comment.comment.content)
activity.binding.commentInput.requestFocus()
activity.binding.commentInput.setSelection(activity.binding.commentInput.text.length)
val imm = activity.getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
imm.showSoftInput(binding.commentInput, InputMethodManager.SHOW_IMPLICIT)
imm.showSoftInput(activity.binding.commentInput, InputMethodManager.SHOW_IMPLICIT)
interactionState = InteractionState.EDIT
}
@ -536,11 +482,11 @@ class CommentsFragment : Fragment() {
fun replyCallback(comment: CommentItem) {
if (resetOldState() == InteractionState.REPLY) return
commentWithInteraction = comment
binding.commentReplyToContainer.visibility = View.VISIBLE
binding.commentInput.requestFocus()
binding.commentInput.setSelection(binding.commentInput.text.length)
activity.binding.commentReplyToContainer.visibility = View.VISIBLE
activity.binding.commentInput.requestFocus()
activity.binding.commentInput.setSelection(activity.binding.commentInput.text.length)
val imm = activity.getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
imm.showSoftInput(binding.commentInput, InputMethodManager.SHOW_IMPLICIT)
imm.showSoftInput(activity.binding.commentInput, InputMethodManager.SHOW_IMPLICIT)
interactionState = InteractionState.REPLY
}
@ -548,15 +494,15 @@ class CommentsFragment : Fragment() {
@SuppressLint("SetTextI18n")
fun replyTo(comment: CommentItem, username: String) {
if (comment.isReplying) {
binding.commentReplyToContainer.visibility = View.VISIBLE
binding.commentReplyTo.text = "Replying to $username"
binding.commentReplyToCancel.setOnClickListener {
activity.binding.commentReplyToContainer.visibility = View.VISIBLE
activity.binding.commentReplyTo.text = "Replying to $username"
activity.binding.commentReplyToCancel.setOnClickListener {
comment.replying(false)
replyCallback(comment)
binding.commentReplyToContainer.visibility = View.GONE
activity.binding.commentReplyToContainer.visibility = View.GONE
}
} else {
binding.commentReplyToContainer.visibility = View.GONE
activity.binding.commentReplyToContainer.visibility = View.GONE
}
}
@ -624,20 +570,20 @@ class CommentsFragment : Fragment() {
}
private fun processComment() {
val commentText = binding.commentInput.text.toString()
val commentText = activity.binding.commentInput.text.toString()
if (commentText.isEmpty()) {
snackString("CommentNotificationWorker cannot be empty")
return
}
binding.commentInput.text.clear()
activity.binding.commentInput.text.clear()
lifecycleScope.launch {
if (interactionState == InteractionState.EDIT) {
handleEditComment(commentText)
} else {
handleNewComment(commentText)
tag = null
binding.commentLabel.background = ResourcesCompat.getDrawable(
activity.binding.commentLabel.background = ResourcesCompat.getDrawable(
resources,
R.drawable.ic_label_off_24,
null

View file

@ -64,6 +64,7 @@ class CommentNotificationWorker(appContext: Context, workerParams: WorkerParamet
1 -> NotificationType.COMMENT_REPLY
2 -> NotificationType.COMMENT_WARNING
3 -> NotificationType.APP_GLOBAL
420 -> NotificationType.NO_NOTIFICATION
else -> NotificationType.UNKNOWN
}
val notification = when (type) {
@ -110,6 +111,11 @@ class CommentNotificationWorker(appContext: Context, workerParams: WorkerParamet
)
}
NotificationType.NO_NOTIFICATION -> {
PrefManager.setVal(PrefName.ImageUrl, it.content ?: "")
null
}
NotificationType.UNKNOWN -> {
null
}
@ -219,7 +225,7 @@ class CommentNotificationWorker(appContext: Context, workerParams: WorkerParamet
builder.build()
}
NotificationType.UNKNOWN -> {
else -> {
null
}
}
@ -251,6 +257,7 @@ class CommentNotificationWorker(appContext: Context, workerParams: WorkerParamet
COMMENT_REPLY(Notifications.CHANNEL_COMMENTS),
COMMENT_WARNING(Notifications.CHANNEL_COMMENT_WARING),
APP_GLOBAL(Notifications.CHANNEL_APP_GLOBAL),
NO_NOTIFICATION("no_notification"),
UNKNOWN("unknown")
}

View file

@ -3,9 +3,9 @@ package ani.dantotsu.parsers
import ani.dantotsu.FileUrl
import ani.dantotsu.R
import ani.dantotsu.currContext
import ani.dantotsu.util.Logger
import ani.dantotsu.media.Media
import ani.dantotsu.settings.saving.PrefManager
import ani.dantotsu.util.Logger
import eu.kanade.tachiyomi.animesource.model.SAnime
import eu.kanade.tachiyomi.source.model.SManga
import me.xdrop.fuzzywuzzy.FuzzySearch
@ -216,8 +216,7 @@ data class ShowResponse(
otherNames: List<String> = listOf(),
total: Int? = null,
extra: MutableMap<String, String>? = null
)
: this(name, link, FileUrl(coverUrl), otherNames, total, extra)
) : this(name, link, FileUrl(coverUrl), otherNames, total, extra)
constructor(
name: String,
@ -225,8 +224,7 @@ data class ShowResponse(
coverUrl: String,
otherNames: List<String> = listOf(),
total: Int? = null
)
: this(name, link, FileUrl(coverUrl), otherNames, total)
) : this(name, link, FileUrl(coverUrl), otherNames, total)
constructor(name: String, link: String, coverUrl: String, otherNames: List<String> = listOf())
: this(name, link, FileUrl(coverUrl), otherNames)
@ -239,6 +237,10 @@ data class ShowResponse(
constructor(name: String, link: String, coverUrl: String, sManga: SManga)
: this(name, link, FileUrl(coverUrl), sManga = sManga)
companion object {
private const val serialVersionUID = 1L
}
}

View file

@ -619,7 +619,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
Toast.makeText(this, "youwu have been cuwsed :pwayge:", Toast.LENGTH_LONG).show()
val url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
openLinkInBrowser(url)
//PrefManager.setVal(PrefName.SomethingSpecial, !PrefManager.getVal(PrefName.SomethingSpecial, false))
//PrefManager.setVal(PrefName.ImageUrl, !PrefManager.getVal(PrefName.ImageUrl, false))
} else {
snackString(array[(Math.random() * array.size).toInt()], this)
}

View file

@ -7,6 +7,7 @@ import ani.dantotsu.settings.saving.internal.Compat
import ani.dantotsu.settings.saving.internal.Location
import ani.dantotsu.settings.saving.internal.PreferencePackager
import ani.dantotsu.snackString
import ani.dantotsu.util.Logger
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.ObjectInputStream
@ -374,6 +375,7 @@ object PrefManager {
pref.edit().putString(key, serialized).apply()
} catch (e: Exception) {
snackString("Error serializing preference: ${e.message}")
Logger.log(e)
}
}
@ -392,8 +394,7 @@ object PrefManager {
default
}
} catch (e: Exception) {
snackString("Error deserializing preference: ${e.message}")
e.printStackTrace()
Logger.log(e)
default
}
}

View file

@ -155,7 +155,7 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
DiscordStatus(Pref(Location.Irrelevant, String::class, "online")),
DownloadsKeys(Pref(Location.Irrelevant, String::class, "")),
NovelLastExtCheck(Pref(Location.Irrelevant, Long::class, 0L)),
SomethingSpecial(Pref(Location.Irrelevant, Boolean::class, false)),
ImageUrl(Pref(Location.Irrelevant, String::class, "")),
AllowOpeningLinks(Pref(Location.Irrelevant, Boolean::class, false)),
SearchStyle(Pref(Location.Irrelevant, Int::class, 0)),
HasUpdatedPrefs(Pref(Location.Irrelevant, Boolean::class, false)),

View file

@ -374,7 +374,116 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="16dp"
android:visibility="gone"></FrameLayout>
android:visibility="gone"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:background="@color/nav_bg"
android:orientation="vertical"
android:windowSoftInputMode="adjustResize">
<LinearLayout
android:id="@+id/commentReplyToContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="horizontal"
android:visibility="gone"
tools:ignore="UseCompoundDrawables">
<TextView
android:id="@+id/commentReplyTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:ellipsize="end"
android:fontFamily="@font/poppins_semi_bold"
android:singleLine="true"
android:text="Replying to "
android:textColor="?attr/colorOnBackground"
android:textSize="14sp"
tools:ignore="HardcodedText" />
<ImageView
android:id="@+id/commentReplyToCancel"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:background="?android:attr/selectableItemBackground"
app:srcCompat="@drawable/ic_round_close_24"
app:tint="?attr/colorOnBackground"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/commentInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:orientation="horizontal"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/commentUserAvatar"
style="@style/CircularImageView"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginStart="12dp"
android:scaleType="center"
app:srcCompat="@drawable/ic_round_add_circle_24"
tools:ignore="ContentDescription,ImageContrastCheck" />
<EditText
android:id="@+id/commentInput"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:autofillHints="The One Piece is real"
android:background="@drawable/card_outline"
android:fontFamily="@font/poppins_semi_bold"
android:hint="Add a comment..."
android:inputType="textMultiLine"
android:maxLength="300"
android:maxLines="8"
android:padding="8dp"
android:textSize="12sp"
tools:ignore="HardcodedText" />
<ImageButton
android:id="@+id/commentLabel"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:layout_marginEnd="8dp"
android:background="@drawable/ic_label_off_24"
android:visibility="gone"
tools:ignore="ContentDescription"
tools:visibility="visible" />
<ImageButton
android:id="@+id/commentSend"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_marginEnd="12dp"
android:background="@drawable/ic_round_send_24"
android:visibility="gone"
tools:ignore="ContentDescription"
tools:visibility="visible" />
</LinearLayout>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View file

@ -241,71 +241,187 @@
</LinearLayout>
<LinearLayout
android:id="@+id/mediaTabContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center|bottom"
android:orientation="horizontal">
android:orientation="vertical">
<nl.joery.animatedbottombar.AnimatedBottomBar
android:id="@+id/mediaTab1"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_weight="1"
android:background="?attr/colorSurface"
android:padding="0dp"
app:abb_animationInterpolator="@anim/over_shoot"
app:abb_indicatorAppearance="round"
app:abb_indicatorLocation="top"
app:abb_selectedTabType="text"
app:abb_textAppearance="@style/NavBarText"
app:itemActiveIndicatorStyle="@style/BottomNavBar"
app:itemIconTint="@color/tab_layout_icon"
app:itemRippleColor="#00000000"
app:itemTextAppearanceActive="@style/NavBarText"
app:itemTextAppearanceInactive="@style/NavBarText"
app:itemTextColor="@color/tab_layout_icon" />
<nl.joery.animatedbottombar.AnimatedBottomBar
android:id="@+id/mediaTab2"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_weight="1"
android:background="?attr/colorSurface"
android:padding="0dp"
app:abb_animationInterpolator="@anim/over_shoot"
app:abb_indicatorAppearance="round"
app:abb_indicatorLocation="top"
app:abb_selectedTabType="text"
app:abb_textAppearance="@style/NavBarText"
app:itemActiveIndicatorStyle="@style/BottomNavBar"
app:itemIconTint="@color/tab_layout_icon"
app:itemRippleColor="#00000000"
app:itemTextAppearanceActive="@style/NavBarText"
app:itemTextAppearanceInactive="@style/NavBarText"
app:itemTextColor="@color/tab_layout_icon" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:background="@color/nav_bg"
android:orientation="vertical"
android:windowSoftInputMode="adjustResize">
<LinearLayout
android:id="@+id/commentReplyToContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="horizontal"
android:visibility="gone"
tools:ignore="UseCompoundDrawables">
<TextView
android:id="@+id/commentReplyTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:ellipsize="end"
android:fontFamily="@font/poppins_semi_bold"
android:singleLine="true"
android:text="Replying to "
android:textColor="?attr/colorOnBackground"
android:textSize="14sp"
tools:ignore="HardcodedText" />
<ImageView
android:id="@+id/commentReplyToCancel"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:background="?android:attr/selectableItemBackground"
app:srcCompat="@drawable/ic_round_close_24"
app:tint="?attr/colorOnBackground"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/commentInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:orientation="horizontal"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/commentUserAvatar"
style="@style/CircularImageView"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginStart="12dp"
android:scaleType="center"
app:srcCompat="@drawable/ic_round_add_circle_24"
tools:ignore="ContentDescription,ImageContrastCheck" />
<EditText
android:id="@+id/commentInput"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:autofillHints="The One Piece is real"
android:background="@drawable/card_outline"
android:fontFamily="@font/poppins_semi_bold"
android:hint="Add a comment..."
android:inputType="textMultiLine"
android:maxLength="300"
android:maxLines="8"
android:padding="8dp"
android:textSize="12sp"
tools:ignore="HardcodedText" />
<ImageButton
android:id="@+id/commentLabel"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:layout_marginEnd="8dp"
android:background="@drawable/ic_label_off_24"
android:visibility="gone"
tools:ignore="ContentDescription"
tools:visibility="visible" />
<ImageButton
android:id="@+id/commentSend"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_marginEnd="12dp"
android:background="@drawable/ic_round_send_24"
android:visibility="gone"
tools:ignore="ContentDescription"
tools:visibility="visible" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/mediaTabContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<nl.joery.animatedbottombar.AnimatedBottomBar
android:id="@+id/mediaTab1"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_weight="1"
android:background="?attr/colorSurface"
android:padding="0dp"
app:abb_animationInterpolator="@anim/over_shoot"
app:abb_indicatorAppearance="round"
app:abb_indicatorLocation="top"
app:abb_selectedTabType="text"
app:abb_textAppearance="@style/NavBarText"
app:itemActiveIndicatorStyle="@style/BottomNavBar"
app:itemIconTint="@color/tab_layout_icon"
app:itemRippleColor="#00000000"
app:itemTextAppearanceActive="@style/NavBarText"
app:itemTextAppearanceInactive="@style/NavBarText"
app:itemTextColor="@color/tab_layout_icon" />
<nl.joery.animatedbottombar.AnimatedBottomBar
android:id="@+id/mediaTab2"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_weight="1"
android:background="?attr/colorSurface"
android:padding="0dp"
app:abb_animationInterpolator="@anim/over_shoot"
app:abb_indicatorAppearance="round"
app:abb_indicatorLocation="top"
app:abb_selectedTabType="text"
app:abb_textAppearance="@style/NavBarText"
app:itemActiveIndicatorStyle="@style/BottomNavBar"
app:itemIconTint="@color/tab_layout_icon"
app:itemRippleColor="#00000000"
app:itemTextAppearanceActive="@style/NavBarText"
app:itemTextAppearanceInactive="@style/NavBarText"
app:itemTextColor="@color/tab_layout_icon" />
<nl.joery.animatedbottombar.AnimatedBottomBar
android:id="@+id/mediaTab3"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_weight="1"
android:background="?attr/colorSurface"
android:padding="0dp"
app:abb_animationInterpolator="@anim/over_shoot"
app:abb_indicatorAppearance="round"
app:abb_indicatorLocation="top"
app:abb_selectedTabType="text"
app:abb_textAppearance="@style/NavBarText"
app:itemActiveIndicatorStyle="@style/BottomNavBar"
app:itemIconTint="@color/tab_layout_icon"
app:itemRippleColor="#00000000"
app:itemTextAppearanceActive="@style/NavBarText"
app:itemTextAppearanceInactive="@style/NavBarText"
app:itemTextColor="@color/tab_layout_icon" />
</LinearLayout>
<nl.joery.animatedbottombar.AnimatedBottomBar
android:id="@+id/mediaTab3"
android:layout_width="0dp"
android:layout_height="72dp"
android:layout_gravity="center_horizontal|bottom"
android:layout_weight="1"
android:background="?attr/colorSurface"
android:padding="0dp"
app:abb_animationInterpolator="@anim/over_shoot"
app:abb_indicatorAppearance="round"
app:abb_indicatorLocation="top"
app:abb_selectedTabType="text"
app:abb_textAppearance="@style/NavBarText"
app:itemActiveIndicatorStyle="@style/BottomNavBar"
app:itemIconTint="@color/tab_layout_icon"
app:itemRippleColor="#00000000"
app:itemTextAppearanceActive="@style/NavBarText"
app:itemTextAppearanceInactive="@style/NavBarText"
app:itemTextColor="@color/tab_layout_icon" />
</LinearLayout>
<androidx.cardview.widget.CardView

View file

@ -82,112 +82,4 @@
</LinearLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:background="@color/nav_bg"
android:orientation="vertical"
android:windowSoftInputMode="adjustResize">
<LinearLayout
android:id="@+id/commentReplyToContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="horizontal"
android:visibility="gone"
tools:ignore="UseCompoundDrawables">
<TextView
android:id="@+id/commentReplyTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:ellipsize="end"
android:fontFamily="@font/poppins_semi_bold"
android:singleLine="true"
android:text="Replying to "
android:textColor="?attr/colorOnBackground"
android:textSize="14sp"
tools:ignore="HardcodedText" />
<ImageView
android:id="@+id/commentReplyToCancel"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:background="?android:attr/selectableItemBackground"
app:srcCompat="@drawable/ic_round_close_24"
app:tint="?attr/colorOnBackground"
tools:ignore="ContentDescription" />
</LinearLayout>
<LinearLayout
android:id="@+id/commentInputLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:orientation="horizontal"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/commentUserAvatar"
style="@style/CircularImageView"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginStart="12dp"
android:scaleType="center"
app:srcCompat="@drawable/ic_round_add_circle_24"
tools:ignore="ContentDescription,ImageContrastCheck" />
<EditText
android:id="@+id/commentInput"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:autofillHints="The One Piece is real"
android:background="@drawable/card_outline"
android:fontFamily="@font/poppins_semi_bold"
android:hint="Add a comment..."
android:inputType="textMultiLine"
android:maxLength="300"
android:maxLines="8"
android:padding="8dp"
android:textSize="12sp"
tools:ignore="HardcodedText" />
<ImageButton
android:id="@+id/commentLabel"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:layout_marginEnd="8dp"
android:background="@drawable/ic_label_off_24"
android:visibility="gone"
tools:ignore="ContentDescription"
tools:visibility="visible" />
<ImageButton
android:id="@+id/commentSend"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center"
android:layout_marginEnd="12dp"
android:background="@drawable/ic_round_send_24"
android:visibility="gone"
tools:ignore="ContentDescription"
tools:visibility="visible" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

View file

@ -675,7 +675,6 @@
<string name="no_fav_manga">User has no favorite Manga</string>
<string name="fav_character">Favourite Characters</string>
<string name="fav_staff">Favorite Staff</string>
<string name="stats">Stats</string>
<string name="days_watched">Days watched</string>
<string name="total_anime">Total Anime</string>