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.
LinearLayout を使用して 2 つのボタンを水平方向に並べて配置していますが、各ボタンのサイズを調整して、水平方向のスペースの 50% を使用したいと考えています。各ボタンのlayout_weightを「1」にすればうまくいくと思いましたが、layout_widthを変更する必要があるのでしょうか?
layout_width各ボタンの を に設定してから、あなたが言及したトリックを0px使用します。layout_weight=1
layout_width
0px
layout_weight=1