new project FlexibleUI
add FragmentA,B & fragment_a,b & AnotherActivity & activity_another ,and  layout-land & activity_main.xml
Interface Communicator in FragmentA, and FragmentManager in MainActivity
MainActivity implements Communicator, then f1 can use it
FlexibleUI complete ,but it doesn't work
new project ListFragment
add MyListFragment.java & my_list_fragment.xml
modify listView id

@+id/listView1 => @android:id/list
because the specified id can be found When Android in RunTime state
modify textView id, and use ArrayAdapter
MyListFragment implements AdapterView.OnItemClickListener
fragment tag put into activity_main.xml
Another way to use ArrayAdapter
new project DialogFragment
add MyDialog & my_dialog

Because the DialogFragment is completely separate window from your
MainActivity, so you don't need to have the ViewGroup parent.

View rootView = inflater.inflate(R.layout.my_dialog, null);
implements OnClickListener
Another way to implement the result

This way is better than before, because we always want to send some
messages back to MainActivity.The First way is only deal with the
message in Fragment
new project AlertDialog