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