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 601191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:41:15+00:00 2026-05-13T16:41:15+00:00

I have a base view in XML. <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content"><TextView android:layout_height="wrap_content" android:layout_width="fill_parent"

  • 0

I have a base view in XML.

http://img513.imageshack.us/img513/7171/contextnotionlevelprefs.jpg

<RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content"><TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="Family" android:id="@+id/Family" android:textSize="16px" android:padding="5px" android:textStyle="bold" android:gravity="center_horizontal"></TextView>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/Family" android:layout_alignRight="@+id/Family" android:text="@string/context_notion_level_off" android:id="@+id/ContextNotionLevel"></TextView>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@+id/Detailed" android:layout_below="@+id/Family" android:layout_alignLeft="@+id/Family" android:textStyle="bold" android:id="@+id/Module" android:text="Location"></TextView>
<SeekBar android:layout_height="wrap_content" android:id="@+id/SeekBar01" android:layout_width="fill_parent" android:padding="5px" android:saveEnabled="true" android:layout_below="@+id/Module" android:max="2"></SeekBar>

</RelativeLayout>

How can I repeat the section X times under, to look like here:
http://img687.imageshack.us/img687/4674/contextnotionleveldraft.png

Then, how can I access the seekbar for all items?
Please note that I want this to be dynamical to work eg: for 15 times.

How will be able to give a name(Location), set value(seekbar value), and retrieve value for each group.

  • 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-05-13T16:41:16+00:00Added an answer on May 13, 2026 at 4:41 pm

    From the picture you have, you dont want to repeat the “Family” title

    What you can do is create a new xml (mymain.xml) containing a layout and the title

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout android:orientation="vertical" android:id="@+id/myMainLayout" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content">
    <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="Family" android:id="@+id/Family" android:textSize="16px" android:padding="5px" android:textStyle="bold" android:gravity="center_horizontal"></TextView>
    </LinearLayout>
    

    Then in another xml (myviews.xml), put the xml you have put from your OP (with the title removed)

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout android:id="@+id/RelativeLayout01"
        android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_height="wrap_content">
    
        <TextView android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:textStyle="bold"
            android:id="@+id/Module" android:text="Location">
        </TextView>
    
        <TextView android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:text="context_notion_level_off"
            android:layout_alignRight="@+id/Module" android:id="@+id/ContextNotionLevel">
        </TextView>
    
    
        <SeekBar android:layout_height="wrap_content" android:id="@+id/SeekBar01"
            android:layout_width="fill_parent" android:padding="5px"
            android:saveEnabled="true" android:layout_below="@+id/Module"
            android:max="2">
        </SeekBar>
    
    </RelativeLayout>
    

    And the Activity:

    super.onCreate(savedInstanceState);
    
    setContentView(R.layout.mymain);
    LinearLayout l = (LinearLayout) findViewById(R.id.myMainLayout);
    LayoutInflater linflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    
    for(int i = 0 ; i < 15; i++) {
      View myView = linflater.inflate(R.layout.myviews, null);
      SeekBar s = (SeekBar) myView.findViewById(R.id.SeekBar01);
      //Set an id to know which seekbar is in use
      s.setId(i);
      TextView t = (TextView) myView.findViewById(R.id.Module);
    
      //Change name dynamically
      t.setText(("My location " + i).toString());
      s.setOnSeekBarChangeListener(new OnSeekBarChangeListener(){
    
        @Override
        public void onProgressChanged(SeekBar seekBar, int progress,
                boolean fromUser) {
            Log.i("=========","My SeekBar  = " + seekBar.getId());
            Log.i("=========","My Progress = " + progress);
    
        }
    
        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
            // TODO Auto-generated method stub
    
        }
    
        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
            // TODO Auto-generated method stub
    
        }});
      l.addView(myView);
    }
    

    EDIT:

    To add scroll bars, add ScrollView tags around the LinearLayout from your mymain.xml

    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:orientation="vertical" android:scrollbars="vertical">
    <LinearLayout android:orientation="vertical" android:id="@+id/myMainLayout" android:layout_width="fill_parent"  android:layout_height="wrap_content">
    <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="Family" android:id="@+id/Family" android:textSize="16px" android:padding="5px" android:textStyle="bold" android:gravity="center_horizontal"></TextView>
    </LinearLayout>
    
    </ScrollView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 342k
  • Answers 342k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer public static String toString(Document doc) { try { StringWriter sw… May 14, 2026 at 5:09 am
  • Editorial Team
    Editorial Team added an answer Read about Yahoo Weather, you can pass the location as… May 14, 2026 at 5:09 am
  • Editorial Team
    Editorial Team added an answer You can either use webclient or httpwebrequest. Login to the… May 14, 2026 at 5:09 am

Related Questions

I have a Flex component that, instead of inheriting directly from Canvas, inherits from
I'm working through Agile Web Development with Rails and having a problem with Task
I am using Single Table Inheritance for managing different types of projects. Models: class
I'm trying to get a simple REST service to work with Spring 3.0 but
Here are the classes as I have them set up: class Stat < ActiveRecord::Base

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.