Java android: appending a newline using TextView

前端 未结 5 725
离开以前
离开以前 2020-12-09 17:34

I just want to add a new line somehow to my linear layout:

layout = (LinearLayout) findViewById (R.id.layout);  

... //some other code where I\'ve appended          


        
5条回答
  •  有刺的猬
    2020-12-09 18:00

    Simple by giving "\n" data is displayed in a new line

    txtView.setText("Latitude :" + latitude + "\nLongitude :" + longitude);
    

提交回复
热议问题