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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:21:49+00:00 2026-05-26T23:21:49+00:00

In my android application i created and xml file in \res\layout\admin.xml the layouts i

  • 0

In my android application i created and xml file in \res\layout\admin.xml

the layouts i used in it are :

<ScrollView >
<LinearLayout >
<TableLayout>
.
.
Components
.
.
</TableLayout>
  <TableLayout>
.
.
Components
.
.
</TableLayout>
</LinearLayout>
</ScrollView> 

error

!ENTRY com.android.ide.eclipse.adt 4 0 2011-11-17 13:35:10.046
!MESSAGE admin_view_pin.xml: / by zero
!STACK 0
java.lang.ArithmeticException: / by zero
    at android.widget.TableLayout.mutateColumnsWidth(TableLayout.java:579)
    at android.widget.TableLayout.shrinkAndStretchColumns(TableLayout.java:568)
    at android.widget.TableLayout.measureVertical(TableLayout.java:466)
    at android.widget.TableLayout.onMeasure(TableLayout.java:431)
    at android.view.View.measure(View.java:10577)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4270)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1284)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:613)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:519)
    at android.view.View.measure(View.java:10577)
    at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1090)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:267)
    at android.widget.ScrollView.onMeasure(ScrollView.java:314)
    at android.view.View.measure(View.java:10577)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4270)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:267)
    at android.view.View.measure(View.java:10577)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4270)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1284)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:613)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:519)
    at android.view.View.measure(View.java:10577)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4270)
    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1284)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:613)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:519)
    at android.view.View.measure(View.java:10577)
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:397)
    at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:316)
    at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:325)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.createRenderSession(RenderService.java:380)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1310)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(GraphicalEditorPart.java:1075)
    at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(GraphicalEditorPart.java:901)
    at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor.pageChange(LayoutEditor.java:403)
    at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:290)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
    at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2743)
    at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1429)
    at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1408)

Please guide me how can i remove this error and also i want to know why this error occured ??

