blob: d9393ccdfdf251f0a848731805a8d8e9a72eed91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package net.lacolaco.smileessence.view.page;
import android.app.Fragment;
import android.widget.Adapter;
import net.lacolaco.smileessence.Application;
public abstract class PageFragment<T extends Adapter> extends Fragment {
private T adapter;
protected T getAdapter() {
if (adapter == null) throw new IllegalStateException("adapter is not initialized");
return adapter;
}
protected void setAdapter(T _adapter) {
adapter = _adapter;
}
public abstract void refresh();
}
|