PROBLEM:
Rendering Problems The following classes could not be found:
- com.lww.leefamily.leefamily.Controls.TitleLayout (Change to android.widget.TableLayout, Fix Build Path, Create Class)
Tip: Try to build the project.
我已经创建了类,在xml中输入<com可以直接找到这个类,但是还是报错,CLEAN过了,求大神指点。
以下是代码:
class:
package com.lww.leefamily.leefamily.Controls;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import com.lww.leefamily.leefamily.R;
/**
* Created by Administrator on 2016/3/3 0003.
*/
public class TitleLayout extends LinearLayout {
public TitleLayout(Context context,AttributeSet attrs){
super(context,attrs);
LayoutInflater.from(context).inflate(R.layout.title,this);
}
}
XML
<?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"
android:background="#d8e0e8"
android:orientation="vertical">
<ListView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
></ListView>
<com.lww.leefamily.leefamily.Controls.TitleLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</com.lww.leefamily.leefamily.Controls.TitleLayout>
</LinearLayout>