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

Commit aad169af authored by Stefano Picciolo's avatar Stefano Picciolo Committed by Steve Kondik
Browse files

Show custom app icon and name on lockscreens instead of messaging

Change-Id: Ia7c1607d5cebbf64a9095c7951cfb00c441b0489
parent 776d5a96
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -356,6 +356,19 @@ public class RotarySelector extends View {
        invalidate();
    }

    /**
     * Sets the left handle icon to a given drawable.
     *
     * The argument should refer to a Drawable object, or use 0 to remove
     * the icon.
     *
     * @param icon Bitmap object.
     */
    public void setLeftHandleResource(Bitmap icon) {
        mLeftHandleIcon=icon;
        invalidate();
    }

    /**
     * Sets the right handle icon to a given resource.
     *
@@ -386,6 +399,19 @@ public class RotarySelector extends View {
        invalidate();
    }

    /**
     * Sets the middle handle icon to a given drawable.
     *
     * The argument should refer to a Drawable object, or use 0 to remove
     * the icon.
     *
     * @param icon Bitmap object.
     */
    public void setMidHandleResource(Bitmap icon) {
        mMidHandleIcon=icon;
        invalidate();
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        final int length = isHoriz() ?
+24 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
@@ -218,6 +219,10 @@ public class SlidingTab extends ViewGroup {
            tab.setImageResource(iconId);
        }

        void setIcon(Bitmap icon) {
            tab.setImageBitmap(icon);
        }

        void setTabBackgroundResource(int tabId) {
            tab.setBackgroundResource(tabId);
        }
@@ -230,6 +235,10 @@ public class SlidingTab extends ViewGroup {
            text.setText(resId);
        }

        void setHintText(CharSequence charText) {
            text.setText(charText);
        }

        void hide() {
            boolean horiz = alignment == ALIGN_LEFT || alignment == ALIGN_RIGHT;
            int dx = horiz ? (alignment == ALIGN_LEFT ? alignment_value - tab.getRight()
@@ -785,6 +794,14 @@ public class SlidingTab extends ViewGroup {
        mRightSlider.updateDrawableStates();
    }

    public void setRightTabResources(Bitmap icon, int targetId, int barId, int tabId) {
        mRightSlider.setIcon(icon);
        mRightSlider.setTarget(targetId);
        mRightSlider.setBarBackgroundResource(barId);
        mRightSlider.setTabBackgroundResource(tabId);
        mRightSlider.updateDrawableStates();
    }

    /**
     * Sets the left handle hint text to a given resource string.
     *
@@ -796,6 +813,12 @@ public class SlidingTab extends ViewGroup {
        }
    }

    public void setRightHintText(CharSequence charText) {
       if (isHorizontal()) {
           mRightSlider.setHintText(charText);
       }
    }

    public void setHoldAfterTrigger(boolean holdLeft, boolean holdRight) {
        mHoldLeftOnTransition = holdLeft;
        mHoldRightOnTransition = holdRight;
+6.41 KiB
Loading image diff...
−6.99 KiB
Loading image diff...
+3.59 KiB
Loading image diff...
Loading