Why character / cuts the text in TextView if maxLines = 1?
<p><strong>WHAT I HAVE</strong></p>
<p>I have a TextView who is showing a URL with &quot;https://&quot; prefix:</p>
<pre><code>    &lt;LinearLayout
        android:orientation=&quot;vertical&quot;
        android:layout_width=&quot;0dp&quot;
        android:layout_weight=&quot;1&quot;
        android:layout_height=&quot;wrap_content&quot;&gt;

        &lt;TextView
            android:layout_width=&quot;match_parent&quot;
            android:layout_height=&quot;wrap_content&quot;
            android:textAppearance=&quot;?android:attr/textAppearanceMedium&quot;
            android:text=&quot;test2&quot;
            android:maxLines=&quot;1&quot;
            android:ellipsize=&quot;marquee&quot;
            android:textStyle=&quot;bold&quot;
            android:textSize=&quot;16sp&quot;
            android:textColor=&quot;@color/primary_text&quot;
            android:id=&quot;@+id/txvNomEntornIversio&quot; /&gt;

        &lt;TextView
            android:layout_width=&quot;match_parent&quot;
            android:layout_height=&quot;wrap_content&quot;
            android:textAppearance=&quot;?android:attr/textAppearanceMedium&quot;
            android:text=&quot;https://test2.sdasasdasdfasdfasdffasdfasdfasdf.sdffd&quot;
            android:ellipsize=&quot;end&quot;
            android:maxLines=&quot;1&quot;
            android:paddingLeft=&quot;10dp&quot;
            android:textSize=&quot;13sp&quot;
            android:textStyle=&quot;italic&quot;
            android:id=&quot;@+id/txvUrlEntorn&quot;/&gt;
        
    &lt;/LinearLayout&gt;
</code></pre>
<p><strong>WHAT IS THE PROBLEM?</strong></p>
<p>The result in android studio preview and in device after execute the code was:</p>
<p>If execute previous code:
<a href="https://i.stack.imgur.com/7KsnJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7KsnJ.png" alt="enter image description here" /></a></p>
<p>If I remove the &quot;/&quot; symbols:
<a href="https://i.stack.imgur.com/O8Udm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O8Udm.png" alt="enter image description here" /></a></p>
<p>If I move the symbol in other position:
<a href="https://i.stack.imgur.com/rdcEM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rdcEM.png" alt="enter image description here" /></a></p>
<br />
<br />
<p><strong>WHAT I NEED</strong></p>
<p>I need to show the prefix &quot;https: //&quot; with maximum letters to fit the available space.</p>
<p><strong>WHAT I TRIED</strong></p>
<p>I tried to <a href="https://developer.android.com/reference/android/widget/TextView.html" rel="nofollow noreferrer">read documentation</a> (setEllipsize block) and search in stackoverflow, searching for some reference with this symbol and nothing found.
I tried also to scape the symbols with no effect.</p>
<p>Anyone know why it occurs and can help me? Thanks in advance!</p>
<p><strong>UPDATED LAYOUT</strong></p>
<pre><code>&lt;LinearLayout
xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
android:id=&quot;@+id/card_view&quot;
android:layout_width=&quot;match_parent&quot;
android:layout_height=&quot;wrap_content&quot;&gt;

&lt;LinearLayout
    android:orientation=&quot;horizontal&quot;
    android:layout_width=&quot;match_parent&quot;
    android:paddingLeft=&quot;10dp&quot;
    android:paddingRight=&quot;10dp&quot;
    android:paddingTop=&quot;15dp&quot;
    android:paddingBottom=&quot;15dp&quot;
    android:layout_height=&quot;wrap_content&quot;&gt;

    &lt;TextView
        android:layout_width=&quot;wrap_content&quot;
        android:layout_height=&quot;match_parent&quot;
        android:gravity=&quot;center&quot;
        android:textAppearance=&quot;?android:attr/textAppearanceLarge&quot;
        android:text=&quot;@string/icon_unchecked&quot;
        android:layout_marginRight=&quot;10dp&quot;
        android:id=&quot;@+id/txvIconChecked&quot;/&gt;

    &lt;LinearLayout
        android:orientation=&quot;vertical&quot;
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;wrap_content&quot;&gt;

        &lt;TextView
            android:layout_width=&quot;match_parent&quot;
            android:layout_height=&quot;wrap_content&quot;
            android:textAppearance=&quot;?android:attr/textAppearanceMedium&quot;
            android:text=&quot;test2&quot;
            android:maxLines=&quot;1&quot;
            android:ellipsize=&quot;marquee&quot;
            android:textStyle=&quot;bold&quot;
            android:textSize=&quot;16sp&quot;
            android:textColor=&quot;@color/primary_text&quot;
            android:id=&quot;@+id/txvNomEntornIversio&quot; /&gt;

        &lt;TextView
            android:layout_width=&quot;match_parent&quot;
            android:layout_height=&quot;wrap_content&quot;
            android:textAppearance=&quot;?android:attr/textAppearanceMedium&quot;
            android:text=&quot;https://mydomain.asdfasdasdfasdfasdffasdfasdfasdf.cat&quot;
            android:ellipsize=&quot;end&quot;
            android:maxLines=&quot;1&quot;
            android:paddingLeft=&quot;10dp&quot;
            android:textSize=&quot;13sp&quot;
            android:textStyle=&quot;italic&quot;
            android:id=&quot;@+id/txvUrlEntorn&quot;/&gt;

    &lt;/LinearLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p><a href="https://i.stack.imgur.com/37LBs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/37LBs.png" alt="enter image description here" /></a></p>
<p><a href="https://i.stack.imgur.com/HvArm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HvArm.png" alt="enter image description here" /></a></p>
<p><strong>UPDATE 2</strong></p>
<p>Thanks to Teiky, we have found that this problem occurs only in versions lower than API 23. It may be a bug?</p>
<p>The option (deprecated) Android: SingleLine = &quot;true&quot; seems to work correctly in all versions! Instead, the new option android: MaxLines with android: ellipsize only works for 23 ...</p>
<p>At the moment, the most viable option seems to ignore deprecated SingleLine ...</p>
<p><strong>SOLUTION FOR ME</strong></p>
<p>Finally, as I said in the last update, my solution was to continue using android: SingleLine = true even if it is marked as deprecated.</p>
<p>Teikyo seconds, he tried a dipsositiu android 4.4.4 and worked well using MaxLines ellipsize ... and me, a device Lollipop I still cut the text to find the symbol / ...</p>
<p>Set in response Teikyo as good as it helped me to investigate the problem further. Thank you all for your help!</p>