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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:30:04+00:00 2026-06-10T04:30:04+00:00

following is code for my xml file <?xml version=1.0 encoding=utf-8?> <ScrollView xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/editview_scrollview android:layout_width=match_parent

  • 0

following is code for my xml file

  <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/editview_scrollview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:filterTouchesWhenObscured="true"
    android:orientation="vertical"
    android:scrollbarAlwaysDrawVerticalTrack="true" >

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

        <TextView
            android:id="@+id/userid"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="USER ID"
            android:textSize="8pt" />

        <EditText
            android:id="@+id/edituserid"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:background="@android:drawable/editbox_background"
            android:scrollHorizontally="true"
            android:textColor="#333399" />

        <TextView
            android:id="@+id/usertype"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="USER TYPE"
            android:textSize="8pt" />

        <Spinner
            android:id="@+id/spinner"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:drawSelectorOnTop="true"
            android:entries="@array/spinner" />

        <TextView
            android:id="@+id/company"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="COMPANY"
            android:textSize="8pt" />

        <EditText
            android:id="@+id/editcompany"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:drawable/editbox_background"
            android:textColor="#333399" />

        <TextView
            android:id="@+id/firstname"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="FIRST NAME"
            android:textSize="8pt" />

        <EditText
            android:id="@+id/editfirstname"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:drawable/editbox_background"
            android:textColor="#333399" />

        <TextView
            android:id="@+id/lastname"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="LAST  NAME"
            android:textSize="8pt" />

        <EditText
            android:id="@+id/editlastname"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:drawable/editbox_background"
            android:textColor="#333399"
             />

        <TextView
            android:id="@+id/encryptionkey"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="ENCRYPTION KEY"
            android:textSize="8pt" />

        <EditText
            android:id="@+id/editencryption"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:drawable/editbox_background" >

            <TextView
                android:id="@+id/lasttagupdate"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="LAST TAG UPDATE"
                android:textSize="8pt" />

            <DatePicker
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_marginLeft="10dip"
                android:layout_weight="1"
                android:endYear="2100"
                android:startYear="1900" />

            <Button
                android:id="@+id/ok"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_weight="1"
                android:text="SAVE" />
        </EditText>
    </LinearLayout>

</ScrollView>

and file where i use this layout

public class writeRFIDTag extends Activity {
    EditText userId, company, firstName, lastName, encryptionKey;
    Button save;
    Spinner spin;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.rfid_write);
        userId = (EditText) findViewById(R.id.edituserid);
        company = (EditText) findViewById(R.id.editcompany);
        firstName = (EditText) findViewById(R.id.editfirstname);
        lastName = (EditText) findViewById(R.id.editlastname);

    }

}

and my logcat

08-21 17:14:51.410: E/AndroidRuntime(20353): FATAL EXCEPTION: main
08-21 17:14:51.410: E/AndroidRuntime(20353): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.securityapp/com.example.securityapp.writeRFIDTag}: java.lang.ClassCastException: android.widget.EditText cannot be cast to android.view.ViewGroup
08-21 17:14:51.410: E/AndroidRuntime(20353):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
08-21 17:14:51.410: E/AndroidRuntime(20353):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
08-21 17:14:51.410: E/AndroidRuntime(20353):    at android.app.ActivityThread.access$600(ActivityThread.java:123)
08-21 17:14:51.410: E/AndroidRuntime(20353):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
08-21 17:14:51.410: E/AndroidRuntime(20353):    at android.os.Handler.dispatchMessage(Handler.java:99)
08-21 17:14:51.410: E/AndroidRuntime(20353):    at android.os.Looper.loop(Looper.java:137)
08-21 17:14:51.410: E/AndroidRuntime(20353):    at android.app.ActivityThread.main(ActivityThread.java:4424)
  • 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-10T04:30:05+00:00Added an answer on June 10, 2026 at 4:30 am

    See, You have forgotten to END following EditText.

    [1] Put / sign to end it, as I’ve shown
    [2] And remove from XML at end.

        ......
        ......
        ......
            <TextView
                android:id="@+id/encryptionkey"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="ENCRYPTION KEY"
                android:textSize="8pt" />
    
            <EditText
                android:id="@+id/editencryption"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@android:drawable/editbox_background" />
                                                                          ^  Add this ENDING sign here
                                                                          ^
    
                <TextView
                    android:id="@+id/lasttagupdate"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="LAST TAG UPDATE"
                    android:textSize="8pt" />
    
                <DatePicker
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginLeft="10dip"
                    android:layout_weight="1"
                    android:endYear="2100"
                    android:startYear="1900" />
    
                <Button
                    android:id="@+id/ok"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:layout_weight="1"
                    android:text="SAVE" />
    
         //     </EditText>    <--  REMOVE THIS FROM YOUR XML
    
        </LinearLayout>
    
    </ScrollView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following XML file: <?xml version=1.0 encoding=UTF-8?> <process name=TestSVG2 xmlns=http://www.example.org targetNamespace=http://www.example.org xmlns:xsd=http://www.w3.org/2001/XMLSchema> <sequence>
I've used following code for parsing XML file in c++. http://www.codeproject.com/Articles/176236/Parsing-an-XML-file-in-a-C-C-program . Now I
I have the following XML file: <xml version=1.0 encoding=utf-8?> <Data> <Parameter1>1</Parameter1> </Data> I want
I have the following XML file: <?xml version='1.0' encoding='utf-8'?> <Answers> <Question1 q=What is your
I have the following XML file: <?xml version='1.0' encoding='utf-8'?> <Answers> <Question1 q=What is your
I'm using the following XML file for creating a layout: <?xml version=1.0 encoding=utf-8?> <LinearLayout
I have the following xml file: <?xml version=1.0 encoding=utf-8?> <root> <phrase id=test><![CDATA[test]]></phrase> <phrase id=test0><![CDATA[test0]]></phrase>
I have a xml file which has the following header: <?xml version=1.1 encoding=UTF-8?> .
The 1.0.0.0 version of my Feature's Template.xml file looked like this: <?xml version=1.0 encoding=utf-8
I'm trying to use the following code # LOAD XML FILE $XML = new

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.