What is the exact difference between Adapter and Proxy patterns?

From here: Adapter provides a different interface to its subject. Proxy provides the same interface. You might think of an Adapter as something that should make one thing fit to another that is incompatible if connected directly. When you travel abroad, for example, and need an electrical outlet adapter. Now a Proxy is an object … Read more

Understanding Adapter Pattern

Generally the adapter pattern transforms one interface into another, but it can simply wrap the behavior to isolate your class from the underlying implementation. In your case, you are using an adapter, but you could just as easily have defined the DAO objects to simply implement the interface and programmed against the interface. The adapter … Read more

Best place to addHeaderView in ListFragment

I don’t know if you have solved your problem but here is a solution that worked for me: Do not call ListFragment.setListAdapter() in your ListFragment.onCreate(). Make sure you have a field variable that can hold the header view, maybe like: View mheaderView; Then in your ListFragment.onCreateView(), inflate the header View and assign it to your … Read more