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

  • Home
  • SEARCH
  • 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 8125681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:53:48+00:00 2026-06-06T06:53:48+00:00

I am generating a display from an input script. The top and bottom sections

  • 0

I am generating a display from an input script. The top and bottom sections are repeatable – as in a merge or include file – except for one minor text change which can be handled easily by a ‘setText()’ instruction. The middle section is dictated by the script and can be of variable length and content. The generated view is then added as a child view to a ScrollView.

Currently, I have a script string which describes both the top and bottom sections and a ‘marker’ in the middle which is replaced by the variable ‘middle section’ script provided by a user database. This structure I believe could be more efficiently expressed and generated if I could incorporate a ‘merge’ or ‘include’ facility in the script. This implies that I would have to be able to implement the merge or include function in Java code.

Any suggestions?

  • 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-06T06:53:50+00:00Added an answer on June 6, 2026 at 6:53 am

    This is part of a code I used to generate a LinearLayout full of a repeating LinearLayout in a recent project. It functions the same way as <include />, by inflating a layout XML file.

    LayoutInflater li = LayoutInflater.from(/* Your context here */);
    ViewGroup layoutTarget = /* Some layout object */;
    
    // ...
    
    for (int i = 0; i < items.size(); i++) {
        // ...
    
        final View v = li.inflate(R.layout.name_of_your_layout, layoutTarget, false);
        layoutTarget.addView(v);
    }
    

    You should be able to adapt this to your need. The key here is calling the .inflate() method, which creates a new instance of that layout.

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

Sidebar

Related Questions

Generating normal columnar data in excel file is quite easy but does any one
Am generating a hidden fields like so: @helper.input(_form(userID), '_label-> None) { (id, name, value,
Im generating a file to present to the user for download, but the server
When generating models from postgresql with ColdFusion Illudium Code generator the boolean values get
I'm generating json from a Rails app, and am filtering fields using the format.json
I have an Ajax-enabled CRUD application. If I display a record from my database
We are using Galleria library (http://galleria.io/) for dynamically generating slideshow from a set of
The code we used is from the less file that's related to positioning. The
I have a table in HTML which I am generating from XML/XSL and I
i want to fetch xml file from the links like http://api.worldbank.org/countries/GBR/indicators/NY.GDP.MKTP.KD.ZG?date=2004:2012 it returns a

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.