2015-10-22 80 views

回答

0

你只需要從相對佈局得到一個參考,並調用 方法setBackgroundColor()

RelativeLayout layout = (RelativeLayout) findViewById(R.layout.id);  
layout.setBackgroundColor(getResources().getColor(android color or your color)); 
+0

嗨DeKoServidoni,這個代碼僅設置一個佈局的背景顏色? – Poo