如何在RelativeLayout中编程设置android:orientation =“horizontal”,如下所示:
<RelativeLayout
android:id="@+id/ID"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
</RelativeLayout>
目前为止,这就是我所拥有的内容:
RelativeLayout rLayout = new RelativeLayout(getActivity());
LayoutParams layoutParams;
layoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
rLayout.setLayoutParams(layoutParams);