Skip to content

Error inflating class io.ghyeok.stickyswitch.widget.StickySwitch #34

Description

@rrenanh

I'm trying to use a alertdialog from a layout containing the switch.

I get the error:
android.view.InflateException: Binary XML file line #39 in com.example.authenticatorapp:layout/layout_movimentacao_dialog: Binary XML file line #39 in com.example.authenticatorapp:layout/layout_movimentacao_dialog: Error inflating class io.ghyeok.stickyswitch.widget.StickySwitch

Can anybody help please?

xml code:
<io.ghyeok.stickyswitch.widget.StickySwitch android:id="@+id/sticky_switch" android:layout_width="wrap_content" android:layout_height="wrap_content" app:ss_animationDuration="600" app:ss_animationType="line" app:ss_iconPadding="18dp" app:ss_iconSize="22dp" app:ss_selectedTextSize="14sp" app:ss_textSize="12sp" />

Activity code:
`private void openMovimentacaoDialog() {
LayoutInflater inflater = LayoutInflater.from(this);
View view = inflater.inflate(R.layout.layout_movimentacao_dialog, null);

    AlertDialog alertDialog = new AlertDialog.Builder(this)
            .setView(view)
            .create();

    alertDialog.show();
}`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions