Refactored AbstractFragment to not depend on AbstractInfoFragment (#487)

Due to a previous refactoring, dataHolder was still of type
AbstractInfoFragment.DataHolder which should be just DataHolder
in AbstractFragment. Although AbstractInfoFragment inherits from
AbstractFragment the code works. However, on KitKat (4.4) some
devices reported a missing method which might be caused by this "weird"
inheriting. Hopefully this fixes that.
This commit is contained in:
Martijn Brekhof 2017-12-05 10:58:55 +01:00 committed by Synced Synapse
parent 7e519ebd43
commit 2aa4f93aeb
1 changed files with 4 additions and 4 deletions

View File

@ -22,9 +22,9 @@ import android.support.v4.app.Fragment;
public class AbstractFragment extends Fragment {
private AbstractInfoFragment.DataHolder dataHolder;
private DataHolder dataHolder;
public void setDataHolder(AbstractInfoFragment.DataHolder dataHolder) {
public void setDataHolder(DataHolder dataHolder) {
this.dataHolder = dataHolder;
Bundle bundle = getArguments();
if (bundle == null) {
@ -34,7 +34,7 @@ public class AbstractFragment extends Fragment {
}
}
public AbstractInfoFragment.DataHolder getDataHolder() {
public DataHolder getDataHolder() {
return dataHolder;
}
@ -43,7 +43,7 @@ public class AbstractFragment extends Fragment {
super.onCreate(savedInstanceState);
if( this.dataHolder == null ) {
this.dataHolder = new AbstractInfoFragment.DataHolder(-1);
this.dataHolder = new DataHolder(-1);
}
this.dataHolder.setBundle(getArguments());