admin_view_pin.xml

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    style="@style/white_background_bl_aatharv">
    <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content" android:layout_height="fill_parent">
        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="fill_parent" android:layout_height="fill_parent"
            android:orientation="vertical" 
            android:scrollbars="vertical"
            android:scrollbarAlwaysDrawVerticalTrack="true">
            <Button android:id="@+id/btnLogout" android:layout_gravity="right"
                android:text="Logout" android:layout_width="wrap_content"
                android:layout_height="wrap_content" style="@style/button_bl" />
            <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:orientation="vertical" android:layout_width="wrap_content"
                android:layout_height="wrap_content" android:scrollbars="vertical"
                android:scrollbarAlwaysDrawVerticalTrack="true"
                android:stretchColumns="*">
                <TableRow>
                    <TextView android:text="Select" android:layout_width="wrap_content"
                        android:layout_height="fill_parent" android:gravity="center" />
                    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                        android:layout_width="fill_parent" android:layout_height="fill_parent"
                        android:orientation="horizontal">
                        <RadioGroup android:layout_width="fill_parent"
                            android:id="@+id/selectRadioGroup" android:layout_height="wrap_content"
                            android:orientation="horizontal">
                            <RadioButton android:id="@+id/radio_datewise"
                                android:layout_width="wrap_content" android:layout_height="wrap_content"
                                android:text="Date Wise" />
                            <RadioButton android:id="@+id/radio_IDwise"
                                android:layout_width="wrap_content" android:layout_height="wrap_content"
                                android:text="ID Wise" />
                        </RadioGroup>
                    </LinearLayout>
                </TableRow>
                <TableRow>
                    <TextView android:text="MemberID" android:layout_width="wrap_content"
                        android:layout_height="fill_parent" android:gravity="center" />
                    <EditText android:id="@+id/txtMemberID"
                        android:layout_width="120dip" android:singleLine="true"
                        android:layout_height="wrap_content" android:enabled="false" />
                </TableRow>
                <TableRow>
                    <TextView android:text="From Date" android:layout_width="wrap_content"
                        android:layout_height="fill_parent" android:gravity="center" />
                    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                        android:layout_width="fill_parent" android:layout_height="fill_parent"
                        android:orientation="horizontal">
                        <EditText android:id="@+id/startDate"
                            android:layout_width="120dip" android:singleLine="true"
                            android:layout_height="wrap_content" android:editable="false"
                            android:enabled="false" />
                        <Button android:layout_height="wrap_content" style="@style/button_bl"
                            android:layout_width="wrap_content" android:gravity="center"
                            android:id="@+id/btnStartDate" android:text="Set Date"
                            android:layout_gravity="center" android:enabled="false" />
                    </LinearLayout>
                </TableRow>
                <TableRow>
                    <TextView android:layout_width="wrap_content"
                        android:text="To Date" android:layout_height="fill_parent"
                        android:gravity="center" />
                    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                        android:layout_width="fill_parent" android:layout_height="fill_parent"
                        android:orientation="horizontal">
                        <EditText android:id="@+id/endDate" android:layout_width="120dip"
                            android:singleLine="true" android:layout_height="wrap_content"
                            android:editable="false" android:enabled="false" />
                        <Button android:id="@+id/btnEndDate" android:layout_width="wrap_content"
                            android:layout_height="wrap_content" android:text="Set Date"
                            android:gravity="center" style="@style/button_bl"
                            android:layout_gravity="center" android:enabled="false" />
                    </LinearLayout>
                </TableRow>
                <TableRow>
                    <TextView android:text="Package Type"
                        android:layout_width="wrap_content" android:layout_height="fill_parent"
                        android:gravity="center" />
                    <Spinner android:id="@+id/spnPackageType"
                        android:layout_width="fill_parent" android:layout_height="wrap_content" />
                </TableRow>
                <TableRow>
                    <TextView android:text="Status" android:layout_width="wrap_content"
                        android:layout_height="fill_parent" android:gravity="center" />
                    <Spinner android:id="@+id/spnStatus" android:layout_width="fill_parent"
                        android:layout_height="wrap_content" />
                </TableRow>
                <TableRow>
                    <TextView android:text="Active Status"
                        android:layout_width="wrap_content" android:layout_height="fill_parent"
                        android:gravity="center" />
                    <Spinner android:id="@+id/spnActStatus"
                        android:layout_width="fill_parent" android:layout_height="wrap_content" />
                </TableRow>
                <TableRow android:layout_gravity="center" android:gravity="center">
                    <Button android:id="@+id/btnGetDetails"
                        android:layout_width="wrap_content" android:gravity="center"
                        android:text="Get Details" android:layout_height="wrap_content"
                        style="@style/button_bl" />
                </TableRow>
            </TableLayout>
            <TableLayout android:layout_width="wrap_content"
                android:layout_height="wrap_content" android:stretchColumns="*"
                android:scrollbars="vertical"
                android:scrollbarAlwaysDrawVerticalTrack="true" android:id="@+id/pinDetailsTable">
                <TableRow>
                    <!-- <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                        /> <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                        /> <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                        /> <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                        /> <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                        /> -->
                </TableRow>
            </TableLayout>
        </LinearLayout>
    </HorizontalScrollView>
</ScrollView>

When i remove HorizontalScrollView from the layout i get this error

  • 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-26T23:21:49+00:00Added an answer on May 26, 2026 at 11:21 pm

    I think its your 2nd table layout, which doesn’t have any columns in it, yet you’re trying to stretch them all.

    <TableLayout android:layout_width="wrap_content"
                    android:layout_height="wrap_content" android:stretchColumns="*"
                    android:scrollbars="vertical"
                    android:scrollbarAlwaysDrawVerticalTrack="true" android:id="@+id/pinDetailsTable">
                    <TableRow>
                        <!-- <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                            /> <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                            /> <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                            /> <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                            /> <TextView android:text="" android:padding="3dip" style="@style/text_subheader_wh" 
                            /> -->
                    </TableRow>
                </TableLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Android application that involves a lot of XML layout files.
in my Android application the file with name mainout.xml is creating, where ever this
I created one application to read all the contacts stored in android 2.0 emulator.I
When you createa a PreferenceScreen on Android, your application creates a default SharedPreferences file
Hi Ive written a simple android application with two xml pages, one has an
In my android application I have created 2 projects. The main project and a
I am getting this Error while executing my android application : Host is unresolved:
I need to work with REST api in android application which is created by
I'm using the Simple XML library to process XML files in my Android application.
I've created a WebView-based application according to http://developer.android.com/resources/tutorials/views/hello-webview.html Although I did exactly what was

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.