Closed egfconnor closed 11 years ago
Hello,
R.id.content is used to add fragments to FrameLayout dynamically so it does mean nothing for ActionsContentView library. It doesn't use any hardcoded ids to work with.
Here is layout you can use as content.xml layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/views_bar"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#ff33b5e5"
android:padding="4dp"
android:text="Hello, I am first view"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#ff0099cc"
android:padding="4dp"
android:text="Hello, I am second view"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_alignParentBottom="true"
android:layout_below="@id/views_bar" />
</RelativeLayout>
I suggest you read android developers articles about work with fragments. Here is link for one of them http://developer.android.com/guide/components/fragments.html
I would like to set a linear layout with a few views and then put a fragment at the bottom of the layout, how would I do this using your library? I'm confused mostly due to not knowing how the fragment transaction knows that R.id.content is only the content part of the ActionsContentView.