Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build an Android App with Views #33

Open
hogansung opened this issue Jul 8, 2024 · 0 comments
Open

Build an Android App with Views #33

hogansung opened this issue Jul 8, 2024 · 0 comments

Comments

@hogansung
Copy link

hogansung commented Jul 8, 2024

In case someone encounters an error of "Preview Unavailable" when visualizing the EntryDialogFragment component in the design mode of nav_graph.xml, one needs to add tools:layout="@layout/fragment_entry_dialog" to the dialog component of entryDialogFragment.

To be more precise, the full code for that entryDialogFragment in the nav_graph.xml should be the following.

<navigation xmlns:android="http://schemas.android.com/apk/res/android"
    // ...
    <dialog
        android:id="@+id/entryDialogFragment"
        android:name="com.example.juicetracker.EntryDialogFragment"
        android:label="EntryDialogFragment"
        tools:layout="@layout/fragment_entry_dialog" >    <!-- This line is critical. -->
    </dialog>
</navigation>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant