I am getting above error on loading my layout to activity. Please have a look in below code my xml layout file -
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1" >
<com.xyz.FeatureTop
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".35" >
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:gravity="center"
android:text="Hello Feature Top"
android:textColor="@android:color/black" />
</com.xyz.FeatureTop>
<com.xyz.Middle
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".35" >
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:gravity="center"
android:text="Hello Feature Middle"
android:textColor="@android:color/black" />
</com.xyz.Middle>
<com.xyz.FeatureBottom
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight=".3" >
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:gravity="center"
android:text="Hello Feature Bottom"
android:textColor="@android:color/black" />
</com.xyz.FeatureBottom>
</LinearLayout>
and below is my classes -
public class Xyz extends TabActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.home);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
return super.onOptionsItemSelected(item);
}
public class FeatureTop extends LinearLayout implements
IndustryCollectionDetailsListener {
public FeatureTop(Context context) {
super(context);
// TODO Auto-generated constructor stub
}
public FeatureTop(Context context, AttributeSet attrs) {
super(context, attrs);
}
public FeatureTop(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public void featureTopDownloadSuccess() {
// TODO Auto-generated method stub
}
@Override
public void featureTopDownloadFail() {
// TODO Auto-generated method stub
}
@Override
public void featureBottomDownloadSuccess() {
// TODO Auto-generated method stub
}
@Override
public void featureBottomDownloadFail() {
// TODO Auto-generated method stub
}
@Override
public void middleDownloadSuccess() {
// TODO Auto-generated method stub
}
@Override
public void middleDownloadFail() {
// TODO Auto-generated method stub
}
}
public class FeatureBottom extends LinearLayout implements
IndustryCollectionDetailsListener {
public FeatureBottom(Context context) {
super(context);
// TODO Auto-generated constructor stub
}
public FeatureBottom(Context context, AttributeSet attrs) {
super(context, attrs);
}
public FeatureBottom(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public void featureTopDownloadSuccess() {
// TODO Auto-generated method stub
}
@Override
public void featureTopDownloadFail() {
// TODO Auto-generated method stub
}
@Override
public void featureBottomDownloadSuccess() {
// TODO Auto-generated method stub
}
@Override
public void featureBottomDownloadFail() {
// TODO Auto-generated method stub
}
@Override
public void middleDownloadSuccess() {
// TODO Auto-generated method stub
}
@Override
public void middleDownloadFail() {
// TODO Auto-generated method stub
}
}
public class Middle extends LinearLayout implements
IndustryCollectionDetailsListener {
public Middle(Context context) {
super(context);
// TODO Auto-generated constructor stub
}
public Middle(Context context, AttributeSet attrs) {
super(context, attrs);
}
public Middle(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public void featureTopDownloadSuccess() {
// TODO Auto-generated method stub
}
@Override
public void featureTopDownloadFail() {
// TODO Auto-generated method stub
}
@Override
public void featureBottomDownloadSuccess() {
// TODO Auto-generated method stub
}
@Override
public void featureBottomDownloadFail() {
// TODO Auto-generated method stub
}
@Override
public void middleDownloadSuccess() {
// TODO Auto-generated method stub
}
@Override
public void middleDownloadFail() {
// TODO Auto-generated method stub
}
}
} I don't know about this error. Is there any property i am missing in xml? I am new to android development Thanks in advance.
I observed that if i saperate the class then its working fine. But if its inner class its not working and giving me that error. Why its happening like that I don't know. does anyone know how can I do it with inner class?