Hi All,
I have few requirements in MDK Styling. There are few references on Internet but not what I am searching for. My requirements are :
1.How do I set alternate rows with different color i.e. Odd rows to be gray and even rows to be white? I have used Object table and simple property as a component .
2.How do I apply an image to an entire page ?
3.How do I apply an image to leftover section of a page?
4. Is there any way to change the entire theme of MDK ?
5.Any more MDK styling references apart from that on Internet is highly appreciable.
Thanks,
Aarti Singh.
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok.
Leftover section as in I have a page with just 1 row in object table. The remaining page is blank. How do I set an image to the blank section.
Also is there any reference to use Extension page and bind it to the main page for image to appear?
Are the themes built by MDK itself or we need to configure it seperately ?
Thanks,
Aarti Singh,
aartsingh
Leftover section as in I have a page with just 1 row in object table.
The remaining page is blank. How do I set an image to the blank section.You would need to create an extension as native view to display an image.
Also is there any reference to use Extension page and bind it to the main page for image to appear?For an extension on a full page or image extension in a remaining page, i suggest you to look at this tutorial as a reference guide.
Are the themes built by MDK itself or we need to configure it seperately ?You need to have multiple .less files for different kind of themes and you can switch between them at runtime.
e.g. in my test app, i have 3 LESS files - Black, Red and Styles.

i can provide whatever styling i want to have in the app when user switch to either theme at runtime. (i showed ActionBar in the Red/Black when switching to Red/Black theme)
context.getTheme() will return the current theme applied to the app (by default this would be Styles)
context.getAvailableThemes(): will return the available themes - in above example, it will be Black, Red and Styles.
Once you choose any of the available theme, you can then set the theme via setTheme clientAPI.
jitendrakumar.kansal Thank you for the answer. About the 4th question; will MDK ever be supported by UI Theme Designer? AFAIK, NativeScript is quite limited when it comes to styling, compared to styling with plain CSS for the web.
jitendrakumar.kansal bill.froelich
I have applied a CSS for Action bar with background color as dark blue and text color as white . I have a page with object table and search enabled set as true . By default , the text that we type on search bar appears black but due to css, it appears white and its invisible because the css for background color that should be blue doesnt apply. Is there any solution to it ?
@DaviCastro Could you please post a new question describing your issue? Please also share the page schema and a style example showing how you’re trying to style the page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.