I use fragments in my application. This is my first snippet that simply inflates an XML file:
public class FragmentA extends SherlockFragment { Context myContext,appContext; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
and this is the left_panel.xml file containing the fragment:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <fragment android:id="@+id/titles" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_weight="1" class="com.example.sample.ListFrag" /> </LinearLayout>
This is my ListFrag class:
public class ListFrag extends Fragment { Context myContext,appContext; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
I don't know how to pass Bundle arguments from FragmentA to ListFrag.
android android-fragments
Vikky Jun 12 '13 at 10:37 2013-06-12 10:37
source share