Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

HTML to XML translator/dictionary

  • 10-11-2014 10:04am
    #1
    Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭


    Hi

    Does anyone know of any website or resource that shows a html tag, say div, and then its equivalent, ViewGroup.

    A translator/dictionary type website, or any site that has that sort of information?

    Thanks.


Comments

  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    Tell us the problem you're trying to solve rather than asking us to second guess your intended solution.

    I think I can guess what you're trying to do and if I'm right I may have a couple of suggestions.


  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    Graham wrote: »
    Tell us the problem you're trying to solve rather than asking us to second guess your intended solution.

    I think I can guess what you're trying to do and if I'm right I may have a couple of suggestions.

    OK, well like say dictionary.com, ideally, I can type in "div" into a text field, click search and it will return "ViewGroup", or "background-image" and it will return "android:background" with an explanation and code examples. Is there any such site that does that or something like it?

    I can google them all individually, but if they were in one spot it would be ideal. Any suggestions would be great, thanks.


  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    Sorry Cormee, it's not what I thought. Looks like your asking an Android specific thing so can't help you there.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    cormee wrote: »
    OK, well like say dictionary.com, ideally, I can type in "div" into a text field, click search and it will return "ViewGroup", or "background-image" and it will return "android:background" with an explanation and code examples. Is there any such site that does that or something like it?
    Are you seeking some form of 'translator' for converting HTML or xhtml into Android Layout XML?


  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    Are you seeking some form of 'translator' for converting HTML or xhtml into Android Layout XML?

    Not one that automatically translates the code, more of a site that lists, or is searchable, HTML tags, and their equivalent android XML tag, of any.


  • Advertisement
  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    cormee wrote: »
    Not one that automatically translates the code, more of a site that lists, or is searchable, HTML tags, and their equivalent android XML tag, of any.
    Not aware of any as trying to do that would be a very poor approach, TBH. Android layouts and xHTML share only superficial similarities.


  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    Not aware of any as trying to do that would be a very poor approach, TBH. Android layouts and xHTML share only superficial similarities.

    What would you see as being the issue? Most html tags, and CSS declarations have an Android XML equivalent, how would referencing a document or site that lists these be a very poor approach? I'd find it very useful! :D


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    cormee wrote: »
    What would you see as being the issue? Most html tags, and CSS declarations have an Android XML equivalent, how would referencing a document or site that lists these be a very poor approach? I'd find it very useful! :D
    Because an Android layout is not a Web page and trying to simply translate the latter to the former will leave you with at best a sub standard UI, if not a total pigs ear, just as was the case 15 years ago with WML.


  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    Because an Android layout is not a Web page and trying to simply translate the latter to the former will leave you with at best a sub standard UI, if not a total pigs ear, just as was the case 15 years ago with WML.

    You're either over-analysing what I'm asking for, or you've misunderstood my question. Anyway, thanks for your input.


  • Registered Users, Registered Users 2 Posts: 2,032 ✭✭✭colm_c


    There isn't a website doing what you want to do, however the names are very similar, so you should be able to figure it out (or google).

    There's also some unique to android pieces. e.g. you can't create a background gradient directly in the XML, you need to create a drawable and reference that in your XML. As opposed to CSS where you could create a gradient in the CSS.

    Then there's the fun of different layouts, drawables and images for different screen sizes in Android.

    Personally, I'm not sure I'd find a website comparing the two useful, more likely to cause confusion IMO.

    Is there a specific part you're having difficulty with?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    colm_c wrote: »
    There isn't a website doing what you want to do, however the names are very similar, so you should be able to figure it out (or google).

    There's also some unique to android pieces. e.g. you can't create a background gradient directly in the XML, you need to create a drawable and reference that in your XML. As opposed to CSS where you could create a gradient in the CSS.

    Then there's the fun of different layouts, drawables and images for different screen sizes in Android.

    Personally, I'm not sure I'd find a website comparing the two useful, more likely to cause confusion IMO.

    Is there a specific part you're having difficulty with?


    Hi Colm,

    Thanks, no there isn't anything in particular I'm having issues with, I just thought if it existed it would be handy as a quick reference. At the moment I am, as you suggest, googling each one.

    Anyhoo, I've started building such a site - http://www.andict.com , type "fo" into the search box to see how it would work. It's more a proof of concept at this stage and it isn't styled. I'll be adding to it as this project at work progresses. If, as I go along, I don't think the concept works I'lll abandon the project, I don't want to lead any designers astray, but for the moment I think it could be a useful tool as a starting point for anyone from a web/ui design background starting out on Android, who wants to see what a comparable html/CSS tage is in Android XML.

    Any further feedback would be appreciated. If the idea, as I've executed it in the link, is crap, can you let me know, and why you think so.


Advertisement