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

Commit 40d01308 authored by Jagrut Desai's avatar Jagrut Desai Committed by Android (Google) Code Review
Browse files

Merge "Folder Title Change Listener" into 24D1-dev

parents f99f0460 4fe59a2c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1440,6 +1440,11 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
        updateTextViewFocus();
    }

    @Override
    public void onTitleChanged(CharSequence title) {
        mFolderName.setText(title);
    }

    /**
     * Utility methods to iterate over items of the view
     */
+1 −0
Original line number Diff line number Diff line
@@ -723,6 +723,7 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
        requestLayout();
    }

    @Override
    public void onTitleChanged(CharSequence title) {
        mFolderName.setText(title);
        setContentDescription(getAccessiblityTitle(title));
+6 −0
Original line number Diff line number Diff line
@@ -213,6 +213,8 @@ public class FolderInfo extends CollectionInfo {
        void onAdd(ItemInfo item, int rank);
        void onRemove(List<ItemInfo> item);
        void onItemsChanged(boolean animate);
        void onTitleChanged(CharSequence title);

    }

    public boolean hasOption(int optionFlag) {
@@ -285,6 +287,10 @@ public class FolderInfo extends CollectionInfo {
        if (modelWriter != null) {
            modelWriter.updateItemInDatabase(this);
        }

        for (int i = 0; i < mListeners.size(); i++) {
            mListeners.get(i).onTitleChanged(title);
        }
    }

    /**