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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:13:25+00:00 2026-05-25T12:13:25+00:00

I read at another forum that someone else had this problem, he said he

  • 0

I read at another forum that someone else had this problem, he said he resolved it, but he didn’t post the solution. My R.Java doesn’t seem to be updating with the id’s in the nested LinearLayouts. The first two id’s in the textViews do appear in the R.Java (textView1 and textView2), but none of the subsequent id’s for the ImageButtons do…and I suspect it’s because of the layout (but being a noobie I have no idea why).

The layout as I have it is almost perfect, so I’d hate to rewrite it if I can avoid it. But I don’t know how to get the R.java to include the ID’s. And I’ve tried the usual build clean, refresh, etc. Any help would be greatly appreciated by me and my computer…because if I can’t figure this out soon, I’ll probably end up throwing it out the window in frustration. 🙂

<?xml version="1.0" encoding="utf-8"?>

<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>

<TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="86dp" android:background="@drawable/backgdtest" android:text="   Title of App" android:textColor="#ffffff" android:textSize="30px" android:textStyle="bold"/>
<TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:text="    " android:layout_height="wrap_content"></TextView>
    <TableRow android:layout_width="fill_parent" android:weightSum="3" android:layout_height="wrap_content">
        <LinearLayout android:layout_weight="1" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <ImageButton android:id="@+id/news" android:src="@drawable/news" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageButton>
            <TextView android:layout_width="wrap_content" android:text="  Read News" android:layout_height="wrap_content"></TextView>
        </LinearLayout>
        <LinearLayout android:layout_weight="1" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <ImageButton android:id="@+id/messages" android:src="@drawable/message" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageButton>
            <TextView android:layout_width="wrap_content" android:text="    Messages" android:layout_height="wrap_content"></TextView>
        </LinearLayout>
        <LinearLayout android:layout_weight="1" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <ImageButton android:id="@+id/phonebook" android:src="@drawable/phonebook" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageButton>
            <TextView android:layout_width="wrap_content" android:text="  Phone Book" android:layout_height="wrap_content"></TextView>
        </LinearLayout>
    </TableRow>
    <TableRow android:layout_width="fill_parent" android:weightSum="3" android:layout_height="wrap_content">
        <LinearLayout android:layout_weight="1" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <ImageButton android:id="@+id/planner" android:src="@drawable/planner" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageButton>
            <TextView android:layout_width="wrap_content" android:text="  Day Planner" android:layout_height="wrap_content"></TextView>
        </LinearLayout>
        <LinearLayout android:layout_weight="1" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <ImageButton android:id="@+id/help" android:src="@drawable/panic" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageButton>
            <TextView android:layout_width="wrap_content" android:text=" Call For Help" android:layout_height="wrap_content"></TextView>
        </LinearLayout>
        <LinearLayout android:layout_weight="1" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <ImageButton android:id="@+id/exit" android:src="@drawable/exit" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageButton>
            <TextView android:layout_width="wrap_content" android:text=" Exit Program" android:layout_height="wrap_content"></TextView>
        </LinearLayout>
    </TableRow>

  • 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-25T12:13:26+00:00Added an answer on May 25, 2026 at 12:13 pm

    There is no problem (in general) with nested layouts and ID generation. You are however, missing an end tag for the outer-most TableLayout. Add a </TableLayout> to the end of your layout. Android won’t regenerate the R file if there are errors in a layout file – this is why you aren’t seeing the new IDs.

    If you are using the XML editor in Eclipse you will notice a red ‘x’ icon and the error message: ‘XML document structures must start and end within the same entity.’ You would also be able to see this error if you went to the ‘Problems’ view (Window -> Show View -> Problems).

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

Sidebar

Related Questions

I read in a post to the Smack forum recently that Starting daemon threads
I read on another Stack Overflow question that Python was just like Ruby, as
I have a string read from another source such as \b\bfoo\bx. In this case,
I've read that you cannot read the HTML of another frame if that frame
i read somewhere before, there is another way to perform the if-else statement, the
What's the most efficient way to read a stream into another stream? In this
Effort I've read this question , but I still think there has to be
I need to Read files form Linux , copy them into the another computer(Windows
What is the most efficient way of implementing queues to be read by another
In .Net you can read a string value into another data type using either

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.