Merge "Refactor taskbar divider view to IconButtonView" into udc-qpr-dev am: 6341a7e31c

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24448722

Change-Id: Iad6d36b0be4db056958f4c38327b68faa7f78df3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jagrut Desai
2023-08-18 04:33:26 +00:00
committed by Automerger Merge Worker
3 changed files with 23 additions and 16 deletions

View File

@@ -13,8 +13,18 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="@color/taskbar_divider_background"/>
<corners android:radius="1dp" />
</shape>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="52dp"
android:height="52dp"
android:viewportHeight="52"
android:viewportWidth="52">
<group>
<path
android:fillColor="@color/taskbar_divider_background"
android:pathData="M26,11L26,41"
android:strokeColor="@color/taskbar_divider_background"
android:strokeLineCap="round"
android:strokeWidth="2" />
</group>
</vector>

View File

@@ -13,16 +13,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<FrameLayout
<com.android.launcher3.views.IconButtonView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/taskbar_icon_min_touch_size"
android:layout_height="@dimen/taskbar_icon_min_touch_size"
android:contentDescription="@string/taskbar_divider_a11y_title"
android:backgroundTint="@android:color/transparent">
<View
android:layout_height="32dp"
android:layout_width="2dp"
android:layout_gravity="center"
android:background="@drawable/taskbar_divider_bg" />
</FrameLayout>
android:backgroundTint="@android:color/transparent" />

View File

@@ -88,7 +88,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
private @Nullable IconButtonView mAllAppsButton;
// Only non-null when device supports having an All Apps button.
private @Nullable View mTaskbarDivider;
private @Nullable IconButtonView mTaskbarDivider;
private View mQsb;
@@ -158,8 +158,12 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
mActivityContext.getColor(R.color.all_apps_button_color));
if (FeatureFlags.ENABLE_TASKBAR_PINNING.get()) {
mTaskbarDivider = LayoutInflater.from(context).inflate(R.layout.taskbar_divider,
mTaskbarDivider = (IconButtonView) LayoutInflater.from(context).inflate(
R.layout.taskbar_divider,
this, false);
mTaskbarDivider.setIconDrawable(
resources.getDrawable(R.drawable.taskbar_divider_button));
mTaskbarDivider.setPadding(mItemPadding, mItemPadding, mItemPadding, mItemPadding);
}
}