Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
だから基本的に私はボタンを持っていて、それを画面の中央(水平)に配置する代わりに、左隅が中央から始まるように少し離したい. 片側のマージンをハードコーディングすることはできません。それを行う方法はありますか?
aViewと aButtonを横一列に配置し、 とのlayout_weight両方を等しくするViewとButton、ボタンの左隅が中央から始まります
View
Button
layout_weight