Bruce Lin
Bruce Lin

Reputation: 351

TextView Line Breaking Issue On Android O

Android O preview 4, Nexus 6P.

Image 1 has text filled in text view's width exactly

Image 2 has the same text but add one more letter 'g'

So why in Image 2 the one more letter 'g' pull down 'tuvwxyzabcdef' together,they are supposed to be in upper line.

Is it a bug in Android O?

Activity I used:

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        TextView v = (TextView)findViewById(R.id.text_view);
    }
}

XML File R.layout.activity_main:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.androidodemo.MainActivity">
    <TextView
        android:id="@+id/text_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefg"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>

Upvotes: 0

Views: 373

Answers (1)

Bruce Lin
Bruce Lin

Reputation: 351

It's really a bug and Solved by Android Team https://issuetracker.google.com/issues/64418117

Upvotes: 1

Related Questions