Skip to content

textbox settext not updating before dialog load #202

@keyvan1361

Description

@keyvan1361

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!?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions