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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:58:00+00:00 2026-05-20T18:58:00+00:00

hi in my app i am trying to make an text view and edit

  • 0

hi in my app i am trying to make an text view and edit box in a same line as if in iPhone apps.

after getting some info in the following link
How can I implement this UI in Android,

i created the two xml file. the following is my main.xml file

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:background="@drawable/back"
      android:layout_marginRight="10dp"
      android:layout_marginBottom="10dp"
      android:layout_marginTop="20dp"
      xmlns:android="http://schemas.android.com/apk/res/android">
   <LinearLayout android:layout_width="fill_parent"
                 android:layout_height="wrap_content"
                 android:orientation="horizontal"
                 android:paddingLeft="10dp">


      <TextView android:text="Initial"
                android:textColor="#686868"
                android:id="@+id/wideget02"
                android:textSize="10sp"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content">
      </TextView>

      <EditText android:id="@+id/widget01"
                android:layout_width="fill_parent"
                android:layout_height="35dp"
                android:singleLine="true"
                android:inputType="textEmailAddress"
                android:textSize="15sp"
                android:background="@android:color/transparent" android:hint="Initial"/>
   </LinearLayout>

   <View android:layout_width="fill_parent" android:layout_height="1dip"
         android:background="#ababab"/>

   <LinearLayout android:layout_width="fill_parent"
                 android:layout_height="wrap_content" android:orientation="horizontal"
                 android:paddingLeft="10dp">
      <TextView android:text="Initial" android:textColor="#686868"
                android:id="@+id/widget02" android:textSize="10sp" android:layout_width="fill_parent"
                android:layout_height="wrap_content"
            ></TextView>

      <EditText android:id="@+id/widget01" android:layout_width="fill_parent"
                android:layout_height="35dp" android:singleLine="true"
                android:inputType="textEmailAddress" android:textSize="15sp"
                android:background="@android:color/transparent" android:hint="Initial"/>
   </LinearLayout>
</LinearLayout>

Following is the back.xml file which i have placed in drawable of resource folder

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent">

   <stroke android:width="1dp" android:color="#ababab"/>

   <padding android:left="1dp"
            android:top="1dp"
            android:right="1dp"
            android:bottom="1dp"
         />

   <corners android:bottomRightRadius="7dp" android:bottomLeftRadius="7dp"
            android:topLeftRadius="7dp" android:topRightRadius="7dp"/>

</LinearLayout> 

When i run the app it shows the following errors in logcat

03-24 11:51:40.191: ERROR/AndroidRuntime(638): Caused by: android.view.InflateException: Binary XML file line #3: Error inflating class java.lang.reflect.Constructor
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at android.view.LayoutInflater.createView(LayoutInflater.java:512)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:318)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at android.app.Activity.setContentView(Activity.java:1631)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at com.gis.ss.main.onCreate(main.java:16)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1132)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
03-24 11:51:40.191: ERROR/AndroidRuntime(638):     ... 11 more`

what it refers too, please explain me..

  • 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-20T18:58:00+00:00Added an answer on May 20, 2026 at 6:58 pm

    The root element of your back drawable must not be a LinearLayout. Looks like you need a shape there.

    See this doc

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

Sidebar

Related Questions

I'm trying to make NSTable view app with adding rows with two columns x
I'm trying to make a drawing app and currently working on the line tool
I'm trying to make a console app that would monitor some process and restart
In my app, I'm trying to make admin user can edit one attribute of
I am trying to make an app where each view controller (.h/.m) has 2
I have a Rails app and trying to make a remote form, so far
I am fairly new to iOS development and trying make a simple app which
Trying to make a small countdown timer in my app but it's not working.
I'm trying to make an app where I have 3 classes. A Controlller (Main
I am trying to make a web app in Dashcode that uses a range

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.