Java 带有ListView的XYPlot具有黑色背景,而不是透明背景
我试图使我的ListView的背景透明。我已经知道了如何在除XYPlot之外的所有情况下在ListView不移动时执行此操作。无论我尝试什么,当停止时背景看起来总是黑色的(移动时是透明的) 以下是我正在使用的图片: 以下是我的listview xml:Java 带有ListView的XYPlot具有黑色背景,而不是透明背景,java,android,xml,listview,Java,Android,Xml,Listview,我试图使我的ListView的背景透明。我已经知道了如何在除XYPlot之外的所有情况下在ListView不移动时执行此操作。无论我尝试什么,当停止时背景看起来总是黑色的(移动时是透明的) 以下是我正在使用的图片: 以下是我的listview xml: <ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@android:color/transparent"
android:dividerHeight="3sp"
android:cacheColorHint="#00000000"
/>
以前有人处理过类似的事情吗?我只是一直在尝试使图形背景透明。您尝试添加了吗
android:background="@android:color/transparent"
到列表视图
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@android:color/transparent"
android:background="@android:color/transparent"
android:dividerHeight="3sp"
android:cacheColorHint="#00000000"
/>
android:background="@android:color/transparent"
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@android:color/transparent"
android:background="@android:color/transparent"
android:dividerHeight="3sp"
android:cacheColorHint="#00000000"
/>
plot.setBorderStyle(Plot.BorderStyle.NONE, null, null);
plot.setPlotMargins(0, 0, 0, 0);
plot.setPlotPadding(0, 0, 0, 0);
plot.setGridPadding(0, 0, 0, 0);
plot.setBackgroundColor(Color.WHITE);
plot.getGraphWidget().getBackgroundPaint()
.setColor(Color.WHITE);
plot.getGraphWidget().getGridBackgroundPaint()
.setColor(Color.WHITE);
LayoutManager lm = plot.getLayoutManager();
XYGraphWidget g = plot.getGraphWidget();
// plot = new XYPlot(getApplicationContext(), "",
// Plot.RenderMode.USE_MAIN_THREAD);
g.setGridPaddingLeft(0);
g.setGridPaddingRight(0);
g.setMarginLeft(0);
g.position(-0.5f, XLayoutStyle.RELATIVE_TO_RIGHT,
-0.5f, YLayoutStyle.RELATIVE_TO_BOTTOM,
AnchorPosition.CENTER);
g.setSize(new SizeMetrics(0, SizeLayoutType.FILL, 0,
SizeLayoutType.FILL));