Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BootstrapLayout #151

Open
StNekroman opened this issue Mar 1, 2016 · 3 comments
Open

Add BootstrapLayout #151

StNekroman opened this issue Mar 1, 2016 · 3 comments

Comments

@StNekroman
Copy link

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 StNekroman changed the title Add BootstrapButtonLayout Add BootstrapLayout Mar 1, 2016
@StNekroman
Copy link
Author

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.

@jamie-beardedhen
Copy link
Contributor

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.

@StNekroman
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants