Code example for SparseBooleanArray

0
     
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        mGroupIdToExpandedMap = new SparseBooleanArray();
    } 
     
    @Override 
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         
        View view = inflater.inflate(R.layout.stats_expandable_list_fragment, container, false);
         
        mEntryLabel = (TextView) view.findViewById(R.id.stats_list_entry_label);
        mEntryLabel.setText(getEntryLabelResId());
        mTotalsLabel = (TextView) view.findViewById(R.id.stats_list_totals_label);
        mTotalsLabel.setText(getTotalsLabelResId());
        mEmptyLabel = (TextView) view.findViewById(R.id.stats_list_empty_text);
        mEmptyLabel.setText(Html.fromHtml(getString(getEmptyLabelResId())));
        configureEmptyLabel();