Android.view.InflateException: binary line of XML file # 6: error inflating class <unknown>

I am new to android. I get an error like android.view.InflateException: binary line of XML file # 6: class bloat error. Previously, this work went well. But suddenly this mistake. I cleaned the project so many times. But does not work.

Xml format:

<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".FragDownloadSites" >

    <ExpandableListView
        android:id="@+id/lvDownloadSite"
        android:layout_width="fill_parent"
        android:layout_height="610dp"
        android:layout_x="0dp"
        android:layout_y="70dp" >
    </ExpandableListView>

    <TextView
        android:id="@+id/tvDownloadSiteMessage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="30dp"
        android:layout_y="21dp"
        android:text="Downloaded Sites"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <ImageButton
        android:id="@+id/btnDownloadSite"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="540dp"
        android:layout_y="10dp"
        android:src="@drawable/refresh" />

</AbsoluteLayout>

And the code:

package com.example.config;

import android.support.v4.app.Fragment;


public class FragDownloadSites extends Fragment implements SiteDataInterface {
    View rootView;
    ExpandableListView expListView;
    TextView tvMsg;
    ProgressDialog progress;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        rootView = inflater.inflate(R.layout.frag_download_sites, container, false);

        progress = new ProgressDialog(rootView.getContext());
        progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progress.setCancelable(false);
        progress.setMessage("Loading...");

        tvMsg=(TextView)rootView.findViewById(R.id.tvDownloadSiteMessage);

        // get the listview
        expListView = (ExpandableListView)rootView.findViewById(R.id.lvDownloadSite);
        DisplaySiteData();

        return rootView;
    }

Thanks in advance.

0
source share
1 answer

This class is deprecated at API level 3. Instead, use FrameLayout, RelativeLayout, or a custom layout.

Absolute layouts are also less flexible and more difficult to maintain than other types of layouts and absolute positioning is not very useful in the world of different screen resolutions and proportions.

. ...

0

All Articles