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

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

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

Loading…
Cancel
Save