Search in sources :

Example 1 with ExpandableListView

use of com.thebluealliance.androidclient.views.ExpandableListView in project the-blue-alliance-android by the-blue-alliance.

the class ExpandableListViewFragment method onCreateView.

@Override
@Nullable
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.expandable_list_view_with_spinner, null);
    mBinder.setRootView(v);
    mExpandableListView = (ExpandableListView) v.findViewById(R.id.expandable_list);
    ProgressBar progressBar = (ProgressBar) v.findViewById(R.id.progress);
    if (mAdapter != null) {
        mExpandableListView.setAdapter(mAdapter);
        mExpandableListView.onRestoreInstanceState(mListState);
        mExpandableListView.setSelection(mFirstVisiblePosition);
        progressBar.setVisibility(View.GONE);
    }
    mBinder.setNoDataView((NoDataView) v.findViewById(R.id.no_data));
    return v;
}
Also used : ExpandableListView(com.thebluealliance.androidclient.views.ExpandableListView) NoDataView(com.thebluealliance.androidclient.views.NoDataView) View(android.view.View) ProgressBar(android.widget.ProgressBar) Nullable(androidx.annotation.Nullable)

Example 2 with ExpandableListView

use of com.thebluealliance.androidclient.views.ExpandableListView in project the-blue-alliance-android by the-blue-alliance.

the class EventMatchesFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.expandable_list_view_with_spinner, null);
    mBinder.setRootView(v);
    mListView = (ExpandableListView) v.findViewById(R.id.expandable_list);
    ProgressBar progressBar = (ProgressBar) v.findViewById(R.id.progress);
    mBinder.setNoDataView((NoDataView) v.findViewById(R.id.no_data));
    if (mAdapter != null) {
        mListView.setAdapter(mAdapter);
        mListView.onRestoreInstanceState(mListState);
        mListView.setSelection(mFirstVisiblePosition);
        progressBar.setVisibility(View.GONE);
    }
    return v;
}
Also used : ExpandableListView(com.thebluealliance.androidclient.views.ExpandableListView) NoDataView(com.thebluealliance.androidclient.views.NoDataView) View(android.view.View) ProgressBar(android.widget.ProgressBar)

Aggregations

View (android.view.View)2 ProgressBar (android.widget.ProgressBar)2 ExpandableListView (com.thebluealliance.androidclient.views.ExpandableListView)2 NoDataView (com.thebluealliance.androidclient.views.NoDataView)2 Nullable (androidx.annotation.Nullable)1