代码是:
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="车站"
android:textSize="16sp"/>
android:id="@+id/bustop"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:selectAllOnFocus="true"
android:hint="请输入目的车站"/>
然后实际效果就是车站在最左边,而edittext和车站之间隔了好远,被挤出屏幕外了,效果如图
你的layout_width="fill_parent"这是父控件有多宽他就多宽 你把车站的layout_width改成wrap_content就行了!