Android-Bootstrap icon indicating copy to clipboard operation
Android-Bootstrap copied to clipboard

Add BootstrapLayout

Open StNekroman opened this issue 9 years ago • 3 comments

There is BootstrapButton view, which (as I understood) acts like an TextView and supports text and FontAwesome icons inside. But it doesn't support custom view inside. Use-case: I want to put color-selector anchor to the right side of the button. So I suggest to create so-called "BootstrapLayout" which will act like and ViewGroup and provide basic functionality:

  • be clickable (can be turned off);
  • support different border colors/radiuses/etc.
  • support "disabled" flag;

In other words, the same as BootstrapButton does, but without text="..." attribute. Then BootstrapButton can be inherited from BootstrapLayout, via defining TextView or AwesomeTextView inside. Main idea - that I need clickable custom view with standard borders + rounded + disable flag for my custom content.

StNekroman avatar Mar 01 '16 10:03 StNekroman

BTW, there is iconics library from Mike Penz, which do like to user as inner content of button. It supports material icons and a lot of other icon libs instead of font awesome.

StNekroman avatar Mar 01 '16 14:03 StNekroman

I think it makes more sense to put the BootstrapButton into a custom ViewGroup than to make it extend one. The BootstrapButtonGroup has some limited support for grouping buttons (but doesn't support any other views, and has quite a limited API that doesn't let you change colors individually).

It might even make sense to implement the whole Bootstrap grid system as a ViewGroup if we're going down this route. But I suspect that would take quite a bit of work.

Also this library supports custom fonts - at the minute only Typicon and FontAwesome are included by default, but it's possible to add your own.

jamie-beardedhen avatar Apr 07 '16 19:04 jamie-beardedhen

I need ViewGroup with rounded corners in bootstrap-style colors. Currently I can achieve this only using my own custom view. But that would be nice to have BootstrapViewGroup in this library which will support custom content (just a ViewGroup). Becuase I cannot inject custom view into BootstrapButton, because button is not a ViewGroup.

StNekroman avatar Dec 02 '16 08:12 StNekroman