私はカップルの事を試してみましたが、何も作業していない...私はAndroid上でImageViewの上BackgroundColorをを変更しようとしているが、何も起こりません...ここでAndroidでImageViewにBackgroundColorを設定するには?
は私のxmlです:
<ImageView
android:id="@+id/imageView1"
android:layout_width="350dp"
android:layout_height="550dp"
android:layout_above="@+id/btnInfo"
android:layout_alignLeft="@+id/fundo"
android:layout_alignRight="@+id/btnInfo"
android:layout_alignTop="@+id/fundo"
android:layout_centerHorizontal="true"
android:contentDescription="@string/backgroundMain" />
コード:
public void onStart()
{
super.onStart();
Log.d("Teste", "In the onStart() event 5");
ImageView backgroundImg = (ImageView) findViewById(R.id.imageView1);
backgroundImg.setBackgroundColor(Color.rgb(255, 255, 255));
}
私は何が欠けていますか?
を参照してください。多分、白ではなく別の色を設定した場合、私はそれを見ることができます...¬¬さて、私のコードは働いています...ありがとうそれを読む;) – CarinaPilar
私はそれを指摘するつもりだったが、ナアはできないと思った! –