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

Not working with <View> tag #180

Open
umer7267 opened this issue Feb 2, 2019 · 0 comments
Open

Not working with <View> tag #180

umer7267 opened this issue Feb 2, 2019 · 0 comments

Comments

@umer7267
Copy link

umer7267 commented Feb 2, 2019

I am using a view tag inside my xml file, when I create a dialogplus box with the xml it gives me a nullPointerException error.

My xml file (activity_detail.xml)

<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="200dp"
    tools:context=".DetailActivity">

    <View
        android:layout_width="1dp"
        android:layout_height="match_parent"
        android:background="#000"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />
    <TextView
        android:id="@+id/Imagelink"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="ImageLink"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/Imagesize"
        app:layout_constraintTop_toBottomOf="@id/Username" />

</android.support.constraint.ConstraintLayout>

Creating dialogbox of this file using DialogPlus:

DialogPlus dialogPlus = DialogPlus.newDialog(context)
                        .setContentHolder(new ViewHolder(R.layout.activity_detail))
                        .setExpanded(true, 250)
                        .setCancelable(true).setGravity(Gravity.BOTTOM)
                        .create();
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