Skip to content

Commit

Permalink
Merge pull request #1775 from DataDog/louiszawadzki/rum-2354/add-sr-t…
Browse files Browse the repository at this point in the history
…ext-scenarios-to-sample-app

Add text overflow examples in sample app
  • Loading branch information
louiszawadzki authored Dec 20, 2023
2 parents b2dc437 + ce6e011 commit 3947313
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,20 @@
android:textColor="@color/datadog_violet"
android:text="@string/text_view" />

<com.google.android.material.textview.MaterialTextView
<TextView
app:layout_constraintTop_toBottomOf="@+id/text_view"
app:layout_constraintStart_toStartOf="parent"
android:ellipsize="start"
android:id="@+id/ellipsize_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="@color/datadog_violet"
android:text="@string/ellipsize_text_view" />

<com.google.android.material.textview.MaterialTextView
app:layout_constraintTop_toBottomOf="@+id/ellipsize_text_view"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="@dimen/default_padding"
android:id="@+id/material_text_view"
android:layout_width="match_parent"
Expand Down Expand Up @@ -50,10 +61,22 @@
android:hint="@string/edit_text_view"
android:textColorHint="@color/datadog_violet"/>

<AutoCompleteTextView
<EditText
app:layout_constraintTop_toBottomOf="@+id/edit_text_view"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="@dimen/default_padding"
android:id="@+id/edit_text_view_multiline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/datadog_violet"
android:hint="@string/edit_text_view_multiline"
android:textColorHint="@color/datadog_violet"
android:maxLines="2"/>

<AutoCompleteTextView
app:layout_constraintTop_toBottomOf="@+id/edit_text_view_multiline"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="@dimen/default_padding"
android:id="@+id/auto_complete_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
2 changes: 2 additions & 0 deletions sample/kotlin/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,12 @@
<string name="granted">GRANTED</string>
<string name="not_granted">NOT GRANTED</string>
<string name="text_view">Default Text View</string>
<string name="ellipsize_text_view">Default Text View with some super long text for ellipsis. Default Text View with some super long text. Default Text View with some super long text. Default Text View with some super long text. Default Text View with some super long text. Default Text View with some super long text. Default Text View with some super long text.</string>
<string name="material_text_view">Material Text View</string>
<string name="app_compat_text_view">App Compat Text View</string>
<string name="auto_complete_text_view">Default Auto Complete Text View</string>
<string name="edit_text_view">Edit Text View</string>
<string name="edit_text_view_multiline">Edit Text View on 2 lines</string>
<string name="app_compat_edit_text_view">App Compat Edit Text View</string>
<string name="app_compat_auto_complete_text_view">App Compat Auto Complete Text View</string>
<string name="material_auto_complete_text_view">Material Auto Complete Text View</string>
Expand Down

0 comments on commit 3947313

Please sign in to comment.