Loading res/flag(com.android.documentsui.flags.use_material3)/drawable/breadcrumb_item_background_m3.xml +3 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ <ripple xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:color="@color/breadcrumb_item_ripple_color"> <item android:id="@android:id/mask" Loading @@ -24,6 +23,9 @@ <item> <selector> <item android:state_enabled="false"> <color android:color="@android:color/transparent"/> </item> <item android:state_pressed="true"> <shape android:tint="?attr/colorOnSurfaceVariant"> <corners android:radius="@dimen/breadcrumb_item_height_m3" /> Loading res/flag(com.android.documentsui.flags.use_material3)/layout/navigation_breadcrumb_item_m3.xml +11 −2 Original line number Diff line number Diff line Loading @@ -21,14 +21,23 @@ android:layout_height="wrap_content" android:minHeight="@dimen/breadcrumb_height" android:gravity="center_vertical" android:focusable="true" android:clickable="true" android:defaultFocusHighlightEnabled="false" android:orientation="horizontal"> <!-- We can't put clickable/focusable on the TextView below even though we only want the highlight/focus ring on the TextView instead of the whole item, this is because there is a specific logic in HorizontalBreadcrumb when binding click event, the event is bound on the whole item directly and there are special a11y handling (check the `setAccessibilityDelegateCompat` call). Given we don't want the focus background on the item, we also need defaultFocusHighlightEnabled above and duplicateParentState below. --> <com.google.android.material.textview.MaterialTextView android:id="@+id/breadcrumb_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="true" android:clickable="true" android:duplicateParentState="true" android:maxWidth="275dp" android:gravity="center_vertical" android:maxLines="1" Loading src/com/android/documentsui/HorizontalBreadcrumb.java +1 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ public final class HorizontalBreadcrumb extends RecyclerView implements Breadcru isFirst ? mEnv.getCurrentRoot().title : mState.stack.get(position).displayName); if (isUseMaterial3FlagEnabled()) { // The last path part in the breadcrumb is not clickable. holder.mTitle.setEnabled(!isLast); holder.itemView.setEnabled(!isLast); } else { holder.mTitle.setEnabled(isLast); } Loading Loading
res/flag(com.android.documentsui.flags.use_material3)/drawable/breadcrumb_item_background_m3.xml +3 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ <ripple xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:color="@color/breadcrumb_item_ripple_color"> <item android:id="@android:id/mask" Loading @@ -24,6 +23,9 @@ <item> <selector> <item android:state_enabled="false"> <color android:color="@android:color/transparent"/> </item> <item android:state_pressed="true"> <shape android:tint="?attr/colorOnSurfaceVariant"> <corners android:radius="@dimen/breadcrumb_item_height_m3" /> Loading
res/flag(com.android.documentsui.flags.use_material3)/layout/navigation_breadcrumb_item_m3.xml +11 −2 Original line number Diff line number Diff line Loading @@ -21,14 +21,23 @@ android:layout_height="wrap_content" android:minHeight="@dimen/breadcrumb_height" android:gravity="center_vertical" android:focusable="true" android:clickable="true" android:defaultFocusHighlightEnabled="false" android:orientation="horizontal"> <!-- We can't put clickable/focusable on the TextView below even though we only want the highlight/focus ring on the TextView instead of the whole item, this is because there is a specific logic in HorizontalBreadcrumb when binding click event, the event is bound on the whole item directly and there are special a11y handling (check the `setAccessibilityDelegateCompat` call). Given we don't want the focus background on the item, we also need defaultFocusHighlightEnabled above and duplicateParentState below. --> <com.google.android.material.textview.MaterialTextView android:id="@+id/breadcrumb_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="true" android:clickable="true" android:duplicateParentState="true" android:maxWidth="275dp" android:gravity="center_vertical" android:maxLines="1" Loading
src/com/android/documentsui/HorizontalBreadcrumb.java +1 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ public final class HorizontalBreadcrumb extends RecyclerView implements Breadcru isFirst ? mEnv.getCurrentRoot().title : mState.stack.get(position).displayName); if (isUseMaterial3FlagEnabled()) { // The last path part in the breadcrumb is not clickable. holder.mTitle.setEnabled(!isLast); holder.itemView.setEnabled(!isLast); } else { holder.mTitle.setEnabled(isLast); } Loading