Click here to Skip to main content
15,879,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have preference headers xml file like this:
<header android:id="@+id/roi"
    android:title="   ROI"
    android:icon="@drawable/baseline_fullscreen_black_24dp"
    >
    <intent
        android:action="android.intent.action.VIEW"
        android:targetPackage="com.lambdahash.sonic.ui_app"
        android:targetClass="com.lambdahash.sonic.ui_app.fragments.exampleActivity" />
</header>



I want to open an actvity like this:


public class exampleActivity extends Activity implements DrawPolygonCanvas.OnGetBitmapListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_example); 
        }
}



Here, activity_example.xml is not a preference file, it's a layout xml file.
How do I open exampleActivity from a preference-headers xml file?

What I have tried:

I have tried opening it with a header file and I am getting this error:

 Caused by: android.view.InflateException: Binary XML file line #19: Binary XML file line #19: Error inflating class com.lambdahash.sonic.example.draw.senapr.DrawPolygonCanvas
     

Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class com.lambdahash.sonic.example.draw.senapr.DrawPolygonCanvas
Posted
Comments
wseng 4-Nov-18 20:29pm    
where did you wrote the preference headers xml ? In AndroidMainfest.xml ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900