Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void OnTabSelected(ActionBar.Tab tab, FragmentTransaction ft)
- {
- DisplayContactFragment(tab);
- }
- private void DisplayContactFragment(ActionBar.Tab tab)
- {
- ContactFragment fragment = new ContactFragment();
- SupportFragmentManager.BeginTransaction().Replace(Resource.Id.fragmentContainer, fragment).Commit();
- }
- -------------------------------------
- public class ContactFragment : Fragment
- {
- public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
- {
- View v = inflater.Inflate(Resource.Layout.Contact, container, false);
- v.LayoutParameters = new ViewGroup.LayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent));
- }
- -------------------------------------
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:fillViewport="true"
- android:layout_height="fill_parent">
- <LinearLayout android:background="#FF0000"
- android:layout_height="0dp" android:layout_width="fill_parent"
- android:layout_weight="1" />
- <LinearLayout android:background="#00FF00"
- android:layout_height="0dp" android:layout_width="fill_parent"
- android:layout_weight="1" />
- </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement