Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1031cf6d authored by Chihhang Chuang's avatar Chihhang Chuang Committed by Automerger Merge Worker
Browse files

Use APPLY text button for grid picker am: 82c09c5e

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

Change-Id: Icb0b5c8a42ccd665f178f943dc9828be10932d83
parents 4bafbbbd 82c09c5e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ import static android.app.Activity.RESULT_OK;
import static com.android.customization.picker.ViewOnlyFullPreviewActivity.SECTION_GRID;
import static com.android.customization.picker.grid.GridFullPreviewFragment.EXTRA_GRID_OPTION;
import static com.android.customization.picker.grid.GridFullPreviewFragment.EXTRA_WALLPAPER_INFO;
import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY;
import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY_TEXT;

import android.content.Intent;
import android.os.Bundle;
@@ -189,8 +189,8 @@ public class GridFragment extends AppbarFragment {
    protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {
        super.onBottomActionBarReady(bottomActionBar);
        mBottomActionBar = bottomActionBar;
        mBottomActionBar.showActionsOnly(APPLY);
        mBottomActionBar.setActionClickListener(APPLY, unused -> applyGridOption(mSelectedOption));
        mBottomActionBar.showActionsOnly(APPLY_TEXT);
        mBottomActionBar.setActionClickListener(APPLY_TEXT, v -> applyGridOption(mSelectedOption));
    }

    private void applyGridOption(GridOption gridOption) {
+3 −3
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ package com.android.customization.picker.grid;

import static android.app.Activity.RESULT_OK;

import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY;
import static com.android.wallpaper.widget.BottomActionBar.BottomAction.APPLY_TEXT;

import android.app.Activity;
import android.content.Intent;
@@ -112,8 +112,8 @@ public class GridFullPreviewFragment extends AppbarFragment {
    @Override
    protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {
        super.onBottomActionBarReady(bottomActionBar);
        bottomActionBar.showActionsOnly(APPLY);
        bottomActionBar.setActionClickListener(APPLY, v -> finishActivityWithResultOk());
        bottomActionBar.showActionsOnly(APPLY_TEXT);
        bottomActionBar.setActionClickListener(APPLY_TEXT, v -> finishActivityWithResultOk());
        bottomActionBar.show();
    }