Search in sources :

Example 1 with SpinnerInterface

use of com.android.settings.datausage.CycleAdapter.SpinnerInterface in project android_packages_apps_Settings by LineageOS.

the class DataUsageList method onViewCreated.

@Override
public void onViewCreated(View v, Bundle savedInstanceState) {
    super.onViewCreated(v, savedInstanceState);
    mHeader = setPinnedHeaderView(R.layout.apps_filter_spinner);
    mHeader.findViewById(R.id.filter_settings).setOnClickListener(btn -> {
        final Bundle args = new Bundle();
        args.putParcelable(DataUsageList.EXTRA_NETWORK_TEMPLATE, mTemplate);
        startFragment(DataUsageList.this, BillingCycleSettings.class.getName(), R.string.billing_cycle, 0, args);
    });
    mCycleSpinner = mHeader.findViewById(R.id.filter_spinner);
    mCycleAdapter = new CycleAdapter(mCycleSpinner.getContext(), new SpinnerInterface() {

        @Override
        public void setAdapter(CycleAdapter cycleAdapter) {
            mCycleSpinner.setAdapter(cycleAdapter);
        }

        @Override
        public void setOnItemSelectedListener(OnItemSelectedListener listener) {
            mCycleSpinner.setOnItemSelectedListener(listener);
        }

        @Override
        public Object getSelectedItem() {
            return mCycleSpinner.getSelectedItem();
        }

        @Override
        public void setSelection(int position) {
            mCycleSpinner.setSelection(position);
        }
    }, mCycleListener, true);
    mLoadingViewController = new LoadingViewController(getView().findViewById(R.id.loading_container), getListView());
    mLoadingViewController.showLoadingViewDelayed();
}
Also used : Bundle(android.os.Bundle) SpinnerInterface(com.android.settings.datausage.CycleAdapter.SpinnerInterface) OnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener) LoadingViewController(com.android.settings.widget.LoadingViewController)

Example 2 with SpinnerInterface

use of com.android.settings.datausage.CycleAdapter.SpinnerInterface in project android_packages_apps_Settings by SudaMod.

the class DataUsageList method onViewCreated.

@Override
public void onViewCreated(View v, Bundle savedInstanceState) {
    super.onViewCreated(v, savedInstanceState);
    mHeader = setPinnedHeaderView(R.layout.apps_filter_spinner);
    mHeader.findViewById(R.id.filter_settings).setOnClickListener(btn -> {
        final Bundle args = new Bundle();
        args.putParcelable(DataUsageList.EXTRA_NETWORK_TEMPLATE, mTemplate);
        startFragment(DataUsageList.this, BillingCycleSettings.class.getName(), R.string.billing_cycle, 0, args);
    });
    mCycleSpinner = mHeader.findViewById(R.id.filter_spinner);
    mCycleAdapter = new CycleAdapter(mCycleSpinner.getContext(), new SpinnerInterface() {

        @Override
        public void setAdapter(CycleAdapter cycleAdapter) {
            mCycleSpinner.setAdapter(cycleAdapter);
        }

        @Override
        public void setOnItemSelectedListener(OnItemSelectedListener listener) {
            mCycleSpinner.setOnItemSelectedListener(listener);
        }

        @Override
        public Object getSelectedItem() {
            return mCycleSpinner.getSelectedItem();
        }

        @Override
        public void setSelection(int position) {
            mCycleSpinner.setSelection(position);
        }
    }, mCycleListener, true);
    mLoadingViewController = new LoadingViewController(getView().findViewById(R.id.loading_container), getListView());
    mLoadingViewController.showLoadingViewDelayed();
}
Also used : Bundle(android.os.Bundle) SpinnerInterface(com.android.settings.datausage.CycleAdapter.SpinnerInterface) OnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener) LoadingViewController(com.android.settings.widget.LoadingViewController)

Example 3 with SpinnerInterface

use of com.android.settings.datausage.CycleAdapter.SpinnerInterface in project platform_packages_apps_Settings by BlissRoms.

the class DataUsageList method onViewCreated.

@Override
public void onViewCreated(View v, Bundle savedInstanceState) {
    super.onViewCreated(v, savedInstanceState);
    mHeader = setPinnedHeaderView(R.layout.apps_filter_spinner);
    mHeader.findViewById(R.id.filter_settings).setOnClickListener(btn -> {
        final Bundle args = new Bundle();
        args.putParcelable(DataUsageList.EXTRA_NETWORK_TEMPLATE, mTemplate);
        startFragment(DataUsageList.this, BillingCycleSettings.class.getName(), R.string.billing_cycle, 0, args);
    });
    mCycleSpinner = mHeader.findViewById(R.id.filter_spinner);
    mCycleAdapter = new CycleAdapter(mCycleSpinner.getContext(), new SpinnerInterface() {

        @Override
        public void setAdapter(CycleAdapter cycleAdapter) {
            mCycleSpinner.setAdapter(cycleAdapter);
        }

        @Override
        public void setOnItemSelectedListener(OnItemSelectedListener listener) {
            mCycleSpinner.setOnItemSelectedListener(listener);
        }

        @Override
        public Object getSelectedItem() {
            return mCycleSpinner.getSelectedItem();
        }

        @Override
        public void setSelection(int position) {
            mCycleSpinner.setSelection(position);
        }
    }, mCycleListener, true);
    mLoadingViewController = new LoadingViewController(getView().findViewById(R.id.loading_container), getListView());
    mLoadingViewController.showLoadingViewDelayed();
}
Also used : Bundle(android.os.Bundle) SpinnerInterface(com.android.settings.datausage.CycleAdapter.SpinnerInterface) OnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener) LoadingViewController(com.android.settings.widget.LoadingViewController)

