Fix comment bar

pull/3329/head
Alex Baker 10 months ago
parent b6426cc2fb
commit 289f73f72b

@ -3,6 +3,8 @@ package org.tasks.compose.edit
import android.content.res.Configuration.UI_MODE_NIGHT_YES
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
@ -94,7 +96,11 @@ fun TaskEditScreen(
},
bottomBar = {
if (viewState.showComments && !viewState.isReadOnly) {
AndroidFragment<CommentBarFragment>()
AndroidFragment<CommentBarFragment>(
modifier = Modifier
.fillMaxWidth()
.navigationBarsPadding()
)
}
},
) { paddingValues ->

@ -27,7 +27,6 @@ import org.tasks.extensions.Context.hideKeyboard
import org.tasks.files.ImageHelper
import org.tasks.preferences.Device
import org.tasks.preferences.Preferences
import org.tasks.themes.ThemeColor
import org.tasks.ui.TaskEditViewModel
import javax.inject.Inject
@ -37,7 +36,6 @@ class CommentBarFragment : Fragment() {
@Inject lateinit var dialogBuilder: DialogBuilder
@Inject lateinit var device: Device
@Inject lateinit var preferences: Preferences
@Inject lateinit var themeColor: ThemeColor
private lateinit var commentButton: View
private lateinit var commentField: EditText
@ -74,7 +72,6 @@ class CommentBarFragment : Fragment() {
) {
commentBar.visibility = View.VISIBLE
}
commentBar.setBackgroundColor(themeColor.primaryColor)
resetPictureButton()
}

@ -10,7 +10,8 @@
android:gravity="center_vertical"
android:minHeight="50dp"
android:orientation="horizontal"
android:visibility="gone" >
android:visibility="gone"
android:background="@color/content_background">
<ImageView
android:id="@+id/picture"
@ -20,6 +21,7 @@
android:layout_gravity="center_vertical"
android:focusable="true"
android:focusableInTouchMode="true"
app:tint="?attr/colorOnBackground"
tools:ignore="ContentDescription"/>
<EditText
@ -39,8 +41,8 @@
android:nextFocusLeft="@id/commentField"
android:nextFocusUp="@id/commentField"
android:textAlignment="viewStart"
android:textColor="?attr/colorOnPrimary"
android:textColorHint="?attr/colorOnPrimary"
android:textColor="?attr/colorOnBackground"
android:textColorHint="?attr/colorOnBackground"
android:textCursorDrawable="@null"
android:textSize="16sp"/>
@ -52,7 +54,7 @@
android:layout_marginStart="3dp"
android:scaleType="center"
android:src="@drawable/ic_outline_add_24px"
app:tint="?attr/colorOnPrimary"
app:tint="?attr/colorOnBackground"
android:visibility="gone"/>
</LinearLayout>

Loading…
Cancel
Save