48 lines
1.2 KiB
48 lines
1.2 KiB
9 years ago
|
/*
|
||
|
* Copyright (c) 2016 - present Facebook, Inc.
|
||
|
* All rights reserved.
|
||
|
*
|
||
|
* This source code is licensed under the BSD style license found in the
|
||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||
|
*/
|
||
|
|
||
|
package codetoanalyze.java.checkers;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.os.Bundle;
|
||
|
import android.support.v4.app.Fragment;
|
||
|
import android.view.LayoutInflater;
|
||
|
import android.view.View;
|
||
|
import android.view.ViewGroup;
|
||
|
import android.widget.ListView;
|
||
|
|
||
|
public class FragmentRetainsViewExample extends Fragment {
|
||
|
|
||
|
class CustomView extends ListView {
|
||
|
|
||
|
public CustomView(Context c) {
|
||
|
super(c);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
View mView;
|
||
|
ViewGroup mViewSubclass;
|
||
|
CustomView mCustomView;
|
||
|
|
||
|
@Override
|
||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
|
||
|
mView = inflater.inflate(-1, container, false);
|
||
|
mViewSubclass = (ViewGroup) inflater.inflate(-1, container, false);
|
||
|
mCustomView = (CustomView) inflater.inflate(-1, container, false);
|
||
|
return container;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void onDestroyView() {
|
||
|
// not nulling out anything
|
||
|
}
|
||
|
|
||
|
}
|