I'm working on an Android Tv app and have been using Leanback as a theme, however I need to implement a TabLayout for the top nav as I am not using the standard BrowseSupportFragment.
The problem is that I in order to use LeanbackTabLayout I must use Theme.AppCompat, but if I use Theme.AppCompat instead of Theme.Leanback I lose all the Leanback styling and D-pad functionality.
ContextWrapper has been suggested, but the documentation did not
provide much clarity for me. I'm not sure if I should use
Theme.Leanback as my parent application theme and apply
Theme.AppCompat to my LeanbackTabLayout using ContextWrapper or go
about it some other way.
I've tried using Theme.AppCompat.Leanback as my parent application
theme. This allowed me to keep the Leanback styling, but I no longer
have D-pad controls.
Does anyone have any suggestions on how to make ContextWrapper or Theme.AppCompat.Leanback work in this situation or any other workaround?
Related
I want to use only ion-icon but these are made differently for different devices such as if we look for notifications ion-icon then we find for ion, ios-outline and material design.
In material desgin all the icons are filled with black color instaead I want to use similar to ios-outline icons in my material designs.
How can I use them?
Great question. To use the ios version of the icon, you'll need to use the ios- prefix like <ion-icon name=ios-notifications"></ion-icon>. However, some of the icons are not available on ios so you'll need to refer to the ionic reference site
You can use the ios icons by using the name, in this case <ion-icon name=ios-notifications"></ion-icon> directly. Note that this will only use the one icon and not change by the platform to match the common icons on each platform.
If you want to just use the iOS versions, then this Ionic Framework Reference will show you how to do that.
i need to hide tabs from a existing project in QT, i don't want to delete the code because i have to set parameters on that code, the Application relay on that too. Seems like QT hasn't built-in hide(); function, i tried to edit stylesheet to make it smaller, but doesn't work too, i've looked on the internet and seems like this is a known issue. Does somebody have some tricks to avoid this?
Only thing i was able to come up with is:
ui->TabObject->setEnabled(false);
basically i disable objects in the tab to make them not usable by the user, but this is not a good thing for the whole UI.
Maybe by calling QTabWidget::removeTab(index) - this removes the tab from the QTabWidget, but does not delete the tab's QWidget.
I'm setting up a carousel in Sitecore using Glass Mapper. In the foreach loop to generate each carousel item, I can get the items out easily enough and make them editable with the #Editable command. What this doesn't give, however, is finer control over the edit process. For example, I want to edit the background image using a custom button in the Experience Editor, but I need to set that up in a rendering.
If I was using straight Sitecore, it looks like I'd use Html.Sitecore().ItemRendering and pass in the carousel item as a regular Sitecore item. In this case, I have my strongly-type class from Glass Mapper, which can't be passed in that way.
Is there a comparable method in Glass Mapper for setting up an item rendering? Or is there another way to affect the Experience Editor buttons for the carousel items? I've also experimented with setting up a separate edit mode, which would work fine, but I wanted to put together a cleaner editing experience with a more WYSIWYG approach to the item.
You'll have to use Custom User Experience Buttons which will allow you to edit in Page Editor Mode.
I just googled and found couple of good article which might help you.
http://www.nishtechinc.com/Blog/2015/March/A%20Better%20Approach%20at%20Carousel%20Management
http://www.awareweb.com/awareblog/11-25-14-custombuttonspageeditor
Try Html.Glass().BeginEditFrame() functionality built into Glass Mapper, wrapped in a #using block.
It allows you to specify the fields you wish to edit directly as params. Or if you're feeling adventurous, it can point to a full edit frame configuration in the core DB.
I have built the chromiumembedded cefsimple project successfully with visual studio. I need to know whether I could implement a custom header bar instead of below.
Eg: with a separate favicon and Title being set as a custom manner .. etc.
Your kind help is really appreciated.
Thank You !
If you are based on CefSimple, take a look at simple_handler_win.cpp. In SimpleHandler::OnTitleChange(), you can set the window title to what you want, instead of what CefSimple wants by changing the SetWindowText() call. This will appear shortly after launch, replacing the app name.
To change the app icons, just replace the icons in the projects cefsimple.rc.
If you want to change them dynamically, that will be a bit more work.
I'm making a game GUI API. It is coming along very nicely except for one aspect. I want themes similar to how GTK works. The way I want it to work is that every GUI element will have a default Windows9X-like way of drawing themselves. If it is found that a theme is set for that type of widget, it will be drawn with those bitmaps.
My original concept was to create a Theme class which would have getters and setters for the bitmaps.
for example:
themeManager.setButtonHover(Bitmap *bitmap);
The problem with this, is that it is not flexable if I want to create new types of Widgets. I may eventually want to create a superButton which would use a different theme than a button. This is the flaw with that concept. The concept I'm thinking of going with is that each widget type has static methods to set the theme for itself and the constructor uses that.
Are there better ways of doing this that I'm not thinking of? Since it is an API, I want to avoid reading text files, so reading the theme from a text document is not an option.
Thanks
May be template the superButton on a policy and then have a default policy which does the default and the user has the option of providing a different policy? The policy could then define the attributes of the button (such as the hover image etc.) - does what I describe make sense?