Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
When you include androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-alpha05, you are upgrading all of its transitive dependencies, which includes lifecycle-runtime. However, you are *not* upgrading lifecycle-process, which is still using the version of lifecycle from your lifecycle-extensions dependency (2.1.0).
You do any one of the following:
- Add an explicit dependency on lifecycle-process:2.2.0-alpha05 to pull in the new version that is compatible with lifecycle-runtime:2.2.0-alpha05
- Upgrade your lifecycle:extensions dependency to 2.2.0-alpha05 so that lifecycle-process is upgraded
- Remove the lifecycle:extensions dependency entirely and use only the lifecycle libraries you need (for example, use lifecycle-viewmodel-ktx if you want ViewModels) so that you don't pull in lifecycle-process at all
Mixing and matching Lifecycle versions is not a supported configuration, so I'd recommend keeping to using just a single version.
You do any one of the following:
- Add an explicit dependency on lifecycle-process:2.2.0-alpha05 to pull in the new version that is compatible with lifecycle-runtime:2.2.0-alpha05
- Upgrade your lifecycle:extensions dependency to 2.2.0-alpha05 so that lifecycle-process is upgraded
- Remove the lifecycle:extensions dependency entirely and use only the lifecycle libraries you need (for example, use lifecycle-viewmodel-ktx if you want ViewModels) so that you don't pull in lifecycle-process at all
Mixing and matching Lifecycle versions is not a supported configuration, so I'd recommend keeping to using just a single version.
Description
Goal:
To create a chain of two textViews that is aligned to start of parent. The first textView (at parent start) should ellipse if there's no space for the entire text.
Problem:
This works fine when the device is LTR, but when the device is RTL the horizontal bias seems to change from 0 to 0.5 and horizontal style from "packed" to "spread".
Code snippet (CustomFontTextView extends androidx.appcompat.widget.AppCompatTextView and only has the purpose of changing the font):
<androidx.constraintlayout.helper.widget.Flow
android:id="@+id/upperTextFlow"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:flow_wrapMode="chain"
app:chainUseRtl="true"
app:flow_horizontalStyle="packed"
app:flow_horizontalBias="0"
app:flow_verticalAlign="baseline"
app:constraint_referenced_ids="upperTextEllipse,upperTextExtension"
app:layout_constraintBottom_toTopOf="@id/lowerTextFlow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<com.main.views.CustomFontTextView
android:id="@+id/upperTextEllipse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:maxLines="1"
android:textAlignment="viewStart"
android:textSize="@dimen/text_size_18"
android:textStyle="bold"
android:textColor="@color/cc_text_white"
app:layout_constrainedWidth="true"
tools:ignore="MissingConstraints"
android:visibility="gone" />
<com.main.views.CustomFontTextView
android:id="@+id/upperTextExtension"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:lines="1"
android:maxLines="1"
android:textAlignment="viewStart"
android:textSize="@dimen/text_size_18"
android:textStyle="bold"
android:textColor="@color/cc_text_white"
tools:ignore="MissingConstraints"
android:visibility="gone"/>