Commit bdf84925 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

All subclasses of Fragment must include a public empty constructor.

"The framework will often re-instantiate a fragment class when needed,
in particular during state restore, and needs to be able to find this
constructor to instantiate it. If the empty constructor is not
available, a runtime exception will occur in some cases during state
restore."

https://developer.android.com/reference/android/app/Fragment.html
parent b07e2a84
......@@ -33,6 +33,9 @@ import android.webkit.WebView;
public class AboutLicenceFragment extends Fragment {
public final static String TAG = "VLC/AboutLicenceFragment";
/* All subclasses of Fragment must include a public empty constructor. */
public AboutLicenceFragment() { }
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
......
......@@ -40,6 +40,9 @@ import android.widget.TextView;
public class AboutMainFragment extends Fragment {
public final static String TAG = "VLC/AboutMainFragment";
/* All subclasses of Fragment must include a public empty constructor. */
public AboutMainFragment() { }
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
......
......@@ -53,6 +53,9 @@ public class DirectoryViewFragment extends SherlockListFragment implements ISort
private DirectoryAdapter mDirectoryAdapter;
/* All subclasses of Fragment must include a public empty constructor. */
public DirectoryViewFragment() { }
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......
......@@ -38,6 +38,9 @@ public class HistoryFragment extends SherlockListFragment {
private HistoryAdapter mHistoryAdapter;
/* All subclasses of Fragment must include a public empty constructor. */
public HistoryFragment() { }
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......
......@@ -90,6 +90,9 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
public final static int MODE_SONG = 2;
public final static int MODE_GENRE = 3;
/* All subclasses of Fragment must include a public empty constructor. */
public AudioBrowserFragment() { }
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......
......@@ -69,6 +69,9 @@ public class AudioListFragment extends SherlockListFragment {
public final static String EXTRA_NAME2 = "name2";
public final static String EXTRA_MODE = "mode";
/* All subclasses of Fragment must include a public empty constructor. */
public AudioListFragment() { }
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......
......@@ -81,6 +81,9 @@ public class VideoListFragment extends SherlockListFragment implements ISortable
private MediaLibrary mMediaLibrary;
private ThumbnailerManager mThumbnailerManager;
/* All subclasses of Fragment must include a public empty constructor. */
public VideoListFragment() { }
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment