- Now you can use typed MvpView. Thats allow you write some like this:
interface LoadRefreshView<Data> extends MvpView
{
void showData(Data data)
}
public abstaract class LoadRefreshActivity<Data> extends MvpActivity implements LoadRefreshView<Data>
{
public abstract CustomAdapter<Data> getAdapter();
void showData(Data data)
{
getAdapter().setData(data)
}
}
public class NewsActivity extends LoadRefreshActivity<News>
{
...
}
public class MessagesActivity extends LoadRefreshActivity<Message>
{
...
}
- Changed moment when presenter was destroyed. Caution! Change your base classes similar to MvpActivity and MvpFragment
- Memory optimization(presenter factory doesn't handle reference to default presenter)