レイアウトの背景色の色を比較するifステートメントを作成したいと思います。次のようになります。
RelativeLayout screen = (RelativeLayout) findViewById (R.id.screen);
if(screen.getBackgroundColor() == "#FFFFFFFF"){
//do something...
}
else{
//do something else...
}
背景色の取得方法がわかりません。私は色を設定しています:screen.setBackgroundColor(Color.parseColor("#000000"));