Android studio,xml中段落的文本对齐方式

时间:2017-04-25 04:34:29

标签: android android-layout textview android-xml

每当我有第二行时,它就会从左边开始到屏幕的开头,而我在第一行开始时有一个空格,因为我正在尝试写3级线,而第2行或第三级第二行回到屏幕的开头,它破坏了我的组织, 也知道增加空间不是一个好的解决方案,因为当手机处于风景中时,如果我添加了一个空间,它会显示空间

2 个答案:

答案 0 :(得分:1)

您必须设计纵向和横向视图。由于屏幕布局不同,两者都将使用不同的xml。所以这将解决肖像和风景问题。对于从头开始的文本,尝试在该文本视图上给出边距。

关注This Link

答案 1 :(得分:0)

请试试这个:

  <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="\t\t\t\t\t\tLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."/>