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 able to set Dialog Text Gravity #386

Open
Hitexroid opened this issue Jun 23, 2016 · 1 comment
Open

Not able to set Dialog Text Gravity #386

Hitexroid opened this issue Jun 23, 2016 · 1 comment

Comments

@Hitexroid
Copy link

Hitexroid commented Jun 23, 2016

How can i set gravity Title and MessageText in Dialog ?

i write this code in Dialog Class

public void setGravity(int Gravity) { titleTextView.setGravity(Gravity); messageTextView.setGravity(Gravity); }

but returns this error

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setGravity(int)' on a null object reference

@ghost
Copy link

ghost commented Jun 25, 2016

this.getDialog().setTitle(title);
Text in dialog ,u should inflate view in onCreateView

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