fix: reply bar not showing
This commit is contained in:
parent
e93ca5d86e
commit
a8bd9ef97b
4 changed files with 71 additions and 65 deletions
|
@ -128,7 +128,7 @@
|
||||||
android:name=".media.MediaDetailsActivity"
|
android:name=".media.MediaDetailsActivity"
|
||||||
android:parentActivityName=".MainActivity"
|
android:parentActivityName=".MainActivity"
|
||||||
android:theme="@style/Theme.Dantotsu.NeverCutout"
|
android:theme="@style/Theme.Dantotsu.NeverCutout"
|
||||||
android:windowSoftInputMode="adjustPan|stateHidden"/>
|
android:windowSoftInputMode="adjustResize|stateHidden"/>
|
||||||
<activity android:name=".media.CharacterDetailsActivity" />
|
<activity android:name=".media.CharacterDetailsActivity" />
|
||||||
<activity android:name=".home.NoInternet" />
|
<activity android:name=".home.NoInternet" />
|
||||||
<activity
|
<activity
|
||||||
|
|
|
@ -60,7 +60,7 @@ import kotlin.math.abs
|
||||||
|
|
||||||
class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedListener {
|
class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedListener {
|
||||||
|
|
||||||
private lateinit var binding: ActivityMediaBinding
|
lateinit var binding: ActivityMediaBinding
|
||||||
private val scope = lifecycleScope
|
private val scope = lifecycleScope
|
||||||
private val model: MediaDetailsViewModel by viewModels()
|
private val model: MediaDetailsViewModel by viewModels()
|
||||||
private lateinit var tabLayout: NavigationBarView
|
private lateinit var tabLayout: NavigationBarView
|
||||||
|
|
|
@ -27,6 +27,7 @@ import ani.dantotsu.connections.comments.CommentResponse
|
||||||
import ani.dantotsu.connections.comments.CommentsAPI
|
import ani.dantotsu.connections.comments.CommentsAPI
|
||||||
import ani.dantotsu.databinding.FragmentCommentsBinding
|
import ani.dantotsu.databinding.FragmentCommentsBinding
|
||||||
import ani.dantotsu.loadImage
|
import ani.dantotsu.loadImage
|
||||||
|
import ani.dantotsu.media.MediaDetailsActivity
|
||||||
import ani.dantotsu.settings.saving.PrefManager
|
import ani.dantotsu.settings.saving.PrefManager
|
||||||
import ani.dantotsu.settings.saving.PrefName
|
import ani.dantotsu.settings.saving.PrefName
|
||||||
import ani.dantotsu.snackString
|
import ani.dantotsu.snackString
|
||||||
|
@ -85,6 +86,7 @@ class CommentsFragment : Fragment() {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
activity = requireActivity() as AppCompatActivity
|
activity = requireActivity() as AppCompatActivity
|
||||||
|
(activity as? MediaDetailsActivity)?.binding?.mediaAppBar?.setExpanded(false, true)
|
||||||
//get the media id from the intent
|
//get the media id from the intent
|
||||||
val mediaId = arguments?.getInt("mediaId") ?: -1
|
val mediaId = arguments?.getInt("mediaId") ?: -1
|
||||||
mediaName = arguments?.getString("mediaName") ?: "unknown"
|
mediaName = arguments?.getString("mediaName") ?: "unknown"
|
||||||
|
@ -349,6 +351,7 @@ class CommentsFragment : Fragment() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
tag = null
|
tag = null
|
||||||
adapter.notifyDataSetChanged()
|
adapter.notifyDataSetChanged()
|
||||||
|
(activity as? MediaDetailsActivity)?.binding?.mediaAppBar?.setExpanded(false, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class InteractionState {
|
enum class InteractionState {
|
||||||
|
|
|
@ -8,9 +8,11 @@
|
||||||
android:background="?android:colorBackground"
|
android:background="?android:colorBackground"
|
||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
|
||||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
android:id="@+id/commentsRefresh"
|
android:id="@+id/commentsRefresh"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_marginTop="58dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false">
|
android:clipToPadding="false">
|
||||||
|
@ -20,69 +22,6 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/commentInputLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:windowSoftInputMode="adjustResize">
|
|
||||||
|
|
||||||
<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_marginStart="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_gravity="start|center_vertical"
|
|
||||||
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="42dp"
|
|
||||||
android:layout_height="42dp"
|
|
||||||
android:scaleType="center"
|
|
||||||
android:scaleX="0.6"
|
|
||||||
android:scaleY="0.6"
|
|
||||||
android:translationX="100dp"
|
|
||||||
android:background="@drawable/ic_label_off_24"
|
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/commentSend"
|
|
||||||
android:layout_width="42dp"
|
|
||||||
android:layout_height="42dp"
|
|
||||||
android:layout_marginEnd="12dp"
|
|
||||||
android:translationX="100dp"
|
|
||||||
android:scaleType="center"
|
|
||||||
android:scaleX="0.85"
|
|
||||||
android:scaleY="0.85"
|
|
||||||
android:background="@drawable/ic_round_send_24"
|
|
||||||
tools:ignore="ContentDescription"
|
|
||||||
android:visibility="gone"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -145,6 +84,70 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/commentInputLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
android:windowSoftInputMode="adjustResize">
|
||||||
|
|
||||||
|
<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_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_gravity="start|center_vertical"
|
||||||
|
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="42dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:scaleX="0.6"
|
||||||
|
android:scaleY="0.6"
|
||||||
|
android:translationX="100dp"
|
||||||
|
android:background="@drawable/ic_label_off_24"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/commentSend"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="42dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:translationX="100dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:scaleX="0.85"
|
||||||
|
android:scaleY="0.85"
|
||||||
|
android:background="@drawable/ic_round_send_24"
|
||||||
|
tools:ignore="ContentDescription"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue