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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:06:36+00:00 2026-05-28T02:06:36+00:00

I am trying to create a screen with toggle buttons on it . I

  • 0

I am trying to create a screen with toggle buttons on it . I am using android2.2 . I am stumped by this exception feeling clueless.

I am posting my logs when that page is invoked ,and layout xml of the screen as well

my xml:

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

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
 android:layout_gravity="center_horizontal" android:id="@+id/postnatalcheck"  android:layout_width="fill_parent" android:layout_height="fill_parent" 
 android:background="#000000" android:paddingTop="10dip" android:paddingBottom="2dip">

<Button 
    android:id="@+id/buttonBackHome" 
    android:text="Home" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"/> 

<ScrollView  
    android:id="@+id/scrollviewpostnatal" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:layout_marginTop="70dip"  
    android:layout_marginBottom="15dip">

<LinearLayout 
    android:orientation="vertical" android:layout_height="fill_parent"
    android:layout_width="fill_parent" >    


<!-- This is Toggle button for PostNatal Check  -->

 <!--  this section is for Verbal examination Layout -->

<ToggleButton android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:textOff="Mother Verbal Examination"
    android:textOn="Mother Verbal Examination" android:id="@+id/mverbalexamination"  />

<LinearLayout  
    android:id="@+id/verexamination"
    android:orientation="vertical" android:layout_height="fill_parent"
    android:layout_marginLeft="25dip" android:layout_width="fill_parent" android:visibility="gone">

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Number of full meals in a day " android:gravity="left" android:layout_gravity="left"/> 

 <Spinner
    android:id="@+id/noofmeals"
    android:layout_height="wrap_content"
    android:prompt="@string/Mealsaday"
    android:entries="@array/Numbers"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Experience excessive bleeding" android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/excessivebleeding"
    android:layout_height="wrap_content"
    android:prompt="@string/Excessbleeding"
    android:entries="@array/Desicion"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Number of pads changed in a day " android:gravity="left" android:layout_gravity="left"/>


<Spinner
    android:id="@+id/noofpadschange"
    android:layout_height="wrap_content"
    android:prompt="@string/Noofpadschanged"
    android:entries="@array/Numbers"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Baby kept warm*(during winter especially )" android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/bwarm"
    android:layout_height="wrap_content"
    android:prompt="@string/Bwarm"
    android:entries="@array/Desicion"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Number of time baby is fed in a day " android:gravity="left" android:layout_gravity="left"/>


<Spinner
    android:id="@+id/bfed"
    android:layout_height="wrap_content"
    android:prompt="@string/Bfed"
    android:entries="@array/Numbers"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Baby crying incessantly" android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/bcrying"
    android:layout_height="wrap_content"
    android:prompt="@string/Bcrying"
    android:entries="@array/Desicion"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Number of times baby urinating in a day " android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/burinating"
    android:layout_height="wrap_content"
    android:prompt="@string/Burinating"
    android:entries="@array/Numbers"
    android:layout_width="fill_parent">
</Spinner>
</LinearLayout>

 <!--  this section is for Verbal examination Layout ends here -->

<!--  this section is for Physical examination starts here  --> 
<ToggleButton 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:textOff="Mother Physical Examination"
    android:textOn="Mother Physical Examination" android:id="@+id/mphysicalexamination"  />

<LinearLayout  
    android:id="@+id/phyexamination"
    android:orientation="vertical" android:layout_height="fill_parent"
    android:layout_marginLeft="25dip" android:layout_width="fill_parent" android:visibility="gone"> 


<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Body temperature " android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/mtemperature"
    android:layout_height="wrap_content"
    android:prompt="@string/Mtemperature"
    android:entries="@array/Temperature"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Discharge smells foul" android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/mdischargesmell"
    android:layout_height="wrap_content"
    android:prompt="@string/Mdischarge"
    android:entries="@array/Desicion"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Speaks abnormaly" android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/mspeakingpattern"
    android:layout_height="wrap_content"
    android:prompt="@string/Mspeakingpattern"
    android:entries="@array/Desicion"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Having fits " android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/mfits"
    android:layout_height="wrap_content"
    android:prompt="@string/Mfits"
    android:entries="@array/Desicion"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Percieves less/no milk " android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/mbreastmilk"
    android:prompt="@string/Mbreastmilk"
    android:entries="@array/Desicion"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Cracked nipples " android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/mnipples"
    android:layout_height="wrap_content"
    android:prompt="@string/Mnipples"
    android:entries="@array/Desicion"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Looks pale" android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/mskincolor"
    android:prompt="@string/Mskincolor"
    android:entries="@array/Desicion"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent">
</Spinner>

<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Vaginal tearing " android:gravity="left" android:layout_gravity="left"/>

<Spinner
    android:id="@+id/mvaginatearing"
    android:entries="@string/Mvaginaltearing"
    android:prompt="@array/Desicion"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent">
</Spinner>
</LinearLayout>


<!--  this section of physical examination ends here  --> 











        <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="left" android:layout_gravity="left"/>
        <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="left" android:layout_gravity="left"/>
        <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="left" android:layout_gravity="left"/>
        <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="left" android:layout_gravity="left"/>
        <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="left" android:layout_gravity="left"/>
        <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="left" android:layout_gravity="left"/>
        <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="" android:gravity="left" android:layout_gravity="left"/>


        <Button 
            android:id="@+id/buttonAdvisoryandSave" 
            android:text="Register" 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"/>


</LinearLayout>


</ScrollView>

<TextView 
    android:id="@+id/copyrighted" 
    android:layout_width="wrap_content" 
    android:layout_centerInParent="true"
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    style="@style/copyrighted" 
    android:layout_below="@+id/rlinner" 
    android:text="@string/copyrighted" 
    android:textColor="#FFFFFF"/>

</RelativeLayout>

my logtrace :

/AndroidRuntime(  356): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.accenturelabs.idoc/com.accenturelabs.id
c.PostNatalCheck}: android.view.InflateException: Binary XML file line #198: Error inflating class <unknown>
/AndroidRuntime(  356):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
/AndroidRuntime(  356):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
/AndroidRuntime(  356):        at android.app.ActivityThread.access$2300(ActivityThread.java:125)
/AndroidRuntime(  356):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
/AndroidRuntime(  356):        at android.os.Handler.dispatchMessage(Handler.java:99)
/AndroidRuntime(  356):        at android.os.Looper.loop(Looper.java:123)
/AndroidRuntime(  356):        at android.app.ActivityThread.main(ActivityThread.java:4627)
/AndroidRuntime(  356):        at java.lang.reflect.Method.invokeNative(Native Method)
/AndroidRuntime(  356):        at java.lang.reflect.Method.invoke(Method.java:521)
/AndroidRuntime(  356):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
/AndroidRuntime(  356):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
/AndroidRuntime(  356):        at dalvik.system.NativeStart.main(Native Method)
/AndroidRuntime(  356): Caused by: android.view.InflateException: Binary XML file line #198: Error inflating class <unknown>
/AndroidRuntime(  356):        at android.view.LayoutInflater.createView(LayoutInflater.java:513)
/AndroidRuntime(  356):        at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
/AndroidRuntime(  356):        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
/AndroidRuntime(  356):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
/AndroidRuntime(  356):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
/AndroidRuntime(  356):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
/AndroidRuntime(  356):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
/AndroidRuntime(  356):        at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
/AndroidRuntime(  356):        at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
/AndroidRuntime(  356):        at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
/AndroidRuntime(  356):        at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
/AndroidRuntime(  356):        at android.app.Activity.setContentView(Activity.java:1647)
/AndroidRuntime(  356):        at com.accenturelabs.idoc.PostNatalCheck.onCreate(PostNatalCheck.java:39)
/AndroidRuntime(  356):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
/AndroidRuntime(  356):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
/AndroidRuntime(  356):        ... 11 more
/AndroidRuntime(  356): Caused by: java.lang.reflect.InvocationTargetException
/AndroidRuntime(  356):        at android.widget.Spinner.<init>(Spinner.java:49)
/AndroidRuntime(  356):        at java.lang.reflect.Constructor.constructNative(Native Method)
/AndroidRuntime(  356):        at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
/AndroidRuntime(  356):        at android.view.LayoutInflater.createView(LayoutInflater.java:500)
/AndroidRuntime(  356):        ... 25 more
/AndroidRuntime(  356): Caused by: java.lang.NullPointerException
/AndroidRuntime(  356):        at android.content.res.AssetManager.getResourceTextArray(AssetManager.java:213)
/AndroidRuntime(  356):        at android.content.res.Resources.getTextArray(Resources.java:361)
/AndroidRuntime(  356):        at android.content.res.TypedArray.getTextArray(TypedArray.java:628)
/AndroidRuntime(  356):        at android.widget.AbsSpinner.<init>(AbsSpinner.java:73)
/AndroidRuntime(  356):        at android.widget.Spinner.<init>(Spinner.java:53)
/AndroidRuntime(  356):        ... 29 more
/ActivityManager(   58):   Force finishing activity com.accenturelabs.idoc/.PostNatalCheck
/ActivityManager(   58): Activity pause timeout for HistoryRecord{45030968 com.accenturelabs.idoc/.PostNatalCheck}
/Process (  356): Sending signal. PID: 356 SIG: 9
/ActivityManager(   58): Process com.accenturelabs.idoc (pid 356) has died.
/ActivityManager(   58): Scheduling restart of crashed service com.accenturelabs.idoc/.LocalService in 5000ms
  • 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-28T02:06:37+00:00Added an answer on May 28, 2026 at 2:06 am

    I think

    android:entries=”@string/Mvaginaltearing”
    android:prompt=”@array/Desicion”

    entries and prompt are interchanged.
    entries should have array object and prompt should have string object

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

Sidebar

Related Questions

I'm currently trying to create a screen similar to this: Using this tool to
I'm trying to create a splash screen that shows assemblies (all referenced library) loading
I'm trying to create a Help/About screen for my application, but I've discovered that,
I'm trying to create a shortcut on the home screen that, when pressed, will
I'm trying to create an android screen that has a TableLayout anchored to the
I'm trying to create a simple table navigation screen in WPF using the entity
I've been trying to create a full screen view. I plan on using core
I am trying to create a layout that extends to the whole screen if
I'm trying to create a simple help screen that looks like the the one
I am trying to create a resize toggle animation on this simple custom TUIScrollView

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.