0
首先listview是GONE然後它會變得可見,當我點擊一個按鈕,但即時通訊只有在移動設備與Android 3.1列表視圖不顯示。我嘗試使用cachecolorhint#00000000,但它不起作用。我正在用Xamarin開發。對話框中的黑色屏幕ListView Xamarin Android
誤差圖像: http://i471.photobucket.com/albums/rr77/lithium1818/Android_20140924.png
C#代碼:
public void VisibilidadBloqueResultado(bool visible)
{
resultado.Visibility = visible == true ? ViewStates.Visible : ViewStates.Gone;
}
後我設置listVisible我設置德適配器
adapter = new ListVisitaEmpresasAdapter(atx1, lista);
empresas.Adapter = adapter;
empresas.ItemClick += empresas_ItemClick;
XML代碼:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:p1="http://schemas.android.com/apk/res/android"
p1:orientation="vertical"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="300dip"
p1:layout_height="wrap_content"
p1:id="@+id/linearLayout1"
p1:paddingTop="5dip"
p1:paddingRight="5dip"
p1:paddingBottom="5dip"
p1:paddingLeft="5dip">
<LinearLayout
p1:orientation="horizontal"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/linearLayout2"
p1:background="@color/portada">
<TextView
p1:text="Programar Visita"
p1:textAppearance="?android:attr/textAppearanceLarge"
p1:layout_width="300dip"
p1:layout_height="match_parent"
p1:id="@+id/txt_titulo"
p1:gravity="center_vertical"
p1:paddingRight="10dip"
p1:textColor="#FFFFFF"
p1:paddingLeft="10dip"
p1:textStyle="bold" />
</LinearLayout>
<ScrollView
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="match_parent"
p1:id="@+id/scrollView1">
<LinearLayout
p1:orientation="vertical"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="match_parent"
p1:id="@+id/linearLayout10"
p1:background="@color/fondo">
<LinearLayout
p1:orientation="vertical"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/Block_Descripcion">
<WebView
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/web_content"
p1:minHeight="1dip" />
</LinearLayout>
<LinearLayout
p1:orientation="vertical"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/lay_seleccion">
<LinearLayout
p1:orientation="horizontal"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/linearLayout4">
<TextView
p1:text="Ruta: "
p1:textAppearance="?android:attr/textAppearanceMedium"
p1:layout_width="wrap_content"
p1:layout_height="match_parent"
p1:id="@+id/textView1"
p1:textColor="#000000"
p1:gravity="center_vertical"
p1:textStyle="bold" />
<Spinner
p1:layout_width="match_parent"
p1:layout_height="match_parent"
p1:id="@+id/sp_zona" />
</LinearLayout>
<LinearLayout
p1:orientation="vertical"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/linearLayout5"
p1:layout_marginTop="5dip"
p1:layout_marginBottom="2dip">
<EditText
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/edt_buscar"
p1:hint="No. Cliente o Nombre " />
</LinearLayout>
<LinearLayout
p1:orientation="vertical"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/linearLayout7">
<Button
p1:text="Buscar"
p1:layout_width="wrap_content"
p1:layout_height="wrap_content"
p1:id="@+id/btn_search"
p1:layout_gravity="right"
p1:textColor="#000000"
p1:textStyle="bold"
p1:layout_marginRight="5dip" />
</LinearLayout>
</LinearLayout>
<LinearLayout
p1:orientation="vertical"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/lay_progress"
p1:visibility="gone">
<ProgressBar
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/progressBar1" />
<TextView
p1:text="Obteniendo resultados..."
p1:textAppearance="?android:attr/textAppearanceSmall"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/textView2"
p1:gravity="center_horizontal"
p1:textColor="#000000" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
p1:orientation="vertical"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/lay_resultados"
p1:visibility="gone"
p1:background="@color/fondocobranza">
<LinearLayout
p1:orientation="horizontal"
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="wrap_content"
p1:id="@+id/linearLayout9">
<Button
p1:text="Modificar"
p1:layout_width="wrap_content"
p1:layout_height="match_parent"
p1:id="@+id/btn_modificar"
p1:textColor="#000000"
p1:textStyle="bold" />
<EditText
p1:layout_width="match_parent"
p1:layout_height="match_parent"
p1:id="@+id/edt_filter"
p1:hint="Filtar resultados"
p1:layout_marginLeft="3dip" />
</LinearLayout>
<ListView
p1:minWidth="25px"
p1:minHeight="25px"
p1:layout_width="match_parent"
p1:layout_height="match_parent"
p1:id="@+id/list_empresas"
p1:cacheColorHint="#00000000" />
</LinearLayout>
</LinearLayout>
很難幫助沒有代碼和XML你知道嗎? – 2014-09-24 16:52:57
我剛剛發佈了XML代碼 – CheckM 2014-09-24 17:08:56
您能告訴我們如何將listview可見性設置爲可見? – 2014-09-24 17:18:53