Example 4 with SpinnerInterface

use of com.android.settings.datausage.CycleAdapter.SpinnerInterface in project android_packages_apps_Settings by DirtyUnicorns.

the class DataUsageList method onViewCreated.

@Override
public void onViewCreated(View v, Bundle savedInstanceState) {
    super.onViewCreated(v, savedInstanceState);
    mHeader = setPinnedHeaderView(R.layout.apps_filter_spinner);
    mHeader.findViewById(R.id.filter_settings).setOnClickListener(btn -> {
        final Bundle args = new Bundle();
        args.putParcelable(DataUsageList.EXTRA_NETWORK_TEMPLATE, mTemplate);
        startFragment(DataUsageList.this, BillingCycleSettings.class.getName(), R.string.billing_cycle, 0, args);
    });
    mCycleSpinner = mHeader.findViewById(R.id.filter_spinner);
    mCycleAdapter = new CycleAdapter(mCycleSpinner.getContext(), new SpinnerInterface() {

        @Override
        public void setAdapter(CycleAdapter cycleAdapter) {
            mCycleSpinner.setAdapter(cycleAdapter);
        }

        @Override
        public void setOnItemSelectedListener(OnItemSelectedListener listener) {
            mCycleSpinner.setOnItemSelectedListener(listener);
        }

        @Override
        public Object getSelectedItem() {
            return mCycleSpinner.getSelectedItem();
        }

        @Override
        public void setSelection(int position) {
            mCycleSpinner.setSelection(position);
        }
    }, mCycleListener, true);
    mLoadingViewController = new LoadingViewController(getView().findViewById(R.id.loading_container), getListView());
    mLoadingViewController.showLoadingViewDelayed();
}
Also used : Bundle(android.os.Bundle) SpinnerInterface(com.android.settings.datausage.CycleAdapter.SpinnerInterface) OnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener) LoadingViewController(com.android.settings.widget.LoadingViewController)

Example 5 with SpinnerInterface

use of com.android.settings.datausage.CycleAdapter.SpinnerInterface in project android_packages_apps_Settings by crdroidandroid.

the class DataUsageList method onViewCreated.

@Override
public void onViewCreated(View v, Bundle savedInstanceState) {
    super.onViewCreated(v, savedInstanceState);
    mHeader = setPinnedHeaderView(R.layout.apps_filter_spinner);
    mHeader.findViewById(R.id.filter_settings).setOnClickListener(btn -> {
        final Bundle args = new Bundle();
        args.putParcelable(DataUsageList.EXTRA_NETWORK_TEMPLATE, mTemplate);
        startFragment(DataUsageList.this, BillingCycleSettings.class.getName(), R.string.billing_cycle, 0, args);
    });
    mCycleSpinner = mHeader.findViewById(R.id.filter_spinner);
    mCycleAdapter = new CycleAdapter(mCycleSpinner.getContext(), new SpinnerInterface() {

        @Override
        public void setAdapter(CycleAdapter cycleAdapter) {
            mCycleSpinner.setAdapter(cycleAdapter);
        }

        @Override
        public void setOnItemSelectedListener(OnItemSelectedListener listener) {
            mCycleSpinner.setOnItemSelectedListener(listener);
        }

        @Override
        public Object getSelectedItem() {
            return mCycleSpinner.getSelectedItem();
        }

        @Override
        public void setSelection(int position) {
            mCycleSpinner.setSelection(position);
        }
    }, mCycleListener, true);
    mLoadingViewController = new LoadingViewController(getView().findViewById(R.id.loading_container), getListView());
    mLoadingViewController.showLoadingViewDelayed();
}
Also used : Bundle(android.os.Bundle) SpinnerInterface(com.android.settings.datausage.CycleAdapter.SpinnerInterface) OnItemSelectedListener(android.widget.AdapterView.OnItemSelectedListener) LoadingViewController(com.android.settings.widget.LoadingViewController)

Aggregations

Bundle (android.os.Bundle)7 OnItemSelectedListener (android.widget.AdapterView.OnItemSelectedListener)7 SpinnerInterface (com.android.settings.datausage.CycleAdapter.SpinnerInterface)7 LoadingViewController (com.android.settings.widget.LoadingViewController)7 SubSettingLauncher (com.android.settings.core.SubSettingLauncher)2 View (android.view.View)1 AccessibilityDelegate (android.view.View.AccessibilityDelegate)1 AdapterView (android.widget.AdapterView)1 ImageView (android.widget.ImageView)1