Android O上的TextView换行问题

时间:2017-07-29 09:35:37

标签: android textview

Android O预览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'

那么为什么在Image 2中还会再写一封字母' g'拉下来“tuvwxyzabcdef'在一起,他们应该在上线。

这是Android O中的错误吗?

我使用的活动:

<!DOCTYPE html>
<html>
<body>

Name: <input type="text" id="name1" value="" onBlur="myFunction1(this.id)"><br>
Age: <input type="number" id="age1" value="" onBlur="myFunction1(this.id)"><br>
Job: <input type="text" id="job1" value="" onBlur="myFunction1(this.id)"> <br>
Tel: <input type="text" id="tel1" value="" onBlur="myFunction1(this.id)"> <br>

<p>Type then click outside to display the value of the input field.</p>

Your input:
<p id="demo"></p>

<script>
function myFunction1(ID) {
    var x = document.getElementById(ID).value;
    document.getElementById("demo").innerHTML = x;
}

</script>

</body>
</html>

XML文件R.layout.activity_main:

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);
    }
}

1 个答案:

答案 0 :(得分:1)

它确实是一个错误,并由Android团队解决 https://issuetracker.google.com/issues/64418117