/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/androidTest/java/com/android/car/ui/toolbar/ |
D | ToolbarTest.java | 17 package com.android.car.ui.toolbar; 78 runWithToolbar((toolbar) -> toolbar.setTitle("Test title")); in test_setTitle_displaysTitle() 84 runWithToolbar(toolbar -> toolbar.setTitle(R.string.test_string_test_title)); in test_setTitle_displaysTitle() 87 runWithToolbar(toolbar -> toolbar.setTitle(0)); in test_setTitle_displaysTitle() 97 runWithToolbar((toolbar) -> { in test_setTitle_null_returns_nonNull() argument 98 toolbar.setTitle(null); in test_setTitle_null_returns_nonNull() 99 getTitleResult[0] = toolbar.getTitle(); in test_setTitle_null_returns_nonNull() 111 runWithToolbar((toolbar) -> { in test_setSubtitle_null_returns_nonNull() argument 112 toolbar.setSubtitle(null); in test_setSubtitle_null_returns_nonNull() 113 getTitleResult[0] = toolbar.getSubtitle(); in test_setSubtitle_null_returns_nonNull() [all …]
|
D | ToolbarSearchTest.java | 16 package com.android.car.ui.toolbar; 78 runWithToolbar(toolbar -> toolbar.setSearchQuery("Hello, world!")); in test_setSearchQueryBeforeSearchMode_doesNothing() 84 runWithToolbar(toolbar -> { in test_setSearchQueryAfterSearchMode_showsQuery() 85 toolbar.setSearchMode(mSearchMode); in test_setSearchQueryAfterSearchMode_showsQuery() 86 toolbar.setSearchQuery("Hello, world!"); in test_setSearchQueryAfterSearchMode_showsQuery() 96 runWithToolbar(toolbar -> { in test_registerSearchListeners_callsListeners() 97 toolbar.setSearchMode(mSearchMode); in test_registerSearchListeners_callsListeners() 98 toolbar.registerSearchListener(searchListener); in test_registerSearchListeners_callsListeners() 99 toolbar.registerSearchCompletedListener(searchCompletedListener); in test_registerSearchListeners_callsListeners() 113 runWithToolbar(toolbar -> { in test_setSearchIcon_showsIcon() [all …]
|
D | ToolbarMenuItemsTest.java | 16 package com.android.car.ui.toolbar; 92 runWithActivityAndToolbar((activity, toolbar) -> { in menuItems_findMenuItemById_shouldWork() argument 97 toolbar.setMenuItems(Collections.singletonList(menuItem[0])); in menuItems_findMenuItemById_shouldWork() 98 foundMenuItem[0] = toolbar.requireMenuItemById(5); in menuItems_findMenuItemById_shouldWork() 108 runWithActivityAndToolbar((activity, toolbar) -> { in menuItems_text_shouldShow() argument 113 toolbar.setMenuItems(Collections.singletonList(menuItem[0])); in menuItems_text_shouldShow() 127 runWithActivityAndToolbar((activity, toolbar) -> { in menuItems_icon_shouldShow() argument 133 toolbar.setMenuItems(Collections.singletonList(menuItem[0])); in menuItems_icon_shouldShow() 154 runWithActivityAndToolbar((activity, toolbar) -> { in menuItems_textAndIcon_shouldShow() argument 161 toolbar.setMenuItems(Collections.singletonList(menuItem[0])); in menuItems_textAndIcon_shouldShow() [all …]
|
D | ToolbarTabDeprecatedTest.java | 16 package com.android.car.ui.toolbar; 69 runWithToolbar(toolbar -> { in test_addTab_works() 70 toolbar.addTab(tabs.get(0)); in test_addTab_works() 71 toolbar.addTab(tabs.get(1)); in test_addTab_works() 72 toolbar.registerOnTabSelectedListener(tabSelectedListener); in test_addTab_works() 92 runWithToolbar(toolbar -> tabCount[0] = toolbar.getTabCount()); in test_getTabCountAndClearTabs_works() 95 runWithToolbar(toolbar -> { in test_getTabCountAndClearTabs_works() 96 toolbar.addTab(new TabLayout.Tab(null, "Tab 1")); in test_getTabCountAndClearTabs_works() 97 toolbar.addTab(new TabLayout.Tab(null, "Tab 2")); in test_getTabCountAndClearTabs_works() 98 tabCount[0] = toolbar.getTabCount(); in test_getTabCountAndClearTabs_works() [all …]
|
D | InstallBaseLayoutAroundTest.java | 16 package com.android.car.ui.toolbar; 68 ToolbarController[] toolbar = new ToolbarController[] { null }; in test_installBaseLayoutAround_createsToolbar() local 71 toolbar[0] = CarUi.installBaseLayoutAround( in test_installBaseLayoutAround_createsToolbar() 75 if (toolbar[0] != null) { in test_installBaseLayoutAround_createsToolbar() 76 toolbar[0].setTitle("Hello, world!"); in test_installBaseLayoutAround_createsToolbar() 80 assertNotNull(toolbar[0]); in test_installBaseLayoutAround_createsToolbar() 93 ToolbarController[] toolbar = new ToolbarController[] { null }; in test_installBaseLayoutAround_doesntCreateToolbar() local 95 toolbar[0] = CarUi.installBaseLayoutAround( in test_installBaseLayoutAround_doesntCreateToolbar() 100 assertNull(toolbar[0]); in test_installBaseLayoutAround_doesntCreateToolbar() 110 ToolbarController[] toolbar = new ToolbarController[] { new EmptyToolbarController() }; in test_emptyactivity_doesnthaveinsetsortoolbar() local [all …]
|
D | ToolbarTabTest.java | 16 package com.android.car.ui.toolbar; 95 runWithToolbar(toolbar -> toolbar.setTabs(tabs)); in test_setTabs_areShown() 123 runWithToolbar(toolbar -> { in test_selectTab_works() 124 toolbar.setTabs(tabs); in test_selectTab_works() 125 toolbar.selectTab(1); in test_selectTab_works() 133 runWithToolbar(toolbar -> { in test_clearAllTabs_works() 134 toolbar.setTabs(Arrays.asList( in test_clearAllTabs_works() 141 toolbar.clearAllTabs(); in test_clearAllTabs_works() 150 ToolbarController toolbar = CarUi.requireToolbar(activity); in runWithToolbar() 151 toRun.accept(toolbar); in runWithToolbar()
|
/packages/apps/Car/libs/car-ui-lib/paintbooth/src/main/java/com/android/car/ui/paintbooth/toolbar/ |
D | ToolbarActivity.java | 16 package com.android.car.ui.paintbooth.toolbar; 42 import com.android.car.ui.toolbar.MenuItem; 43 import com.android.car.ui.toolbar.NavButtonMode; 44 import com.android.car.ui.toolbar.SearchMode; 45 import com.android.car.ui.toolbar.TabLayout; 46 import com.android.car.ui.toolbar.Toolbar; 47 import com.android.car.ui.toolbar.Toolbar.State; 48 import com.android.car.ui.toolbar.ToolbarController; 65 ToolbarController toolbar = CarUi.requireToolbar(this); in onCreate() local 66 toolbar.setTitle(getTitle()); in onCreate() [all …]
|
/packages/apps/Car/libs/car-ui-lib/paintbooth/src/main/java/com/android/car/ui/paintbooth/widescreenime/ |
D | WideScreenTestView.java | 31 import com.android.car.ui.toolbar.MenuItem; 32 import com.android.car.ui.toolbar.NavButtonMode; 33 import com.android.car.ui.toolbar.SearchConfig; 34 import com.android.car.ui.toolbar.SearchMode; 35 import com.android.car.ui.toolbar.ToolbarController; 51 ToolbarController toolbar = CarUi.requireToolbar(this); in onCreate() local 52 toolbar.setTitle(getTitle()); in onCreate() 53 toolbar.setNavButtonMode(NavButtonMode.BACK); in onCreate() 54 toolbar.setLogo(R.drawable.ic_launcher); in onCreate() 56 toolbar.registerBackListener( in onCreate() [all …]
|
D | WideScreenImeActivity.java | 53 import com.android.car.ui.toolbar.MenuItem; 54 import com.android.car.ui.toolbar.NavButtonMode; 55 import com.android.car.ui.toolbar.SearchConfig; 56 import com.android.car.ui.toolbar.SearchMode; 57 import com.android.car.ui.toolbar.ToolbarController; 82 ToolbarController toolbar = CarUi.requireToolbar(this); in onCreate() local 83 toolbar.setTitle(getTitle()); in onCreate() 84 toolbar.setNavButtonMode(NavButtonMode.BACK); in onCreate() 85 toolbar.setLogo(R.drawable.ic_launcher); in onCreate() 87 toolbar.registerBackListener( in onCreate() [all …]
|
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/preference/ |
D | MultiSelectListPreferenceFragment.java | 40 import com.android.car.ui.toolbar.NavButtonMode; 41 import com.android.car.ui.toolbar.Toolbar; 42 import com.android.car.ui.toolbar.ToolbarController; 88 ToolbarController toolbar = null; in onViewCreated() local 90 toolbar = ((PreferenceFragment) getTargetFragment()).getPreferenceToolbar(this); in onViewCreated() 96 if (toolbar != null) { in onViewCreated() 97 toolbar.setTitle(mPreference.getTitle()); in onViewCreated() 98 toolbar.setSubtitle(null); in onViewCreated() 99 if (toolbar.isStateSet()) { in onViewCreated() 100 toolbar.setState(Toolbar.State.SUBPAGE); in onViewCreated() [all …]
|
D | ListPreferenceFragment.java | 41 import com.android.car.ui.toolbar.NavButtonMode; 42 import com.android.car.ui.toolbar.Toolbar; 43 import com.android.car.ui.toolbar.ToolbarController; 88 ToolbarController toolbar = null; in onViewCreated() local 90 toolbar = ((PreferenceFragment) getTargetFragment()).getPreferenceToolbar(this); in onViewCreated() 95 if (toolbar != null) { in onViewCreated() 96 toolbar.setTitle(mPreference.getTitle()); in onViewCreated() 97 toolbar.setSubtitle(null); in onViewCreated() 98 if (toolbar.isStateSet()) { in onViewCreated() 99 toolbar.setState(Toolbar.State.SUBPAGE); in onViewCreated() [all …]
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/common/ |
D | DialerBaseFragment.java | 35 import com.android.car.ui.toolbar.Toolbar; 36 import com.android.car.ui.toolbar.ToolbarController; 62 ToolbarController toolbar = CarUi.getToolbar(requireActivity()); in onViewCreated() local 64 if (toolbar != null) { in onViewCreated() 65 setupToolbar(toolbar); in onViewCreated() 78 protected void setupToolbar(@NonNull ToolbarController toolbar) { in setupToolbar() argument 82 toolbarTitleLiveData.observe(this, toolbar::setTitle); in setupToolbar() 84 toolbar.setState(getToolbarState()); in setupToolbar() 85 toolbar.setLogo(getToolbarState() == Toolbar.State.HOME in setupToolbar() 89 toolbar.setMenuItems(R.xml.menuitems); in setupToolbar()
|
/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/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 …]
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/contact/ |
D | ContactDetailsFragment.java | 40 import com.android.car.ui.toolbar.Toolbar; 41 import com.android.car.ui.toolbar.ToolbarController; 124 ToolbarController toolbar = CarUi.getToolbar(getActivity()); in onContactChanged() local 126 if (toolbar == null) { in onContactChanged() 129 toolbar.setTitle(null); in onContactChanged() 130 toolbar.setLogo(null); in onContactChanged() 132 toolbar.setTitle(contact == null ? getString(R.string.error_contact_deleted) in onContactChanged() 151 toolbar.setLogo(roundedBitmapDrawable); in onContactChanged() 158 toolbar.setLogo(roundedBitmapDrawable); in onContactChanged() 166 protected void setupToolbar(@NonNull ToolbarController toolbar) { in setupToolbar() argument [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/home/ |
D | HomepageFragment.java | 30 import com.android.car.ui.toolbar.MenuItem; 31 import com.android.car.ui.toolbar.NavButtonMode; 32 import com.android.car.ui.toolbar.ToolbarController; 76 protected void setupToolbar(@NonNull ToolbarController toolbar) { in setupToolbar() argument 77 super.setupToolbar(toolbar); in setupToolbar() 80 toolbar.setNavButtonMode(NavButtonMode.DISABLED); in setupToolbar() 81 toolbar.setLogo(getContext().getResources() in setupToolbar() 86 toolbar.setNavButtonMode(NavButtonMode.BACK); in setupToolbar()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/testutils/ |
D | RootTestSettingsFragment.java | 22 import com.android.car.ui.toolbar.NavButtonMode; 23 import com.android.car.ui.toolbar.ToolbarController; 37 ToolbarController toolbar = getToolbar(); in onActivityCreated() local 38 if (toolbar != null) { in onActivityCreated() 41 toolbar.setNavButtonMode(NavButtonMode.DISABLED); in onActivityCreated() 42 toolbar.setLogo(getContext().getResources() in onActivityCreated() 47 toolbar.setNavButtonMode(NavButtonMode.BACK); in onActivityCreated()
|
/packages/apps/Car/Settings/src/com/android/car/settings/common/ |
D | BaseFragment.java | 35 import com.android.car.ui.toolbar.MenuItem; 36 import com.android.car.ui.toolbar.NavButtonMode; 37 import com.android.car.ui.toolbar.ToolbarController; 127 ToolbarController toolbar = getToolbar(); in onActivityCreated() local 128 if (toolbar != null) { in onActivityCreated() 138 toolbar.setTitle(getTitleId()); in onActivityCreated() 139 toolbar.setMenuItems(items); in onActivityCreated() 141 toolbar.setNavButtonMode(getToolbarNavButtonStyle()); in onActivityCreated()
|
/packages/apps/Car/libs/car-ui-lib/paintbooth/src/main/java/com/android/car/ui/paintbooth/preferences/ |
D | SplitPreferenceDemoFragment.java | 24 import com.android.car.ui.toolbar.ToolbarController; 36 public void setupToolbar(@NonNull ToolbarController toolbar) { in setupToolbar() argument 37 toolbar.setLogo(R.drawable.ic_launcher); in setupToolbar() 39 toolbar.setTitle(getPreferenceScreen().getTitle()); in setupToolbar() 48 public void setToolbar(ToolbarController toolbar) { in setToolbar() argument 49 mToolbar = toolbar; in setToolbar()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/common/ |
D | SinglePaneSettingsFragmentTest.java | 27 import com.android.car.ui.toolbar.Toolbar; 28 import com.android.car.ui.toolbar.ToolbarController; 56 ToolbarController toolbar = mActivity.getToolbar(); in onActivityCreated_hasAppIconIfRoot() local 58 assertThat(toolbar.getNavButtonMode()).isEquivalentAccordingToCompareTo( in onActivityCreated_hasAppIconIfRoot() 64 ToolbarController toolbar = mActivity.getToolbar(); in onActivityCreated_hasBackArrowIconIfNotRoot() local 66 assertThat(toolbar.getNavButtonMode()).isEquivalentAccordingToCompareTo( in onActivityCreated_hasBackArrowIconIfNotRoot()
|
/packages/apps/Car/libs/car-ui-lib/paintbooth/src/main/java/com/android/car/ui/paintbooth/appstyledview/ |
D | AppStyledViewSampleActivity.java | 34 import com.android.car.ui.toolbar.NavButtonMode; 35 import com.android.car.ui.toolbar.ToolbarController; 49 ToolbarController toolbar = CarUi.requireToolbar(this); in onCreate() local 50 toolbar.setTitle(getTitle()); in onCreate() 51 toolbar.setNavButtonMode(NavButtonMode.BACK); in onCreate() 52 toolbar.setLogo(R.drawable.ic_launcher); in onCreate()
|
/packages/apps/Car/libs/car-ui-lib/paintbooth/src/main/java/com/android/car/ui/paintbooth/widgets/ |
D | WidgetActivity.java | 24 import com.android.car.ui.toolbar.NavButtonMode; 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.setNavButtonMode(NavButtonMode.BACK); in onCreate()
|
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/toolbar/ |
D | TabLayout.java | 16 package com.android.car.ui.toolbar; 63 private List<com.android.car.ui.toolbar.Tab> mTabs = Collections.emptyList(); 85 public void setTabs(List<com.android.car.ui.toolbar.Tab> tabs, int selectedTab) { in setTabs() 95 public List<com.android.car.ui.toolbar.Tab> getTabs() { in getTabs() 130 com.android.car.ui.toolbar.Tab tab = mTabs.get(position); in selectTab() 131 Consumer<com.android.car.ui.toolbar.Tab> listener = tab.getSelectedListener(); in selectTab() 153 com.android.car.ui.toolbar.Tab tab = mTabs.get(position); in presentTabView()
|
/packages/apps/Car/Messenger/src/com/android/car/messenger/core/ui/base/ |
D | MessageListBaseFragment.java | 40 import com.android.car.ui.toolbar.Toolbar.State; 41 import com.android.car.ui.toolbar.ToolbarController; 101 protected void setupToolbar(@NonNull ToolbarController toolbar) { in setupToolbar() argument 106 toolbar.setTitle(R.string.app_name); in setupToolbar() 107 toolbar.setState(getToolbarState()); in setupToolbar() 108 toolbar.setLogo( in setupToolbar()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/bluetooth/ |
D | BluetoothDevicePickerFragmentTest.java | 34 import com.android.car.ui.toolbar.ToolbarController; 95 ToolbarController toolbar = mActivity.getToolbar(); in onStart_showsProgressBar() local 97 assertThat(toolbar.getProgressBar().isVisible()).isTrue(); in onStart_showsProgressBar() 112 ToolbarController toolbar = mActivity.getToolbar(); in onStop_hidesProgressBar() local 113 toolbar.getProgressBar().setVisible(true); in onStop_hidesProgressBar() 120 assertThat(toolbar.getProgressBar().isVisible()).isFalse(); in onStop_hidesProgressBar()
|