1
是否可以居中使用java創建的使用XML創建的按鈕?用java中心創建一個XML按鈕
我知道他們可以被設置爲不可見:
button1.setVisibility(View.GONE);
基本上,我有一個if語句,我希望它這樣做:
If (possibility == true) {
//center button horizontally and stay the same vertically
}
什麼是按鈕父級佈局? RelativeLayout的? – Jameo
相對佈局 –