/packages/apps/Car/libs/car-ui-lib/tests/paintbooth/src/com/android/car/ui/paintbooth/toolbar/ |
D | ToolbarActivity.java | 16 package com.android.car.ui.paintbooth.toolbar; 40 import com.android.car.ui.toolbar.MenuItem; 41 import com.android.car.ui.toolbar.TabLayout; 42 import com.android.car.ui.toolbar.Toolbar; 43 import com.android.car.ui.toolbar.ToolbarController; 60 ToolbarController toolbar = CarUi.requireToolbar(this); in onCreate() local 61 toolbar.setTitle(getTitle()); in onCreate() 62 toolbar.setState(Toolbar.State.SUBPAGE); in onCreate() 63 toolbar.setLogo(R.drawable.ic_launcher); in onCreate() 64 toolbar.registerOnBackListener( in onCreate() [all …]
|
/packages/apps/Car/libs/car-ui-lib/tests/robotests/src/com/android/car/ui/toolbar/ |
D | ToolbarTest.java | 17 package com.android.car.ui.toolbar; 108 Toolbar toolbar = new Toolbar(mContext); in hideLogo_andTitleLogo_whenSet_andStateIsHome_andLogoIsDisabled() local 109 toolbar.setState(Toolbar.State.HOME); in hideLogo_andTitleLogo_whenSet_andStateIsHome_andLogoIsDisabled() 110 toolbar.setLogo(R.drawable.test_ic_launcher); in hideLogo_andTitleLogo_whenSet_andStateIsHome_andLogoIsDisabled() 171 Toolbar toolbar = new Toolbar(mContext); in testState_twoRow_withTitle_withTabs() local 172 assertThat(toolbar.isTabsInSecondRow()).isTrue(); in testState_twoRow_withTitle_withTabs() 175 toolbar.setTitle("Test title"); in testState_twoRow_withTitle_withTabs() 176 toolbar.addTab(new TabLayout.Tab(mContext.getDrawable(R.drawable.test_ic_launcher), "Foo")); in testState_twoRow_withTitle_withTabs() 177 toolbar.addTab(new TabLayout.Tab(mContext.getDrawable(R.drawable.test_ic_launcher), "Foo")); in testState_twoRow_withTitle_withTabs() 180 assertThat(toolbar.findViewById(R.id.car_ui_toolbar_tabs).getVisibility()).isEqualTo( in testState_twoRow_withTitle_withTabs() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accounts/ |
D | AccountDetailsFragmentTest.java | 39 import com.android.car.ui.toolbar.Toolbar; 88 Toolbar toolbar = mFragment.requireActivity().requireViewById(R.id.toolbar); in onActivityCreated_titleShouldBeSet() local 89 assertThat(toolbar.getTitle()).isEqualTo(mAccountLabel); in onActivityCreated_titleShouldBeSet() 97 Toolbar toolbar = mFragment.requireActivity().requireViewById(R.id.toolbar); in cannotModifyUsers_removeAccountButtonShouldNotBeVisible() local 98 assertThat(toolbar.getMenuItems()).hasSize(1); in cannotModifyUsers_removeAccountButtonShouldNotBeVisible() 99 assertThat(toolbar.getMenuItems().get(0).isVisible()).isFalse(); in cannotModifyUsers_removeAccountButtonShouldNotBeVisible() 107 Toolbar toolbar = mFragment.requireActivity().requireViewById(R.id.toolbar); in canModifyUsers_removeAccountButtonShouldBeVisible() local 108 assertThat(toolbar.getMenuItems()).hasSize(1); in canModifyUsers_removeAccountButtonShouldBeVisible() 109 assertThat(toolbar.getMenuItems().get(0).isVisible()).isTrue(); in canModifyUsers_removeAccountButtonShouldBeVisible() 117 Toolbar toolbar = mFragment.requireActivity().requireViewById(R.id.toolbar); in onRemoveAccountButtonClicked_canModifyUsers_shouldShowConfirmRemoveAccountDialog() local [all …]
|
D | AccountSettingsFragmentTest.java | 32 import com.android.car.ui.toolbar.Toolbar; 75 Toolbar toolbar = mFragment.requireActivity().requireViewById(R.id.toolbar); in cannotModifyUsers_addAccountButtonShouldNotBeVisible() local 76 assertThat(toolbar.getMenuItems()).hasSize(1); in cannotModifyUsers_addAccountButtonShouldNotBeVisible() 77 assertThat(toolbar.getMenuItems().get(0).isVisible()).isFalse(); in cannotModifyUsers_addAccountButtonShouldNotBeVisible() 85 Toolbar toolbar = mFragment.requireActivity().requireViewById(R.id.toolbar); in canModifyUsers_addAccountButtonShouldBeVisible() local 86 assertThat(toolbar.getMenuItems()).hasSize(1); in canModifyUsers_addAccountButtonShouldBeVisible() 87 assertThat(toolbar.getMenuItems().get(0).isVisible()).isTrue(); in canModifyUsers_addAccountButtonShouldBeVisible() 95 Toolbar toolbar = mFragment.requireActivity().requireViewById(R.id.toolbar); in clickAddAccountButton_shouldOpenChooseAccountFragment() local 96 toolbar.getMenuItems().get(0).performClick(); in clickAddAccountButton_shouldOpenChooseAccountFragment()
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/common/ |
D | DialerBaseFragment.java | 34 import com.android.car.ui.toolbar.Toolbar; 64 Toolbar toolbar = getActivity().findViewById(R.id.car_ui_toolbar); in onViewCreated() local 66 if (toolbar != null) { in onViewCreated() 67 setupToolbar(toolbar); in onViewCreated() 80 protected void setupToolbar(@NonNull Toolbar toolbar) { in setupToolbar() argument 85 toolbarTitle -> toolbar.setTitle(toolbarTitle)); in setupToolbar() 87 toolbar.setState(getToolbarState()); in setupToolbar() 88 toolbar.setLogo(getToolbarState() == Toolbar.State.HOME ? getActivity().getDrawable( in setupToolbar() 91 toolbar.setMenuItems(R.xml.menuitems); in setupToolbar() 95 setToolbarHeight(toolbar); in setupToolbar() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/main/impl/ |
D | MainSearchController.java | 48 import com.android.dialer.main.impl.toolbar.MainToolbar; 49 import com.android.dialer.main.impl.toolbar.SearchBarListener; 85 private final MainToolbar toolbar; field in MainSearchController 109 MainToolbar toolbar, in MainSearchController() argument 115 this.toolbar = toolbar; in MainSearchController() 155 toolbar.slideUp(animate, fragmentContainer); in showDialpad() 156 toolbar.expand(animate, Optional.absent(), /* requestFocus */ false); in showDialpad() 219 toolbar.slideDown(animate, fragmentContainer); in hideDialpad() 220 toolbar.transferQueryFromDialpad(dialpadFragment.getQuery()); in hideDialpad() 282 if (TextUtils.isEmpty(toolbar.getQuery())) { in onSearchListTouch() [all …]
|
D | OldMainActivityPeer.java | 107 import com.android.dialer.main.impl.toolbar.MainToolbar; 288 MainToolbar toolbar = activity.findViewById(R.id.toolbar); in initLayout() local 289 toolbar.maybeShowSimulator(activity); in initLayout() 290 activity.setSupportActionBar(activity.findViewById(R.id.toolbar)); in initLayout() 311 activity, activity.getContentResolver(), bottomNav, toolbar, bottomNavTabListener); in initLayout() 316 bottomNav, fab, toolbar, activity.findViewById(R.id.toolbar_shadow), snackbarContainer); in initLayout() 317 toolbar.setSearchBarListener(searchController); in initLayout() 337 toolbar); in initLayout() 340 toolbar, in initLayout() 905 private final Toolbar toolbar; field in OldMainActivityPeer.MainCallLogFragmentListener [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/search/ |
D | SearchFeatureProviderImplTest.java | 74 final Toolbar toolbar = new Toolbar(mActivity); in initSearchToolbar_hasResolvedInfo_shouldStartCorrectIntent() local 76 toolbar.setNavigationContentDescription("test"); in initSearchToolbar_hasResolvedInfo_shouldStartCorrectIntent() 77 mProvider.initSearchToolbar(mActivity, toolbar, SettingsEnums.TESTING); in initSearchToolbar_hasResolvedInfo_shouldStartCorrectIntent() 79 toolbar.performClick(); in initSearchToolbar_hasResolvedInfo_shouldStartCorrectIntent() 89 final Toolbar toolbar = new Toolbar(mActivity); in initSearchToolbar_noResolvedInfo_shouldNotStartActivity() local 91 toolbar.setNavigationContentDescription("test"); in initSearchToolbar_noResolvedInfo_shouldNotStartActivity() 92 mProvider.initSearchToolbar(mActivity, toolbar, SettingsEnums.TESTING); in initSearchToolbar_noResolvedInfo_shouldNotStartActivity() 94 toolbar.performClick(); in initSearchToolbar_noResolvedInfo_shouldNotStartActivity() 101 final Toolbar toolbar = new Toolbar(mActivity); in initSearchToolbar_deviceNotProvisioned_shouldNotCreateSearchBar() local 103 toolbar.setNavigationContentDescription("test"); in initSearchToolbar_deviceNotProvisioned_shouldNotCreateSearchBar() [all …]
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/contact/ |
D | ContactDetailsFragment.java | 39 import com.android.car.ui.toolbar.Toolbar; 114 Toolbar toolbar = getActivity().findViewById(R.id.car_ui_toolbar); in onContactChanged() local 116 if (toolbar == null) { in onContactChanged() 119 toolbar.setTitle(null); in onContactChanged() 120 toolbar.setLogo(null); in onContactChanged() 122 toolbar.setTitle(contact == null ? getString(R.string.error_contact_deleted) in onContactChanged() 141 toolbar.setLogo(roundedBitmapDrawable); in onContactChanged() 148 toolbar.setLogo(roundedBitmapDrawable); in onContactChanged() 156 protected void setupToolbar(@NonNull Toolbar toolbar) { in setupToolbar() argument 157 toolbar.setState(getToolbarState()); in setupToolbar() [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/common/ |
D | BaseFragment.java | 33 import com.android.car.ui.toolbar.MenuItem; 34 import com.android.car.ui.toolbar.Toolbar; 105 return requireActivity().findViewById(R.id.toolbar); in getToolbar() 129 Toolbar toolbar = getToolbar(); in onActivityCreated() local 130 if (toolbar != null) { in onActivityCreated() 140 toolbar.setTitle(getTitleId()); in onActivityCreated() 141 toolbar.setMenuItems(items); in onActivityCreated() 142 toolbar.setState(getToolbarState()); in onActivityCreated() 143 toolbar.setNavButtonMode(getToolbarNavButtonStyle()); in onActivityCreated()
|
D | SettingsFragment.java | 44 import com.android.car.ui.toolbar.MenuItem; 45 import com.android.car.ui.toolbar.Toolbar; 89 return requireActivity().findViewById(R.id.toolbar); in getToolbar() 186 Toolbar toolbar = requireActivity().findViewById(R.id.toolbar); in onActivityCreated() local 187 if (toolbar != null) { in onActivityCreated() 197 toolbar.setTitle(getPreferenceScreen().getTitle()); in onActivityCreated() 198 toolbar.setMenuItems(items); in onActivityCreated() 199 toolbar.setNavButtonMode(Toolbar.NavButtonMode.BACK); in onActivityCreated() 207 toolbar.setState(Toolbar.State.HOME); in onActivityCreated() 208 toolbar.setLogo(getContext().getResources() in onActivityCreated() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/ |
D | BluetoothDevicePickerFragmentTest.java | 29 import com.android.car.ui.toolbar.Toolbar; 76 Toolbar toolbar = mFragment.requireActivity().findViewById(R.id.toolbar); in onStart_showsProgressBar() local 78 assertThat(toolbar.getProgressBar().getVisibility()).isEqualTo(View.VISIBLE); in onStart_showsProgressBar() 91 Toolbar toolbar = mFragment.requireActivity().findViewById(R.id.toolbar); in onStop_hidesProgressBar() local 92 toolbar.showProgressBar(); in onStop_hidesProgressBar() 96 assertThat(toolbar.getProgressBar().getVisibility()).isEqualTo(View.GONE); in onStop_hidesProgressBar()
|
D | BluetoothPairingSelectionFragmentTest.java | 35 import com.android.car.ui.toolbar.Toolbar; 101 Toolbar toolbar = mFragment.requireActivity().findViewById(R.id.toolbar); in onStart_showsProgressBar() local 103 assertThat(toolbar.getProgressBar().getVisibility()).isEqualTo(View.VISIBLE); in onStart_showsProgressBar() 126 Toolbar toolbar = mFragment.requireActivity().findViewById(R.id.toolbar); in onStop_hidesProgressBar() local 127 toolbar.showProgressBar(); in onStop_hidesProgressBar() 131 assertThat(toolbar.getProgressBar().getVisibility()).isEqualTo(View.GONE); in onStop_hidesProgressBar()
|
D | BluetoothDeviceDetailsFragmentTest.java | 36 import com.android.car.ui.toolbar.MenuItem; 37 import com.android.car.ui.toolbar.Toolbar; 203 Toolbar toolbar = activity.requireViewById(R.id.toolbar); in findForgetButton() local 204 return toolbar.getMenuItems().get(1); in findForgetButton() 208 Toolbar toolbar = activity.requireViewById(R.id.toolbar); in findConnectionButton() local 209 return toolbar.getMenuItems().get(0); in findConnectionButton()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/network/ |
D | MobileNetworkFragmentTest.java | 29 import com.android.car.ui.toolbar.Toolbar; 72 Toolbar toolbar = mFragment.requireActivity().findViewById(R.id.toolbar); in onMobileNetworkUpdated_startWithArgument_updateTitle() local 73 assertThat(toolbar.getTitle()).isEqualTo(TEST_NAME); in onMobileNetworkUpdated_startWithArgument_updateTitle() 87 Toolbar toolbar = mFragment.requireActivity().findViewById(R.id.toolbar); in onMobileNetworkUpdated_noArgumentProvided_updateTitle() local 88 assertThat(toolbar.getTitle()).isEqualTo(TEST_NAME + "_1"); in onMobileNetworkUpdated_noArgumentProvided_updateTitle()
|
/packages/apps/Car/libs/car-ui-lib/src/com/android/car/ui/preference/ |
D | MultiSelectListPreferenceFragment.java | 37 import com.android.car.ui.toolbar.Toolbar; 77 final Toolbar toolbar = view.requireViewById(R.id.toolbar); in onViewCreated() local 79 recyclerView.setPadding(0, toolbar.getHeight(), 0, 0); in onViewCreated() 80 toolbar.registerToolbarHeightChangeListener(newHeight -> { in onViewCreated() 93 toolbar.setTitle(mPreference.getTitle()); in onViewCreated() 135 toolbar.registerOnBackListener(() -> { in onViewCreated()
|
D | ListPreferenceFragment.java | 38 import com.android.car.ui.toolbar.Toolbar; 76 final Toolbar toolbar = view.requireViewById(R.id.toolbar); in onViewCreated() local 78 carUiRecyclerView.setPadding(0, toolbar.getHeight(), 0, 0); in onViewCreated() 79 toolbar.registerToolbarHeightChangeListener(newHeight -> { in onViewCreated() 91 toolbar.setTitle(mPreference.getTitle()); in onViewCreated() 132 toolbar.registerOnBackListener(() -> { in onViewCreated()
|
D | PreferenceFragment.java | 45 import com.android.car.ui.toolbar.Toolbar; 46 import com.android.car.ui.toolbar.ToolbarController; 86 final Toolbar toolbar = view.findViewById(R.id.toolbar); in onViewCreated() local 87 if (recyclerView == null || toolbar == null) { in onViewCreated() 91 recyclerView.setPadding(0, toolbar.getHeight(), 0, 0); in onViewCreated() 92 toolbar.registerToolbarHeightChangeListener(newHeight -> { in onViewCreated() 104 toolbar.setTitle(getPreferenceScreen().getTitle()); in onViewCreated()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/ |
D | SettingsFragmentTest.java | 41 import com.android.car.ui.toolbar.Toolbar; 234 Toolbar toolbar = otherFragment.requireActivity().requireViewById(R.id.toolbar); in onActivityCreated_hasAppIconIfRoot() local 236 assertThat(toolbar.getState()).isEquivalentAccordingToCompareTo(Toolbar.State.HOME); in onActivityCreated_hasAppIconIfRoot() 249 Toolbar toolbar = otherFragment2.requireActivity().requireViewById(R.id.toolbar); in onActivityCreated_hasBackArrowIconIfNotRoot() local 251 assertThat(toolbar.getState()).isEquivalentAccordingToCompareTo(Toolbar.State.SUBPAGE); in onActivityCreated_hasBackArrowIconIfNotRoot() 252 assertThat(toolbar.getNavButtonMode()).isEquivalentAccordingToCompareTo( in onActivityCreated_hasBackArrowIconIfNotRoot()
|
/packages/apps/Car/libs/car-ui-lib/tests/paintbooth/src/com/android/car/ui/paintbooth/widgets/ |
D | WidgetActivity.java | 24 import com.android.car.ui.toolbar.Toolbar; 25 import com.android.car.ui.toolbar.ToolbarController; 36 ToolbarController toolbar = CarUi.requireToolbar(this); in onCreate() local 37 toolbar.setTitle(getTitle()); in onCreate() 38 toolbar.setState(Toolbar.State.SUBPAGE); in onCreate()
|
/packages/apps/Car/libs/car-ui-lib/tests/paintbooth/src/com/android/car/ui/paintbooth/caruirecyclerview/ |
D | GridCarUiRecyclerViewActivity.java | 27 import com.android.car.ui.toolbar.Toolbar; 28 import com.android.car.ui.toolbar.ToolbarController; 43 ToolbarController toolbar = CarUi.requireToolbar(this); in onCreate() local 44 toolbar.setTitle(getTitle()); in onCreate() 45 toolbar.setState(Toolbar.State.SUBPAGE); in onCreate()
|
D | CarUiRecyclerViewActivity.java | 29 import com.android.car.ui.toolbar.Toolbar; 30 import com.android.car.ui.toolbar.ToolbarController; 46 ToolbarController toolbar = CarUi.requireToolbar(this); in onCreate() local 47 toolbar.setTitle(getTitle()); in onCreate() 48 toolbar.setState(Toolbar.State.SUBPAGE); in onCreate()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/search/ |
D | SearchFeatureProvider.java | 65 default void initSearchToolbar(Activity activity, Toolbar toolbar, int pageId) { in initSearchToolbar() argument 66 if (activity == null || toolbar == null) { in initSearchToolbar() 72 final ViewGroup parent = (ViewGroup) toolbar.getParent(); in initSearchToolbar() 82 final View navView = toolbar.getNavigationView(); in initSearchToolbar() 87 toolbar.setOnClickListener(tb -> { in initSearchToolbar()
|
/packages/apps/Settings/src/com/android/settings/search/ |
D | SearchFeatureProvider.java | 65 default void initSearchToolbar(Activity activity, Toolbar toolbar, int pageId) { in initSearchToolbar() argument 66 if (activity == null || toolbar == null) { in initSearchToolbar() 72 final ViewGroup parent = (ViewGroup) toolbar.getParent(); in initSearchToolbar() 82 final View navView = toolbar.getNavigationView(); in initSearchToolbar() 87 toolbar.setOnClickListener(tb -> { in initSearchToolbar()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/storage/ |
D | AppStorageSettingsDetailsFragmentTest.java | 48 import com.android.car.ui.toolbar.MenuItem; 49 import com.android.car.ui.toolbar.Toolbar; 309 Toolbar toolbar = activity.requireViewById(R.id.toolbar); in findClearCacheButton() local 310 return toolbar.getMenuItems().get(1); in findClearCacheButton() 314 Toolbar toolbar = activity.requireViewById(R.id.toolbar); in findClearStorageButton() local 315 return toolbar.getMenuItems().get(0); in findClearStorageButton()
|