Bearded-Hen / Android-Bootstrap

Bootstrap style widgets for Android, with Glyph Icons
MIT License
7.29k stars 1.43k forks source link

BootstrapCircleThumbnail border color #179

Closed antoniomerlin closed 7 years ago

antoniomerlin commented 7 years ago

Can we change the BootstrapCircleThumbnail border color ?

jamie-beardedhen commented 7 years ago

Yes, by implementing your own BootstrapBrand, which uses the colours you desire: https://github.com/Bearded-Hen/Android-Bootstrap/wiki#custom-themes

You can then set the BootstrapBrand programmatically on the BootstrapThumbnail. I believe there is an example for doing this on a BootstrapButton in the sample application, the same principle applies to Thumbnails.

antoniomerlin commented 7 years ago

After implementing custom style stille their is white border surrounding the image:

6836378008160111318-account_id 1

`profile_pic.setBootstrapBrand(new BootstrapBrand() {

        @ColorInt private final int defaultFill = Color.rgb(255,207,6);
        @ColorInt private final int defaultEdge = Color.rgb(255,207,6);
        @ColorInt private final int defaultTextColor = Color.rgb(255,207,6);
        @ColorInt private final int activeFill = Color.rgb(255,207,6);
        @ColorInt private final int activeEdge = Color.rgb(255,207,6);
        @ColorInt private final int activeTextColor = Color.rgb(255,207,6);
        @ColorInt private final int disabledFill = Color.rgb(255,207,6);
        @ColorInt private final int disabledEdge = Color.rgb(255,207,6);
        @ColorInt private final int disabledTextColor = Color.rgb(255,207,6);

        @Override
        public int defaultFill(Context context) {
            return defaultFill;
        }

        @Override
        public int defaultEdge(Context context) {
            return defaultEdge;
        }

        @Override
        public int defaultTextColor(Context context) {
            return defaultTextColor;
        }

        @Override
        public int activeFill(Context context) {
            return activeFill;
        }

        @Override
        public int activeEdge(Context context) {
            return activeEdge;
        }

        @Override
        public int activeTextColor(Context context) {
            return activeTextColor;
        }

        @Override
        public int disabledFill(Context context) {
            return disabledFill;
        }

        @Override
        public int disabledEdge(Context context) {
            return disabledEdge;
        }

        @Override
        public int disabledTextColor(Context context) {
            return disabledTextColor;
        }
    });`