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..