-
Notifications
You must be signed in to change notification settings - Fork 163
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
Support for multiple devices and standard resources #37
Comments
The approach that Scaloid advocate is ui-layout-without-xml, not replacing every kind of xml descriptions. Use your resources as described in Android developer guide. Although I suggest that marking up layout with normal Scala code, Scaloid is fully compatible with xml layout. If your project's layouts are already written in xml, you can freely access it from Scala code:
|
@pocorall But we could create some template engine for resources. It will be compiled to xml on runtime or on request. |
Every great ideas is looked crazy at first. I think your idea is worthwhile. I will reopen this issue until I rewrite this idea to be more detailed. |
Before completely replace all of the XMLs, I will firstly focus on "supporting multiple devices". Because Scaloid layout is ordinary Scala code, there are almost nothing to do to adapt multiple devices, except some However, because many peoples requested explicit example about this, I will write some helper doing this. |
@pocorall I requested too 😄 I just think we must separate resources variables and layouts with other code |
@pocorall One more thing for dsl - support IDE. For now, eclipse and intellij idea help us with build android resources and write xml-layouts. If we will use only dynamic resources, we will have to build all for ourselves. |
For statical analysis purpose, declarative language (e.g. XML and JSON) is better than procedural language (e.g. Java and Scala). For some alternative methods replacing XMLs, such as SBT and Spring Java Config, difficulty of IDE support is a major weakness. As we don't have much workforce, plugin development will be an issue of someday in the future. |
Hello, I've looked on scaloid layouts without xml and I have some questions:
In standart we can create similar xml files in children resource folders
I mean this http://developer.android.com/guide/practices/screens_support.html
With sbt or some scala script
The text was updated successfully, but these errors were encountered: