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

Text alignment left #5

Open
mikelantzelo opened this issue Mar 1, 2018 · 4 comments
Open

Text alignment left #5

mikelantzelo opened this issue Mar 1, 2018 · 4 comments
Assignees

Comments

@mikelantzelo
Copy link

Text alignment left is not working with either with xml or java set. Can you help me?

@Nishant-Pathak
Copy link
Owner

@mikelantzelo Can you please share the code snippet and also the relevant screenshot.

@mikelantzelo
Copy link
Author

@nullable
@OverRide
public View onCreateView(@nonnull LayoutInflater inflater, @nullable ViewGroup container, @nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.dialog_show_answer, container, false);
context = getActivity();
getDialog().setTitle(R.string.apantisi);
MathView mathView = view.findViewById(R.id.html_text);
Button button = view.findViewById(R.id.button_apantisi_ok);
mathView.setTextAlignment(View.TEXT_ALIGNMENT_TEXT_START);
mathView.setText(answer);
button.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
getDialog().dismiss();
}
});

    return view;
}

screenshot_1519920211

@Nishant-Pathak
Copy link
Owner

Nishant-Pathak commented Mar 3, 2018

Thanks @mikelantzelo to raise this concern. Do you mind having a look to MathView.java class and figure out the fix. I will be happy to see pull request for this.

@Steve-Mr
Copy link

Hello! I think it may related to the MathJax which display everything in center by default. (I'm not familiar with it so i am just gussing)
and maybe you can check here: https://stackoverflow.com/questions/11296415/how-to-left-align-mathjax-elements

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

No branches or pull requests

3 participants