我想让两个android按钮出现在两个textviews之间。但是第一个textview似乎正在显示,而另一个textview和按钮没有出现。我希望它看起来像:如何在Textviews中放置按钮
“等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等按钮等等等等等等等等等等blahblah等等等等等等等等等等BUTTON”
什么我看到的是:
“等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等等”
下面是代码:
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:text="Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah "
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:text="BUTTON"
android:background="@null"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text=" blah blah blah blah blah blahblah blah blah blah blah blah "
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:text="BUTTON"
android:background="@null"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
任何帮助将不胜感激!
您好Serdar,感谢您的快速响应,请您提供一个如何使用布局权重来实现我想要的示例? – c8apps
检查这个链接这是你的最好例子。 http://developer.android.com/resources/tutorials/views/hello-linearlayout.html –