Skip to content

Instantly share code, notes, and snippets.

@LinerSRT
Last active August 31, 2020 21:41
public class WatchfaceView extends WatchfaceEngine { // Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class com.liner.linerlauncher.watchface.WatchfaceView
public WatchfaceView(Context context) {
this(context, null, 0);
}
public WatchfaceView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public WatchfaceView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
}
public abstract class WatchfaceEngine extends View {
public WatchfaceEngine(Context context) {
this(context, null, 0);
}
public WatchfaceEngine(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public WatchfaceEngine(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.liner.linerlauncher.watchface.WatchfaceView
android:id="@+id/watchfaceView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment