Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Create a Custom Element in a Fragment using NexusDialog #70

Open
ThilinaF opened this issue Jan 3, 2018 · 1 comment
Open

Create a Custom Element in a Fragment using NexusDialog #70

ThilinaF opened this issue Jan 3, 2018 · 1 comment

Comments

@ThilinaF
Copy link

ThilinaF commented Jan 3, 2018

I want to create custom elements through a fragment using nexusDialog Library (https://github.com/dkharrat/NexusDialog ) i created a custom element using the example given from the developer but i have no idea how to generate those custom components in fragment not activtiy. i want to pass data into edit text and get values of edittext to the fragment using the library

here is my code

Custom Component


 public class EditTextComp extends FormElementController {
    EditText editText = null;

    TextView textView = null;

    public EditTextComp(Context context) {
        super(context, null);

    }


    @Override
    protected View createView() {
        return createComponent();
    }

    @Override
    public void refresh() {

    }

    @Override
    public void setError(String message) {

    }




    private View createComponent() {

        LayoutInflater inflater = LayoutInflater.from(getContext());
        return inflater.inflate(R.layout.compound_comp_edit_text, null);

    }

    public EditText getEditText() {
        return (EditText) getView().findViewById(R.id.editText);
    }

}

how can i create this in a fragment?

@ThilinaF
Copy link
Author

ThilinaF commented Jan 5, 2018

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant