Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7970615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:25:57+00:00 2026-06-04T07:25:57+00:00

I’ve to evaluate some mobile technologies and have one question. We have webapp. It’s

  • 0

I’ve to evaluate some mobile technologies and have one question.

We have webapp. It’s javascript on client which gets xml from our server with our proprietary format of view. App transforms it, and view html.

We’d like to go native on Android – our app would get those xmls from webservice over http (it’s possible to change it format) and create view.

Is it doable? Is it doable in some sufficient way?

I know I can create layout in Java and with some xml format. Can I load those xml dynamically from the web and use them to inflate layout (In tutorials those xmls are in the resources only)? Or have I to parse our xml and call appropriate Java methods – would be that solution efficient?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:25:58+00:00Added an answer on June 4, 2026 at 7:25 am

    The XML in the layout folder of the resources is converted at compile time, so loading after the fact won’t help.

    You can still dynamically parse the XML and programmatically construct the layout from the XML, you could probably get away with just having an Android version of the javascript you already have to transform your proprietary format – but that depends on your format.

    It won’t be as efficient in terms of speed (a lot of that depends on your networking and caching code but still a bit on your view construction code) but it will save on installation space and allows you to remotely update the view without needing to release a new version of the app.

    Edit, expanded and added some code:

    You can inflate any layout resource xml file into a view which you can insert into another view if you choose, take a look at LayoutInflater to inflate the view and then just use a ViewGroup extending view (like LinearLayout, or RelativeLayout) and add to it.

    A quick example of some code:

     protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        LinearLayout ll = new LinearLayout(this);
        setContentView(ll);
        TextView tv = new TextView(this);
        tv.setText("A message");
        ll.addView(tv);
    }
    

    It’s clunky, missing a lot of formatting but provides a basic mechanism to add one view to another.

    And as an example of using layout inflater:

    View convertView = LayoutInflater.from(Main.this).inflate(R.layout.account_entry, null, false);
    

    I would suggest using null and false as the last two parameters as you’re going to be adding it to a specific view yourself later.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.