Да, решение очень похоже на этот вопрос, но вы также хотите установить weightSum родительского LinearLayout:
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_horizontal"
android:padding="6dp"
android:weightSum="2">
<Button
android:id="@+id/buttonCollect"
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="@string/hello"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_weight="1" />
</LinearLayout>