NexusDialog icon indicating copy to clipboard operation
NexusDialog copied to clipboard

Create a Custom Element in a Fragment using NexusDialog

Open ThilinaF opened this issue 7 years ago • 1 comments

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 avatar Jan 03 '18 10:01 ThilinaF

answer i wrote https://stackoverflow.com/questions/48058844/create-a-custom-element-in-a-fragment-using-nexusdialog

ThilinaF avatar Jan 05 '18 06:01 ThilinaF