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

textbox settext not updating before dialog load #202

Open
keyvan1361 opened this issue Sep 15, 2020 · 0 comments
Open

textbox settext not updating before dialog load #202

keyvan1361 opened this issue Sep 15, 2020 · 0 comments

Comments

@keyvan1361
Copy link

Hi,
I need to access the elements to settext of a textbox or a set a checkbox before the dialog loads
it works fine when i use the code below in the activity to set the text but does not work in a fragment inside a tabLayout
in Activity:
` View view = getLayoutInflater().inflate(R.layout.fragment_agent, null);
TextView agencyTitle = (TextView) view.findViewById(R.id.agencyTitleTextView);

     executor.execute(new Runnable() {
                                    @Override
                                    public void run() {
                        agencyTitle.setText(agent.getAgencyTitle());

}
});
DialogPlus dialog = DialogPlus.newDialog(ListingViewActivity.this) ....but when i use it in a fragment when i log the result it seems to gets the value but it **does not refresh the layout** and see the values !!! in fragment:View myView = LayoutInflater.from(getContext()).inflate(R.layout.fragment_agent, null);

executor.execute(new Runnable() {
@OverRide
public void run() {
CheckBox chk1 = (CheckBox) myView.findViewById(R.id.checkbox_apartment);
chk1.setChecked(true);`

what is wrong here!?

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