【发布时间】:2017-09-06 19:47:24
【问题描述】:
Open source code that I am using
在我的设计渲染中,它向我显示整个背景是蓝色的,但实际的应用程序只有列表视图上的颜色。以下是我的 xml 代码和屏幕截图。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#b8569fee">
<TextView android:id="@+id/device_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#b8569fee"
android:textSize="24dp"/>
<TextView
android:id="@+id/device_address"
android:layout_width="match_parent"
android:background="#b8569fee"
android:layout_height="wrap_content"
android:textSize="12dp" />
</LinearLayout>
我尝试将textview布局高度更改为match_parent,但还是不行,那么我需要做些什么来改变整个背景呢?
感谢
【问题讨论】:
-
您要更改视图或整个背景的颜色?
-
@BOB 显示包含 listView 的布局,请参阅我的答案。
-
您在 ListView 的模板中编写了该代码,而不是在显示 List View 的活动的实际 XML 中。而是在
-
@Rohit B 整个背景
-
@Jorgesys 我没有其他的 listView 布局。
标签: java android xml listview bluetooth